diff options
author | fvogel <fvogelnew1@free.fr> | 2020-07-18 12:18:50 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-07-18 12:18:50 (GMT) |
commit | ac5b7e605129f0a9b06055347b1d1d0074ff1c95 (patch) | |
tree | f81e58f7bf0ff111ccd3414f965a76773a2ffbdf | |
parent | acc0ba4af690545c19ed138807c702d988839ce7 (diff) | |
download | tk-ac5b7e605129f0a9b06055347b1d1d0074ff1c95.zip tk-ac5b7e605129f0a9b06055347b1d1d0074ff1c95.tar.gz tk-ac5b7e605129f0a9b06055347b1d1d0074ff1c95.tar.bz2 |
In ttk layouts, specifying -expand 1 (resp. TTK_EXPAND) is superfluous when -side (resp. TTK_PACK_*) is not given. Remove such superfluous specifications.
-rw-r--r-- | doc/ttk_intro.n | 2 | ||||
-rw-r--r-- | generic/ttk/ttkButton.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkClamTheme.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkClassicTheme.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkEntry.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkScrollbar.c | 6 | ||||
-rw-r--r-- | library/ttk/vistaTheme.tcl | 14 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 14 | ||||
-rw-r--r-- | win/ttkWinTheme.c | 4 | ||||
-rw-r--r-- | win/ttkWinXPTheme.c | 12 |
10 files changed, 29 insertions, 31 deletions
diff --git a/doc/ttk_intro.n b/doc/ttk_intro.n index 06db167..f93cbe3 100644 --- a/doc/ttk_intro.n +++ b/doc/ttk_intro.n @@ -86,7 +86,7 @@ ttk::\fBstyle layout\fR Horizontal.TScrollbar { Scrollbar.trough \-children { Scrollbar.leftarrow \-side left \-sticky w Scrollbar.rightarrow \-side right \-sticky e - Scrollbar.thumb \-expand true \-sticky ew + Scrollbar.thumb \-sticky ew } } .CE diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c index 216b112..43855b2 100644 --- a/generic/ttk/ttkButton.c +++ b/generic/ttk/ttkButton.c @@ -855,7 +855,7 @@ TTK_BEGIN_LAYOUT(MenubuttonLayout) TTK_GROUP("Menubutton.border", TTK_FILL_BOTH, TTK_GROUP("Menubutton.focus", TTK_FILL_BOTH, TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT) - TTK_GROUP("Menubutton.padding", TTK_EXPAND|TTK_FILL_X, + TTK_GROUP("Menubutton.padding", TTK_FILL_X, TTK_NODE("Menubutton.label", TTK_PACK_LEFT)))) TTK_END_LAYOUT diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index 20b4b86..41a8f6d 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -959,7 +959,7 @@ TTK_BEGIN_LAYOUT_TABLE(LayoutTable) TTK_LAYOUT("TCombobox", TTK_NODE("Combobox.downarrow", TTK_PACK_RIGHT|TTK_FILL_Y) - TTK_GROUP("Combobox.field", TTK_FILL_BOTH|TTK_EXPAND, + TTK_GROUP("Combobox.field", TTK_FILL_BOTH, TTK_GROUP("Combobox.padding", TTK_FILL_BOTH, TTK_NODE("Combobox.textarea", TTK_FILL_BOTH)))) diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index 228d474..8436aec 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -457,7 +457,7 @@ TTK_LAYOUT("TMenubutton", TTK_GROUP("Menubutton.highlight", TTK_FILL_BOTH, TTK_GROUP("Menubutton.border", TTK_FILL_BOTH, TTK_NODE("Menubutton.indicator", TTK_PACK_RIGHT) - TTK_GROUP("Menubutton.padding", TTK_EXPAND|TTK_FILL_X, + TTK_GROUP("Menubutton.padding", TTK_FILL_X, TTK_NODE("Menubutton.label", 0))))) /* "classic" entry, includes highlight border */ diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 17287cc..bae4529 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -2072,7 +2072,7 @@ TTK_END_LAYOUT TTK_BEGIN_LAYOUT(ComboboxLayout) TTK_GROUP("Combobox.field", TTK_FILL_BOTH, TTK_NODE("Combobox.downarrow", TTK_PACK_RIGHT|TTK_FILL_Y) - TTK_GROUP("Combobox.padding", TTK_FILL_BOTH|TTK_EXPAND, + TTK_GROUP("Combobox.padding", TTK_FILL_BOTH, TTK_NODE("Combobox.textarea", TTK_FILL_BOTH))) TTK_END_LAYOUT diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c index 08ad56e..2c8d195 100644 --- a/generic/ttk/ttkScrollbar.c +++ b/generic/ttk/ttkScrollbar.c @@ -317,16 +317,14 @@ TTK_BEGIN_LAYOUT(VerticalScrollbarLayout) TTK_GROUP("Vertical.Scrollbar.trough", TTK_FILL_Y, TTK_NODE("Vertical.Scrollbar.uparrow", TTK_PACK_TOP) TTK_NODE("Vertical.Scrollbar.downarrow", TTK_PACK_BOTTOM) - TTK_NODE( - "Vertical.Scrollbar.thumb", TTK_EXPAND|TTK_FILL_BOTH)) + TTK_NODE("Vertical.Scrollbar.thumb", TTK_FILL_BOTH)) TTK_END_LAYOUT TTK_BEGIN_LAYOUT(HorizontalScrollbarLayout) TTK_GROUP("Horizontal.Scrollbar.trough", TTK_FILL_X, TTK_NODE("Horizontal.Scrollbar.leftarrow", TTK_PACK_LEFT) TTK_NODE("Horizontal.Scrollbar.rightarrow", TTK_PACK_RIGHT) - TTK_NODE( - "Horizontal.Scrollbar.thumb", TTK_EXPAND|TTK_FILL_BOTH)) + TTK_NODE("Horizontal.Scrollbar.thumb", TTK_FILL_BOTH)) TTK_END_LAYOUT /*------------------------------------------------------------------------ diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl index 094288c..06f9361 100644 --- a/library/ttk/vistaTheme.tcl +++ b/library/ttk/vistaTheme.tcl @@ -69,9 +69,9 @@ namespace eval ttk::theme::vista { ttk::style layout TCombobox { Combobox.border -sticky nswe -border 0 -children { Combobox.rightdownarrow -side right -sticky ns - Combobox.padding -expand 1 -sticky nswe -children { + Combobox.padding -sticky nswe -children { Combobox.background -sticky nswe -children { - Combobox.focus -expand 1 -sticky nswe -children { + Combobox.focus -sticky nswe -children { Combobox.textarea -sticky nswe } } @@ -138,7 +138,7 @@ namespace eval ttk::theme::vista { Spinbox.background -sticky news -children { Spinbox.padding -sticky news -children { Spinbox.innerbg -sticky news -children { - Spinbox.textarea -expand 1 + Spinbox.textarea } } Spinbox.uparrow -side top -sticky ens @@ -202,8 +202,8 @@ namespace eval ttk::theme::vista { TRACKBAR 3 {disabled 5 focus 4 pressed 3 active 2 {} 1} \ -width 6 -height 12 ttk::style layout Horizontal.TScale { - Scale.focus -expand 1 -sticky nswe -children { - Horizontal.Scale.trough -expand 1 -sticky nswe -children { + Scale.focus -sticky nswe -children { + Horizontal.Scale.trough -sticky nswe -children { Horizontal.Scale.track -sticky we Horizontal.Scale.slider -side left -sticky {} } @@ -213,8 +213,8 @@ namespace eval ttk::theme::vista { TRACKBAR 6 {disabled 5 focus 4 pressed 3 active 2 {} 1} \ -width 12 -height 6 ttk::style layout Vertical.TScale { - Scale.focus -expand 1 -sticky nswe -children { - Vertical.Scale.trough -expand 1 -sticky nswe -children { + Scale.focus -sticky nswe -children { + Vertical.Scale.trough -sticky nswe -children { Vertical.Scale.track -sticky ns Vertical.Scale.slider -side top -sticky {} } diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index c181fcb..cb2ead1 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -3049,20 +3049,20 @@ TTK_LAYOUT("TCombobox", /* Notebook tabs -- no focus ring */ TTK_LAYOUT("Tab", TTK_GROUP("Notebook.tab", TTK_FILL_BOTH, - TTK_GROUP("Notebook.padding", TTK_EXPAND | TTK_FILL_BOTH, - TTK_NODE("Notebook.label", TTK_EXPAND | TTK_FILL_BOTH)))) + TTK_GROUP("Notebook.padding", TTK_FILL_BOTH, + TTK_NODE("Notebook.label", TTK_FILL_BOTH)))) /* Spinbox -- buttons 2px to the right of the field. */ TTK_LAYOUT("TSpinbox", TTK_GROUP("Spinbox.buttons", TTK_PACK_RIGHT, TTK_NODE("Spinbox.uparrow", TTK_PACK_TOP | TTK_STICK_E) TTK_NODE("Spinbox.downarrow", TTK_PACK_BOTTOM | TTK_STICK_E)) - TTK_GROUP("Spinbox.field", TTK_EXPAND | TTK_FILL_X, - TTK_NODE("Spinbox.textarea", TTK_EXPAND | TTK_FILL_X))) + TTK_GROUP("Spinbox.field", TTK_FILL_X, + TTK_NODE("Spinbox.textarea", TTK_FILL_X))) /* Progress bars -- track only */ TTK_LAYOUT("TProgressbar", - TTK_NODE("Progressbar.track", TTK_EXPAND | TTK_FILL_BOTH)) + TTK_NODE("Progressbar.track", TTK_FILL_BOTH)) /* Treeview -- no border. */ TTK_LAYOUT("Treeview", @@ -3087,13 +3087,13 @@ TTK_LAYOUT("Item", TTK_LAYOUT("Vertical.TScrollbar", TTK_GROUP("Vertical.Scrollbar.trough", TTK_FILL_Y, - TTK_NODE("Vertical.Scrollbar.thumb", TTK_EXPAND | TTK_FILL_BOTH) + TTK_NODE("Vertical.Scrollbar.thumb", TTK_FILL_BOTH) TTK_NODE("Vertical.Scrollbar.downarrow", TTK_PACK_BOTTOM) TTK_NODE("Vertical.Scrollbar.uparrow", TTK_PACK_BOTTOM))) TTK_LAYOUT("Horizontal.TScrollbar", TTK_GROUP("Horizontal.Scrollbar.trough", TTK_FILL_X, - TTK_NODE("Horizontal.Scrollbar.thumb", TTK_EXPAND | TTK_FILL_BOTH) + TTK_NODE("Horizontal.Scrollbar.thumb", TTK_FILL_BOTH) TTK_NODE("Horizontal.Scrollbar.rightarrow", TTK_PACK_RIGHT) TTK_NODE("Horizontal.Scrollbar.leftarrow", TTK_PACK_RIGHT))) diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index fac77aa..bd066fc 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -686,8 +686,8 @@ TTK_LAYOUT("TButton", TTK_LAYOUT("TCombobox", TTK_GROUP("Combobox.field", TTK_FILL_BOTH, TTK_NODE("Combobox.downarrow", TTK_PACK_RIGHT|TTK_FILL_Y) - TTK_GROUP("Combobox.padding", TTK_EXPAND|TTK_FILL_BOTH, - TTK_GROUP("Combobox.focus", TTK_EXPAND|TTK_FILL_BOTH, + TTK_GROUP("Combobox.padding", TTK_FILL_BOTH, + TTK_GROUP("Combobox.focus", TTK_FILL_BOTH, TTK_NODE("Combobox.textarea", TTK_FILL_BOTH))))) TTK_END_LAYOUT_TABLE diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index 90863b9..22b371c 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -923,8 +923,8 @@ TTK_LAYOUT("TButton", TTK_LAYOUT("TMenubutton", TTK_NODE("Menubutton.dropdown", TTK_PACK_RIGHT|TTK_FILL_Y) - TTK_GROUP("Menubutton.button", TTK_EXPAND|TTK_FILL_BOTH, - TTK_GROUP("Menubutton.padding", TTK_EXPAND|TTK_FILL_X, + TTK_GROUP("Menubutton.button", TTK_FILL_BOTH, + TTK_GROUP("Menubutton.padding", TTK_FILL_X, TTK_NODE("Menubutton.label", 0)))) TTK_LAYOUT("Horizontal.TScrollbar", @@ -942,14 +942,14 @@ TTK_LAYOUT("Vertical.TScrollbar", TTK_NODE("Vertical.Scrollbar.grip", 0)))) TTK_LAYOUT("Horizontal.TScale", - TTK_GROUP("Scale.focus", TTK_EXPAND|TTK_FILL_BOTH, - TTK_GROUP("Horizontal.Scale.trough", TTK_EXPAND|TTK_FILL_BOTH, + TTK_GROUP("Scale.focus", TTK_FILL_BOTH, + TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH, TTK_NODE("Horizontal.Scale.track", TTK_FILL_X) TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT) ))) TTK_LAYOUT("Vertical.TScale", - TTK_GROUP("Scale.focus", TTK_EXPAND|TTK_FILL_BOTH, - TTK_GROUP("Vertical.Scale.trough", TTK_EXPAND|TTK_FILL_BOTH, + TTK_GROUP("Scale.focus", TTK_FILL_BOTH, + TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH, TTK_NODE("Vertical.Scale.track", TTK_FILL_Y) TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP) ))) |