xpTheme.tcl 2.0 KB

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