Closed Tape-Worm closed 2 years ago
It seems to be thinking that there are invisible buttons to take into account, I have not experienced this (As it also appears in your 96dpi picture.
Yeah, if you set the MinimumWidth
to -1, it will squish the group down and cut off the text even in 96 DPI. I forgot to mention that.
I went through the code, and it appears it doesn't take the caption into account at all when trying to get the size. In fact, it was very difficult to retrieve the size of the caption, and even then, it clips that size to the width of the group.
It would also be nice if the caption is bigger, for the buttons to then be placed centrally in the group.. But small steps first :-)
@Tape-Worm Can you raise a "Feature request" for the min to take into account the Caption size please
Using todays alpha dev code base, and the Ribbon Controls 2022
sample in HDPI OS screen gives the following:
Will aim to set tracking to have a minimum width, and have a look at the other examples that use single buttons to see if they can be set also.
Min width is now respected:
In Ribbon Tooltips
; setting "Include" have a min of 300 causes the scrollbar to appears, (i.e. preventing shrink to small first)
Seems like #393 Fixed this issue.
I added a single button to a ribbon group, and because the group does not seem to resize based on the group caption (there should be an option for this btw), I set the MinimumWidth property on the group to 90 pixels.
In 96 DPI, I get this: And this is correct.
But, when I run it at my native DPI in 4k (150%): As you can see, the group text is now clipped.
If you don't mind a suggestion: Instead of jumping through the hoops required to make it DPI aware, fix it up so that the group min width is based on the caption size (and if
MinimumWidth > -1
, then use that instead).