Menu

#2887 Tri-state buttons not working for non-native themes

open
5
2011-03-16
2011-03-16
No

ttk::checkbutton and ttk::radiobutton are supposed to show an undetermined state, when the associated variable is unset. For native themes under windows and macosx, this works fine. For non-native themes, the buttons switch to the alternate state, but there is no visual difference. On X11, every possible theme is affected (all are non-native).

The attached script shows the problem

Discussion

  • Christian Gollwitzer

    Script that displays on, off and 3state buttons for different themes

     
  • Christian Gollwitzer

    • assigned_to: jenglish --> hobbs
     
  • Christian Gollwitzer

    Screenshot for themes aqua and clam

     
  • Christian Gollwitzer

    Updated test that shows all 6 states

     
  • Christian Gollwitzer

    Patch for default and clam theme

     
  • Christian Gollwitzer

    Screen shot with aqua, default(unpatched) and clam&default(patched)

     
  • Christian Gollwitzer

    I have made a patch to implement the changes as suggested by Jeff Hobbs. The test script was also updated to show all 6 possible widget states: Checkeed, unchecked, and alternate state, at both enabled and disabled states.

    All of these are cleary distinguishable under the native aqua theme, but fail to be distinguished under the Tk drawn themes, For the default theme, I'm pretty confident with the solution as-is.

    But for clam, I was not able to set a different style for the disabled alternate state. Moreover, I could not understand how the checkmark is drawn - I expected to see some bitmap embedded in the style code. This way, one could draw a different symbol analogous to aqua for the themes with checkmarks, i.e. alt and clam.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.