aquaTheme.tcl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #
  2. # Aqua theme (OSX native look and feel)
  3. #
  4. namespace eval ttk::theme::aqua {
  5. ttk::style theme settings aqua {
  6. ttk::style configure . \
  7. -font TkDefaultFont \
  8. -background systemWindowBody \
  9. -foreground systemModelessDialogActiveText \
  10. -selectbackground systemHighlight \
  11. -selectforeground systemModelessDialogActiveText \
  12. -selectborderwidth 0 \
  13. -insertwidth 1
  14. ttk::style map . \
  15. -foreground {disabled systemModelessDialogInactiveText
  16. background systemModelessDialogInactiveText} \
  17. -selectbackground {background systemHighlightSecondary
  18. !focus systemHighlightSecondary} \
  19. -selectforeground {background systemModelessDialogInactiveText
  20. !focus systemDialogActiveText}
  21. # Workaround for #1100117:
  22. # Actually, on Aqua we probably shouldn't stipple images in
  23. # disabled buttons even if it did work...
  24. ttk::style configure . -stipple {}
  25. ttk::style configure TButton -anchor center -width -6
  26. ttk::style configure Toolbutton -padding 4
  27. ttk::style configure TNotebook -tabmargins {10 0} -tabposition n
  28. ttk::style configure TNotebook -padding {18 8 18 17}
  29. ttk::style configure TNotebook.Tab -padding {12 3 12 2}
  30. # Combobox:
  31. ttk::style configure TCombobox -postoffset {5 -2 -10 0}
  32. # Treeview:
  33. ttk::style configure Heading -font TkHeadingFont
  34. ttk::style configure Treeview -rowheight 18 -background White
  35. ttk::style map Treeview \
  36. -background {{selected background} systemHighlightSecondary
  37. selected systemHighlight}
  38. # Enable animation for ttk::progressbar widget:
  39. ttk::style configure TProgressbar -period 100 -maxphase 255
  40. # For Aqua, labelframe labels should appear outside the border,
  41. # with a 14 pixel inset and 4 pixels spacing between border and label
  42. # (ref: Apple Human Interface Guidelines / Controls / Grouping Controls)
  43. #
  44. ttk::style configure TLabelframe \
  45. -labeloutside true -labelmargins {14 0 14 4}
  46. # TODO: panedwindow sashes should be 9 pixels (HIG:Controls:Split Views)
  47. }
  48. }