[solved] Backstage menu items height |
Post Reply |
Author | |||
Alex H.
Senior Member Joined: 12 February 2004 Status: Offline Points: 266 |
Post Options
Thanks(0)
Posted: 10 November 2016 at 5:15am |
||
Hello Codejock-Team!
How can i change the height of the items, so that all of them have exactly the same height? As you can see, those items with a backstage view are higher. Can you post a patch? Thank you :-) |
|||
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
||
Yes, I also have that difference. It depends if it is a link to a backstage page or it is a command.
-cpede
|
|||
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|||
Alex H.
Senior Member Joined: 12 February 2004 Status: Offline Points: 266 |
Post Options
Thanks(0)
|
||
I know that this is the reason, but why?
Have a look at MS Office :-) |
|||
Fredrik
Senior Member Joined: 22 June 2005 Status: Offline Points: 235 |
Post Options
Thanks(0)
|
||
... we had to do a pretty ugly workaround for this and derived our own BackstagePageCommand from CXTPRibbonBackstagePage with a method to post a WM_COMMAND message to main frame with a menu ID. Then we also had to derive a class from CXTPRibbonBackstageView to handle clicking on the command and going there using the arrow keys. Moreover we had to derive our own backstage page themes to handle disabled tabs.... and all this just because we did not get pControl->SetHeight to work. There surely must be an easier way (like CodeJock makes links to commands and backstage pages the same height ;-))
|
|||
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
|
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(1)
|
||
Hello,
You can change height of commands and pages in method CXTPRibbonBackstageView::RecalcLayout()
I think it is from Office 2010 backstage. Upd: I have fixed this by adding new methods to CXTPRibbonBackstagePaintManager and derived CXTPRibbonBackstageViewThemeOffice2013. Now they return appropriate correct values. Regards, Oleksandr Lebed |
|||
Alex H.
Senior Member Joined: 12 February 2004 Status: Offline Points: 266 |
Post Options
Thanks(0)
|
||
Thank you it works :-)
|
|||
Fredrik
Senior Member Joined: 22 June 2005 Status: Offline Points: 235 |
Post Options
Thanks(1)
|
||
Great Oleksandr,
The only problem is that the caption for command items are not aligned with the caption for tabs. The text seems to be off by XTP_DPI_Y(3) pixels... By the way, if you use the arrow keys to navigate down among the tabs/commands the commands do not get highlighted which they should. Also, I think navigating down (using arrow down) should skip over the separator button. Also, it would be nice if the themes could support disabled backstage pages. The only think I had to add for my derived Office 2013 themes was
in DrawControl. |
|||
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
|
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(1)
|
||
Hello Fredrik,
Thank you for relevant proposals and information about issues. For skipping separator on navigation with keyboard I found next solution
Relating to disabled menu items - in CXTPRibbonBackstageViewThemeOffice2013::DrawControl() method for text color is better used m_clrButtonBackSelected as in original theme. But this is not suitable for VS2015 theme which is derived from Office2013. So I whant to add new colors in INI files of these themes.
There are some problems with disabling Command items. I will finish later. Also I found incorrect calculation size of separator's line in CXTPRibbonBackstageViewThemeOffice2013::DrawControl
|
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(1)
|
||
I found that disabling commands doesn't work on creation backstage (it is enabled again on updating), to disable command we need to disable Action
So full method DrawControl with fixes is below. But I will add new key-values in INI files for disabled text and background because they are different for DarkGray Office2013 themes and for VisualStudio2015
|
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
||
Gaps between buttons in menu (tabs) of backstage are added in
|
|||
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 |