Release v16.4.0 - Problems with high DPI desktop |
Post Reply |
Author | |
Alex G.
Groupie Joined: 22 December 2004 Location: Germany Status: Offline Points: 74 |
Post Options
Thanks(0)
Posted: 29 October 2014 at 4:38am |
Hello,
Thank you for this new release. I think there's still a problem related to high dpi resolution desktops. Let's say I have a set the scaling level to 125%. The Ribbon itself looks good, fonts layout etc. But it looks like that the icons are all on 32x32 pixel and scaled up which doesn't look very well. We have also 48x48 pix versions of our icons and they are also set to the XTPImageManager. Am I'm doing something wrong ? Please check out the attached picture. Best regards, Alex |
|
Marco1
Senior Member Joined: 16 January 2004 Location: Germany Status: Offline Points: 251 |
Post Options
Thanks(0)
|
Have you tried with the CJ ribbon sample? Same results?
|
|
Alex G.
Groupie Joined: 22 December 2004 Location: Germany Status: Offline Points: 74 |
Post Options
Thanks(0)
|
Sorry for the late reply.
No, it doesn't help. Is there a possible way to set larger icons, lets say 48x48, and let scale them down ? The RibbonBar layouter doen't work very well with icons larger than 32x32 Alex |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
|
We have a "2x" icon size option. We call SetFontHeight on the ribbon bar. And we get the command bars paint manager and set m_bAutoResizeIcons to TRUE. That gives us some big icons. We don't have big icons like you do and CJ scales them up.
We have some success with this. However I am chasing an issue with the various Office themes that shows up on buttons that have text under the button. The text position gets messed up and the text either nestles right under the button (touches it actually) or writes over the button. We only saw this after adding Office 2013 and Office 2010 support. And yes, I can duplicate it with their MDI ribbon sample if I start switching between the various themes and then change the font sizes using the options command. The Office2013 CXTPCommandBarsOffice2013Theme::RefreshMetrics has code in it that adjusts the m_nEditHeight member based on the DPI setting. I don't see the issue I mentioned when I run at a high DPI. The code in the generic ribbon UpdateFonts is different and doesn't seem to do as good a job as what I see with Office2013. If you find a better approach to getting large buttons I sure would like to know what it is. Oleg helped us with our initial implementation but that guru seems to have moved on. We use this not just for high dpi, but for very wide monitors too (we define as > 1600 pixels wide). // set the ribbon bar height to enlarge most of the UI there pRibbonBar->SetFontHeight(dwFontHeight);// Usually 20 or greater // tell CJ to scale up the icons when necessary // NOTE: Only allow scaling in HiRes mode. Otherwise, the slightly larger font used in Japanese // will scale the icons up in that environment & look blurry. pCommandBars->GetPaintManager()->m_bAutoResizeIcons = bHiRes; // set the font on command bar controls (buttons, QAT, etc) if (CXTPRibbonTheme* pPaintManager = (CXTPRibbonTheme*)pRibbonBar->GetPaintManager()) { if (CFont* pFont = pPaintManager->GetRibbonPaintManager()->GetTabPaintManager()->GetFont()) { LOGFONT lfFont = {0}; if (int nRC = pFont->GetLogFont(&lfFont)) { lfFont.lfHeight = dwFontHeight > 0 ? 0 - dwFontHeight : dwFontHeight; // The Codejock calls below to change the font will alter the font structure // passed to them. They monkey with it while coming up with the vertical font // that they hold, so making successive calls with the same structure yields // rotated text in the latter cases. I consider the alteration more than a // little rude, especially since it took me quite a while to figure out what // they were doing. Therfore, make a fresh copy of the font data for each call. LOGFONT lfTab = lfFont; LOGFONT lfGroup = lfFont; LOGFONT lfButtons = lfFont; LOGFONT lfCommandBars = lfFont; // tab captions (per Oleg) pPaintManager->GetRibbonPaintManager()->GetTabPaintManager()->SetFontIndirect(&lfTab); // group captions (per Oleg) pPaintManager->GetRibbonPaintManager()->m_fontGroupCaption.SetCustomFont(&lfGroup); // ribbon text (buttons, QAT, etc) pPaintManager->SetCommandBarsFontIndirect(&lfButtons); // The command bars paint manager needs to know about this, too. It will get // used for context menus. pCommandBars->GetPaintManager()->SetCommandBarsFontIndirect(&lfCommandBars); // tell Codejock about the changes pPaintManager->GetRibbonPaintManager()->RefreshMetrics(); pPaintManager->RefreshMetrics(); } } |
|
astoyan
Admin Group Joined: 24 August 2013 Status: Offline Points: 304 |
Post Options
Thanks(0)
|
Hello, I'm glad to inform you that the upcoming version 17.0 will have full DPI support for the majority of components, including Ribbon, Command Bars, Controls, Docking Pane, Task Panel, TabManager, Shortcut Bar, Markup, which will already be available in 17.0 beta scheduled for release in a few weeks. DPI support for other components is under development now and most likely will be added with the next update. Please stay tuned to our updates and once 17.0 beta is out we appreciate a thorough testing and reporting the problems. Thank you. Regards, Alexander Stoyan
|
|
Alex G.
Groupie Joined: 22 December 2004 Location: Germany Status: Offline Points: 74 |
Post Options
Thanks(0)
|
Nice!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |