How to change docking pane font size? |
Post Reply |
Author | |
nclee
Newbie Joined: 19 June 2014 Location: Korea Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 19 June 2014 at 12:46am |
Hi,
I'm using v16.2.4. I'm Using Office2013 theme, but pane font size is too large. How to change font size?? Please... |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
|
We have the same issue and I'm working on it now. I have found the m_nFontSize member of the XTPDockingPaneThemeOffice2013 object. We subclass from the class but setting the value in the ctor is useless as CJ overwrites it later when RefreshMetrics is called.
The RefreshMetrics method is virtual and in that method the font height is calculated by XTPCalcLogFontHeight, which is not a method that can be overridden. It is passed the theme's m_nFontSize member. That member is not set in the constructor and the only place I found it being set is in RefreshMetrics via a call to CXTPResourceImages::GetImageInt. Of course there is no "SetImageInt". The value returned is 16 and XTPCalcLogFontHeight scales it to 21 (on my 96 dpi system). I have not found a way to "override" that setting. I can stop in debug and set lfHeight back to what we get when running with a 2007/2010 paint theme and that gives us a better result. At this point there appears to be only two ways to work this out. Implement RefreshMetrics and copy the CJ code, including XTPCalcLogFontHeight and don't call "pImages->GetImageInt(...,_T"FontSize") and just set the size to 12 (same as 2007/2010). This assumes I can get to all the other APIs that calls. Alternatively a strategically placed call to SetCaptionFontIndirect might also solve the problem. |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
|
Don't waste time calling SetCaptionFontIndirect. The numerous calls to RefreshMetrics still call SetCaptionFontIndirect and even though I have set my own font, CJ completely ignores that fact.
I'm not even sure why SetCaptionFontIndirect exists for this theme. |
|
mcmastl
Admin Group Joined: 14 April 2015 Status: Offline Points: 79 |
Post Options
Thanks(0)
|
We have informed our development team of the issue and will be looking into it. Thank you for bringing this to our attention. If the issue has been resolved please let us know. Thank you.
|
|
Luke McMasters, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(1)
|
Just a quick note - SetCaptionFontIndirect seems to work as expected for me in XTP v17 beta 1.
|
|
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 |