https://github.com/wxWidgets/wxWidgets/pull/26025
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz commented on this pull request.
Thanks, I didn't test this but from reading the code it looks like it should do the right thing. @csomor Do you have any objections to merging this?
> @@ -93,8 +93,7 @@ - (NSControlSize)controlSize;
// switch bezel style for plain pushbuttons
if ( bitmap.IsOk() )
{
- if ([GetNSButton() bezelStyle] == NSRoundedBezelStyle)
- [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle];
+ [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle];
Should we perhaps use SetBezelStyleFromBorderFlags() here too to ensure that the bezel is always set consistently?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@RobertRoeb Thanks! I haven't fully understood the sequence yet, where would it be recreated with pure text, I thought that SetBitmap() would call the implementation's SetBitmap without first re-creating something. But since it happens to you, then I understand that unconditionally changing the style make sense. But I'd also prefer to call the common SetBezelStyleFromBorderFlags() to keep all our HIG wisdom at one place and consistent, would just calling this instead of manipulating the style directly also solve your problem ?
According to the docs NSRegularSquareBezelStyle and NSSmallSquareBezelStyle are perfect for bitmaps and other cases because they can scale to any size, while NSRoundedBezelStyle a.k.a NSBezelStylePush are for text content, so I think it's decision tree is still valid. Otherwise I'd prefer to fix it there.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()