From 69ba874c4e95a12964168ce7c3c7d5b5b8e00186 Mon Sep 17 00:00:00 2001 From: csaba Date: Sat, 4 Nov 2023 11:07:26 +0000 Subject: [PATCH] scaleutil.tcl: Changes related to ttk::notebook in Windows themes, due to limitations of the scaling support in the Visual Styles API. --- modules/scrollutil/scripts/utils/scaleutil.tcl | 16 ---------------- modules/tablelist/scripts/utils/scaleutil.tcl | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/modules/scrollutil/scripts/utils/scaleutil.tcl b/modules/scrollutil/scripts/utils/scaleutil.tcl index 8a51a37e..8a6b79d7 100644 --- a/modules/scrollutil/scripts/utils/scaleutil.tcl +++ b/modules/scrollutil/scripts/utils/scaleutil.tcl @@ -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] @@ -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} @@ -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] \ diff --git a/modules/tablelist/scripts/utils/scaleutil.tcl b/modules/tablelist/scripts/utils/scaleutil.tcl index 8a51a37e..8a6b79d7 100644 --- a/modules/tablelist/scripts/utils/scaleutil.tcl +++ b/modules/tablelist/scripts/utils/scaleutil.tcl @@ -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] @@ -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} @@ -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] \