winTheme.tcl 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #
  2. # Settings for 'winnative' theme.
  3. #
  4. namespace eval ttk::theme::winnative {
  5. ttk::style theme settings winnative {
  6. ttk::style configure "." \
  7. -background SystemButtonFace \
  8. -foreground SystemWindowText \
  9. -selectforeground SystemHighlightText \
  10. -selectbackground SystemHighlight \
  11. -fieldbackground SystemWindow \
  12. -insertcolor SystemWindowText \
  13. -troughcolor SystemScrollbar \
  14. -font TkDefaultFont \
  15. ;
  16. ttk::style map "." -foreground [list disabled SystemGrayText] ;
  17. ttk::style map "." -embossed [list disabled 1] ;
  18. ttk::style configure TButton \
  19. -anchor center -width -11 -relief raised -shiftrelief 1
  20. ttk::style configure TCheckbutton -padding "2 4"
  21. ttk::style configure TRadiobutton -padding "2 4"
  22. ttk::style configure TMenubutton \
  23. -padding "8 4" -arrowsize 3 -relief raised
  24. ttk::style map TButton -relief {{!disabled pressed} sunken}
  25. ttk::style configure TEntry \
  26. -padding 2 -selectborderwidth 0 -insertwidth 1
  27. ttk::style map TEntry \
  28. -fieldbackground \
  29. [list readonly SystemButtonFace disabled SystemButtonFace] \
  30. -selectbackground [list !focus SystemWindow] \
  31. -selectforeground [list !focus SystemWindowText] \
  32. ;
  33. ttk::style configure TCombobox -padding 2
  34. ttk::style map TCombobox \
  35. -selectbackground [list !focus SystemWindow] \
  36. -selectforeground [list !focus SystemWindowText] \
  37. -fieldbackground [list \
  38. readonly SystemButtonFace \
  39. disabled SystemButtonFace] \
  40. -foreground [list \
  41. disabled SystemGrayText \
  42. {readonly focus} SystemHighlightText \
  43. ] \
  44. -focusfill [list {readonly focus} SystemHighlight] \
  45. ;
  46. ttk::style element create ComboboxPopdownFrame.border from default
  47. ttk::style configure ComboboxPopdownFrame \
  48. -borderwidth 1 -relief solid
  49. ttk::style configure TSpinbox -padding {2 0 16 0}
  50. ttk::style configure TLabelframe -borderwidth 2 -relief groove
  51. ttk::style configure Toolbutton -relief flat -padding {8 4}
  52. ttk::style map Toolbutton -relief \
  53. {disabled flat selected sunken pressed sunken active raised}
  54. ttk::style configure TScale -groovewidth 4
  55. ttk::style configure TNotebook -tabmargins {2 2 2 0}
  56. ttk::style configure TNotebook.Tab -padding {3 1} -borderwidth 1
  57. ttk::style map TNotebook.Tab -expand [list selected {2 2 2 0}]
  58. # Treeview:
  59. ttk::style configure Heading -font TkHeadingFont -relief raised
  60. ttk::style configure Treeview -background SystemWindow
  61. ttk::style map Treeview \
  62. -background [list disabled SystemButtonFace \
  63. selected SystemHighlight] \
  64. -foreground [list disabled SystemGrayText \
  65. selected SystemHighlightText]
  66. ttk::style configure TProgressbar \
  67. -background SystemHighlight -borderwidth 0 ;
  68. }
  69. }