OSX Toggle Button Styling (PR #26308)

43 views
Skip to first unread message

Stefan Csomor

unread,
Mar 17, 2026, 2:03:55 PMMar 17
to wx-...@googlegroups.com, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26308

Commit Summary

  • a9c12e1 use common method for toggle and normal buttons

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308@github.com>

Stefan Csomor

unread,
Mar 17, 2026, 2:08:46 PMMar 17
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/before/a9c12e135b90c046deb07b661b60de7ff4973e74/after/edd2bc908e6eb8c6ef0e0a687398facef12cb16f@github.com>

Stefan Csomor

unread,
Mar 18, 2026, 4:48:44 AMMar 18
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.

  • d87de50 using NSShadowlessSquareBezelStyle for toggles like before


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/before/edd2bc908e6eb8c6ef0e0a687398facef12cb16f/after/d87de501f921f2725d2eb0770ef32ec11946b4cd@github.com>

VZ

unread,
Mar 18, 2026, 1:19:00 PMMar 18
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26308)

Should this be merged or do you plan more changes here?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/c4083993816@github.com>

Stefan Csomor

unread,
Mar 18, 2026, 2:11:50 PMMar 18
to wx-...@googlegroups.com, Subscribed
csomor left a comment (wxWidgets/wxWidgets#26308)

Should this be merged or do you plan more changes here?

wait a moment please, we have to decide whether to move forward, using a rounded style, or keeping the old look, and I want to document how to arrive at another style for a toggle button as well ...


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/c4084613808@github.com>

Stefan Csomor

unread,
Apr 6, 2026, 3:55:48 AM (4 days ago) Apr 6
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.

  • d779412 Revert "using NSShadowlessSquareBezelStyle for toggles like before"


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/before/d87de501f921f2725d2eb0770ef32ec11946b4cd/after/d779412ab9426fe007287abf615563a9c597e362@github.com>

VZ

unread,
Apr 6, 2026, 12:07:54 PM (4 days ago) Apr 6
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.

Thanks, just to confirm: should this one be merged now or should we wait more for it to be tested?


In src/osx/cocoa/button.mm:

> @@ -187,6 +199,7 @@ - (NSControlSize)controlSize;
 {
     NSButton* button = GetNSButton();
     [button setAlternateImage: wxOSXGetImageFromBundle(bitmap)];
+    NSLog(@"alternateImage height %d, normalImage height %d", (int)[button alternateImage].size.height, (int)[button image].size.height);

This should probably be removed?


In include/wx/osx/cocoa/private.h:

> @@ -50,7 +50,12 @@ wxBitmapBundle WXDLLIMPEXP_CORE wxOSXCreateSystemBitmapBundle(const wxString& id
 WXWindow WXDLLIMPEXP_CORE wxOSXGetMainWindow();
 WXWindow WXDLLIMPEXP_CORE wxOSXGetKeyWindow();
 WXImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromNSCursor(const WXHCURSOR cursor);
-
+void WXDLLIMPEXP_CORE wxOSXSetBezelStyleFromBorderFlags(WX_NSButton v,

Is WXDLLIMPEXP_CORE really needed here? I.e. is it really going to be used from outside the core library? I think it doesn't need to be exported from it.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/review/4063012257@github.com>

Stefan Csomor

unread,
Apr 6, 2026, 3:36:53 PM (4 days ago) Apr 6
to wx-...@googlegroups.com, Subscribed

@csomor commented on this pull request.


In include/wx/osx/cocoa/private.h:

> @@ -50,7 +50,12 @@ wxBitmapBundle WXDLLIMPEXP_CORE wxOSXCreateSystemBitmapBundle(const wxString& id
 WXWindow WXDLLIMPEXP_CORE wxOSXGetMainWindow();
 WXWindow WXDLLIMPEXP_CORE wxOSXGetKeyWindow();
 WXImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromNSCursor(const WXHCURSOR cursor);
-
+void WXDLLIMPEXP_CORE wxOSXSetBezelStyleFromBorderFlags(WX_NSButton v,

you are right, I'll change that


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/review/4064119532@github.com>

Stefan Csomor

unread,
Apr 6, 2026, 3:37:01 PM (4 days ago) Apr 6
to wx-...@googlegroups.com, Subscribed

@csomor commented on this pull request.


In src/osx/cocoa/button.mm:

> @@ -187,6 +199,7 @@ - (NSControlSize)controlSize;
 {
     NSButton* button = GetNSButton();
     [button setAlternateImage: wxOSXGetImageFromBundle(bitmap)];
+    NSLog(@"alternateImage height %d, normalImage height %d", (int)[button alternateImage].size.height, (int)[button image].size.height);

yes, I'll do that


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/review/4064120286@github.com>

Stefan Csomor

unread,
Apr 6, 2026, 3:38:49 PM (4 days ago) Apr 6
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.

  • accb114 removing unnecessary export and debug log


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/before/d779412ab9426fe007287abf615563a9c597e362/after/accb1142af244e32614050fc3fd59885b612d6b1@github.com>

Stefan Csomor

unread,
Apr 6, 2026, 4:03:44 PM (4 days ago) Apr 6
to wx-...@googlegroups.com, Subscribed
csomor left a comment (wxWidgets/wxWidgets#26308)

Thanks, just to confirm: should this one be merged now or should we wait more for it to be tested?

fine to merge for me, we need broad testing now, if we run into trouble, I'll re-add the last reverted commit, which makes things less beautiful


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/c4194688674@github.com>

VZ

unread,
Apr 6, 2026, 6:06:12 PM (3 days ago) Apr 6
to wx-...@googlegroups.com, Subscribed

Closed #26308 via ba3f6c0.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26308/issue_event/24237924036@github.com>

Reply all
Reply to author
Forward
0 new messages