winTheme.tcl 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. -troughcolor SystemScrollbar \
  12. -font TkDefaultFont \
  13. ;
  14. ttk::style map "." -foreground [list disabled SystemGrayText] ;
  15. ttk::style map "." -embossed [list disabled 1] ;
  16. ttk::style configure TButton \
  17. -anchor center -width -11 -relief raised -shiftrelief 1
  18. ttk::style configure TCheckbutton -padding "2 4"
  19. ttk::style configure TRadiobutton -padding "2 4"
  20. ttk::style configure TMenubutton \
  21. -padding "8 4" -arrowsize 3 -relief raised
  22. ttk::style map TButton -relief {{!disabled pressed} sunken}
  23. ttk::style configure TEntry \
  24. -padding 2 -selectborderwidth 0 -insertwidth 1
  25. ttk::style map TEntry \
  26. -fieldbackground \
  27. [list readonly SystemButtonFace disabled SystemButtonFace] \
  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. -fieldbackground [list \
  36. readonly SystemButtonFace \
  37. disabled SystemButtonFace] \
  38. -foreground [list \
  39. disabled SystemGrayText \
  40. {readonly focus} SystemHighlightText \
  41. ] \
  42. -focusfill [list {readonly focus} SystemHighlight] \
  43. ;
  44. ttk::style element create ComboboxPopdownFrame.border from default
  45. ttk::style configure ComboboxPopdownFrame \
  46. -borderwidth 1 -relief solid
  47. ttk::style configure TSpinbox -padding {2 0 16 0}
  48. ttk::style configure TLabelframe -borderwidth 2 -relief groove
  49. ttk::style configure Toolbutton -relief flat -padding {8 4}
  50. ttk::style map Toolbutton -relief \
  51. {disabled flat selected sunken pressed sunken active raised}
  52. ttk::style configure TScale -groovewidth 4
  53. ttk::style configure TNotebook -tabmargins {2 2 2 0}
  54. ttk::style configure TNotebook.Tab -padding {3 1} -borderwidth 1
  55. ttk::style map TNotebook.Tab -expand [list selected {2 2 2 0}]
  56. # Treeview:
  57. ttk::style configure Heading -font TkHeadingFont -relief raised
  58. ttk::style configure Treeview -background SystemWindow
  59. ttk::style map Treeview \
  60. -background [list selected SystemHighlight] \
  61. -foreground [list selected SystemHighlightText] ;
  62. ttk::style configure TProgressbar \
  63. -background SystemHighlight -borderwidth 0 ;
  64. }
  65. }