xpTheme.tcl 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. # Treeview:
  25. ttk::style configure Heading -font TkHeadingFont
  26. ttk::style configure Treeview -background SystemWindow
  27. ttk::style map Treeview \
  28. -background [list selected SystemHighlight] \
  29. -foreground [list selected SystemHighlightText] ;
  30. ttk::style configure TLabelframe.Label -foreground "#0046d5"
  31. # OR: -padding {3 3 3 6}, which some apps seem to use.
  32. ttk::style configure TEntry -padding {2 2 2 4}
  33. ttk::style map TEntry \
  34. -selectbackground [list !focus SystemWindow] \
  35. -selectforeground [list !focus SystemWindowText] \
  36. ;
  37. ttk::style configure TCombobox -padding 2
  38. ttk::style map TCombobox \
  39. -selectbackground [list !focus SystemWindow] \
  40. -selectforeground [list !focus SystemWindowText] \
  41. -foreground [list \
  42. disabled SystemGrayText \
  43. {readonly focus} SystemHighlightText \
  44. ] \
  45. -focusfill [list {readonly focus} SystemHighlight] \
  46. ;
  47. ttk::style configure TSpinbox -padding {2 0 14 0}
  48. ttk::style map TSpinbox \
  49. -selectbackground [list !focus SystemWindow] \
  50. -selectforeground [list !focus SystemWindowText] \
  51. ;
  52. ttk::style configure Toolbutton -padding {4 4}
  53. # Treeview:
  54. ttk::style configure Heading -font TkHeadingFont -relief raised
  55. ttk::style configure Treeview -background SystemWindow
  56. ttk::style map Treeview \
  57. -background [list disabled SystemButtonFace \
  58. {!disabled !selected} SystemWindow \
  59. selected SystemHighlight] \
  60. -foreground [list disabled SystemGrayText \
  61. {!disabled !selected} SystemWindowText \
  62. selected SystemHighlightText];
  63. }
  64. }