Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - In the ribbon, a 16x16 SVG icon is displayed as 32
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

In the ribbon, a 16x16 SVG icon is displayed as 32

 Post Reply Post Reply
Author
Message Reverse Sort Order
hiro-ta View Drop Down
Groupie
Groupie


Joined: 11 July 2013
Status: Offline
Points: 75
Post Options Post Options   Thanks (0) Thanks(0)   Quote hiro-ta Quote  Post ReplyReply Direct Link To This Post Topic: In the ribbon, a 16x16 SVG icon is displayed as 32
    Posted: 12 May 2025 at 11:15pm
PS
Large icons are commented out as follows.


nWidth = XTP_DPI_X(32);
//m_ImgMgrVector.SetVectorIcon(type, IDR_XAML_LARGE_ICON_DISABLED_CLIPBOARD_CUT, ID_EDIT_CUT,
// nWidth, xtpImageDisabled);
//m_ImgMgrVector.SetVectorIcon(type, IDR_XAML_LARGE_ICON_DISABLED_CLIPBOARD_COPY, ID_EDIT_COPY,
// nWidth, xtpImageDisabled);

Back to Top
hiro-ta View Drop Down
Groupie
Groupie


Joined: 11 July 2013
Status: Offline
Points: 75
Post Options Post Options   Thanks (0) Thanks(0)   Quote hiro-ta Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2025 at 10:48pm
If I had used xaml instead of svg, there would have been no problem.
Could it be a bug in svg?

IDR_XAML_SMALL_ICON_DISABLED_CLIPBOARD_CUT RT_XAML "Common\\xaml\\Office2019-WordProcessing-LightGray\\small\\clipboard-cut.xaml"
IDR_XAML_SMALL_ICON_DISABLED_CLIPBOARD_COPY RT_SVG "Common\\svg\\FlatPro2017-Basic\\small\\clipboard-copy.svg"



Back to Top
hiro-ta View Drop Down
Groupie
Groupie


Joined: 11 July 2013
Status: Offline
Points: 75
Post Options Post Options   Thanks (0) Thanks(0)   Quote hiro-ta Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2025 at 1:50am

Hello,

Added a “copy” 16x16 SVG icon in XTremeToolkit's CXTPImageManager as follows

UINT w16 = XTP_DPI_X(16); CString type(_T("RT_SVG")); m_svgImageManager.SetVectorIcon(type, IDR_SSI_NORMAL_COPY, ID_EDIT_COPY, w16); CXTPImageManager* pImgMgr = pCommandBars->GetImageManager(); pImgMgr->AddIcons(&m_svgImageManager);

Then I created a ribbon as follows.

CXTPRibbonTab* pTab = pRibbonBar->AddTab(ID_TAB_HOME); pGroup = pTab->AddGroup(ID_GROUP_EDIT); pControl = pGroup->Add(xtpControlButton, ID_EDIT_COPY);

But when I run it, the “Copy” icon is initially 16x16, but when I expand the window size, it shows up as 32x32.
This did not happen when I was using raster icons. Have the specifications changed?
How can I make it so that it does not appear as 32x32 when the window is expanded?


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.090 seconds.