Tk Source Code

View Ticket
Login
Ticket UUID: c36e462daf6cf0a7e8c52e4195f0682d6bfda7b3
Title: macOS : arrow buttons of ttk::spinbox in dark mode are moving
Type: Bug Version: trunk
Submitter: nab Created on: 2025-10-31 09:28:36
Subsystem: 66. Aqua Window Operations Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2025-11-08 20:33:05
Resolution: None Closed By: nobody
    Closed on:
Description:
Hi,
running the widget tour on macOS 26, specifically "special widgets for macOS"

(using Appearance tab to switch between light/dark mode)
in light mode, the ttk::spinbox of the Entries tab is ok
in dark mode, pressing up arrow is ok, but pressing down arrow make both arrows to move down.

best regards,
nicolas
User Comments: marc_culler (claiming to be Marc Culler) added on 2025-11-08 20:33:05:
I believe that those small adjustments were added because, at that time,
changing the appearance would cause those arrow buttons to move.  The
adjustments made them stay in the same place.  Now the adjustments are
making the buttons move and removing the adjustments causes them to stay
in the same place.  Presumably this means that a bug got fixed somewhere.

I guess that function should check the OS version and make different
adjustments for different OS versions.  That would require some testing
on older OS versions, however.

nemethi (claiming to be Csaba Nemethi) added on 2025-11-07 17:37:43:

I have changed the Subsystem from "76. Widget Tour" to "66. Aqua Window Operations" because the Widget Tour is just a means to reproduce an issue related to the behavior of the ttk::spinbox widget on aqua.

The reported issue is apparently caused by the SpinButtonReBounds() function in the file ttkMacOSXTheme.c.  I have no idea why the line

bounds->size.height -= 0.5;

is present in the body of this function, but its removal seems to fix the behavior reported by Nicolas.  Marc, can you have a look please?