Skip to content

Commit

Permalink
scaleutil.tcl: Changes related to ttk::notebook in Windows themes, du…
Browse files Browse the repository at this point in the history
…e to limitations of the scaling support in the Visual Styles API.
  • Loading branch information
csaba committed Nov 3, 2023
1 parent 61ba7a9 commit 4561340
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
16 changes: 0 additions & 16 deletions modules/scrollutil/scripts/utils/scaleutil.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,6 @@ proc scaleutil::scaleStyles_vista pct {
ttk::style configure $style -padding [scale 2 $pct]
}

set m [scale 2 $pct]
set margins [list $m $m $m 0] ;# {2 2 2 0}
ttk::style configure TNotebook -tabmargins $margins
set margins [list $m $m $m $m] ;# {2 2 2 2}
ttk::style map TNotebook.Tab -expand [list selected $margins]

set padding [list [scale 4 $pct] 0 0 0] ;# {4 0 0 0}
ttk::style configure Item -padding $padding
ttk::style configure Treeview -indent [scale 20 $pct]
Expand Down Expand Up @@ -711,12 +705,8 @@ proc scaleutil::scaleStyles_winnative pct {
ttk::style configure $style -padding $padding
}

set m [scale 2 $pct]
set margins [list $m $m $m 0] ;# {2 2 2 0}
ttk::style configure TNotebook -tabmargins $margins
ttk::style configure TNotebook.Tab \
-padding [list [scale 3 $pct] [scale 1 $pct]]
ttk::style map TNotebook.Tab -expand [list selected $margins]

set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l
set indMargins [list $l $t $r $b] ;# {2 2 4 2}
Expand Down Expand Up @@ -748,12 +738,6 @@ proc scaleutil::scaleStyles_xpnative pct {
ttk::style configure $style -padding [scale 2 $pct]
}

set m [scale 2 $pct]
set margins [list $m $m $m 0] ;# {2 2 2 0}
ttk::style configure TNotebook -tabmargins $margins
set margins [list $m $m $m $m] ;# {2 2 2 2}
ttk::style map TNotebook.Tab -expand [list selected $margins]

set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l
set indMargins [list $l $t $r $b] ;# {2 2 4 2}
ttk::style configure Item -diameter [scale 9 $pct] \
Expand Down
16 changes: 0 additions & 16 deletions modules/tablelist/scripts/utils/scaleutil.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,6 @@ proc scaleutil::scaleStyles_vista pct {
ttk::style configure $style -padding [scale 2 $pct]
}

set m [scale 2 $pct]
set margins [list $m $m $m 0] ;# {2 2 2 0}
ttk::style configure TNotebook -tabmargins $margins
set margins [list $m $m $m $m] ;# {2 2 2 2}
ttk::style map TNotebook.Tab -expand [list selected $margins]

set padding [list [scale 4 $pct] 0 0 0] ;# {4 0 0 0}
ttk::style configure Item -padding $padding
ttk::style configure Treeview -indent [scale 20 $pct]
Expand Down Expand Up @@ -711,12 +705,8 @@ proc scaleutil::scaleStyles_winnative pct {
ttk::style configure $style -padding $padding
}

set m [scale 2 $pct]
set margins [list $m $m $m 0] ;# {2 2 2 0}
ttk::style configure TNotebook -tabmargins $margins
ttk::style configure TNotebook.Tab \
-padding [list [scale 3 $pct] [scale 1 $pct]]
ttk::style map TNotebook.Tab -expand [list selected $margins]

set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l
set indMargins [list $l $t $r $b] ;# {2 2 4 2}
Expand Down Expand Up @@ -748,12 +738,6 @@ proc scaleutil::scaleStyles_xpnative pct {
ttk::style configure $style -padding [scale 2 $pct]
}

set m [scale 2 $pct]
set margins [list $m $m $m 0] ;# {2 2 2 0}
ttk::style configure TNotebook -tabmargins $margins
set margins [list $m $m $m $m] ;# {2 2 2 2}
ttk::style map TNotebook.Tab -expand [list selected $margins]

set l [scale 2 $pct]; set t $l; set r [scale 4 $pct]; set b $l
set indMargins [list $l $t $r $b] ;# {2 2 4 2}
ttk::style configure Item -diameter [scale 9 $pct] \
Expand Down

0 comments on commit 4561340

Please sign in to comment.