aquaTheme.tcl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 [list disabled systemDialogBackgroundInactive \
  37. {!disabled !selected} systemWindowBody \
  38. {selected background} systemHighlightSecondary \
  39. selected systemHighlight] \
  40. -foreground [list disabled systemModelessDialogInactiveText \
  41. {!disabled !selected} black \
  42. selected systemModelessDialogActiveText]
  43. # Enable animation for ttk::progressbar widget:
  44. ttk::style configure TProgressbar -period 100 -maxphase 255
  45. # For Aqua, labelframe labels should appear outside the border,
  46. # with a 14 pixel inset and 4 pixels spacing between border and label
  47. # (ref: Apple Human Interface Guidelines / Controls / Grouping Controls)
  48. #
  49. ttk::style configure TLabelframe \
  50. -labeloutside true -labelmargins {14 0 14 4}
  51. # TODO: panedwindow sashes should be 9 pixels (HIG:Controls:Split Views)
  52. }
  53. }