[solved] Caption Direction |
Post Reply |
Author | ||
MGebler
Groupie Joined: 18 May 2006 Location: Germany Status: Offline Points: 64 |
Post Options
Thanks(1)
Posted: 30 July 2017 at 4:29am |
|
Vertical orientated captions of a docking pane are displayed wrong, if the Office2013 theme is used. The caption string and the buttons are still horizontal orientated and therefore clipped by the caption rectangle. This bug still exists in the Office2016 theme of the beta version 18. You can reproduce this problem with the 'pane' example of your sample programs. With best regards Marcus
|
||
MGebler
Groupie Joined: 18 May 2006 Location: Germany Status: Offline Points: 64 |
Post Options
Thanks(0)
|
|
Hello again. I found a solution. Could you please verify the following source code patch.
void CXTPDockingPaneOffice2013Theme::DrawCaption(CDC *pDC, CXTPDockingPaneTabbedContainer *pPane, CRect rc) { #ifdef PATCHED_VERSION BOOL bVertical = pPane->IsCaptionVertical(); int nTitleHeight = m_nTitleHeight; CRect rcCaption(rc); if (bVertical) { rcCaption.DeflateRect(0, 0, rc.Width() - nTitleHeight - XTP_DPI_X(5), 0); } else { rcCaption.DeflateRect(0, 0, 0, rc.Height() - nTitleHeight - XTP_DPI_Y(5)); } DrawTitleBar(pDC, pPane, rcCaption, bVertical ); #else // Caption CRect rcCaption(rc); rcCaption.bottom = rcCaption.top + m_nTitleHeight; DrawTitleBar(pDC, pPane, rcCaption, FALSE); #endif } I am not quite sure about the correction terms XTP_DPI_Y(5) and XTP_DPI_X(5). With best regards Marcus |
||
astoyan
Admin Group Joined: 24 August 2013 Status: Offline Points: 312 |
Post Options
Thanks(0)
|
|
Hello Marcus,
We're not are not able to reproduce this issue neither in 17.3 no in 18.0. Can you please provide more detailed information about your environment, compiler and configuration? Regards, Alexander
|
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
Hello Marcus,
I think problem in hardcoded horizontal caption in CXTPDockingPaneOffice2013Theme::DrawCaption and other places
try only
Regards, Oleksandr Lebed |
||
MGebler
Groupie Joined: 18 May 2006 Location: Germany Status: Offline Points: 64 |
Post Options
Thanks(1)
|
|
Hello Oleksandr
I have just tried version 18.0.1 and applied your patch. But the result is still wrong. You have to recalculate the cation rectangle! You can simply reproduce this effect: 1. Start the pane sample program 2. Select a office 2013 or 2016 theme 3. Select the menu entry 'Docking Pane | Captions | Vertical' With best regards Marcus |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
Hello Marcus,
Your changes are accepted. The same fix in CXTPDockingPaneVisualStudio2012Theme which also affects on VS2015 theme. Regards, Oleksandr Lebed |
||
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 |