xpTheme.tcl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # Settings for 'xpnative' theme
  3. #
  4. namespace eval ttk::theme::xpnative {
  5. ttk::style theme settings xpnative {
  6. ttk::style configure . \
  7. -background SystemButtonFace \
  8. -foreground SystemWindowText \
  9. -selectforeground SystemHighlightText \
  10. -selectbackground SystemHighlight \
  11. -font TkDefaultFont \
  12. ;
  13. ttk::style map "." \
  14. -foreground [list disabled SystemGrayText] \
  15. ;
  16. ttk::style configure TButton -anchor center -padding {1 1} -width -11
  17. ttk::style configure TRadiobutton -padding 2
  18. ttk::style configure TCheckbutton -padding 2
  19. ttk::style configure TMenubutton -padding {8 4}
  20. ttk::style configure TNotebook -tabmargins {2 2 2 0}
  21. ttk::style map TNotebook.Tab \
  22. -expand [list selected {2 2 2 2}]
  23. # Treeview:
  24. ttk::style configure Heading -font TkHeadingFont
  25. ttk::style configure Treeview -background SystemWindow
  26. ttk::style map Treeview \
  27. -background [list selected SystemHighlight] \
  28. -foreground [list selected SystemHighlightText] ;
  29. ttk::style configure TLabelframe.Label -foreground "#0046d5"
  30. # OR: -padding {3 3 3 6}, which some apps seem to use.
  31. ttk::style configure TEntry -padding {2 2 2 4}
  32. ttk::style map TEntry \
  33. -selectbackground [list !focus SystemWindow] \
  34. -selectforeground [list !focus SystemWindowText] \
  35. ;
  36. ttk::style configure TCombobox -padding 2
  37. ttk::style map TCombobox \
  38. -selectbackground [list !focus SystemWindow] \
  39. -selectforeground [list !focus SystemWindowText] \
  40. -foreground [list \
  41. disabled SystemGrayText \
  42. {readonly focus} SystemHighlightText \
  43. ] \
  44. -focusfill [list {readonly focus} SystemHighlight] \
  45. ;
  46. ttk::style configure TSpinbox -padding {2 0 14 0}
  47. ttk::style map TSpinbox \
  48. -selectbackground [list !focus SystemWindow] \
  49. -selectforeground [list !focus SystemWindowText] \
  50. ;
  51. ttk::style configure Toolbutton -padding {4 4}
  52. }
  53. }