diff options
author | csaba <csaba> | 2024-05-15 10:00:14 (GMT) |
---|---|---|
committer | csaba <csaba> | 2024-05-15 10:00:14 (GMT) |
commit | ece2290f0f187d183557c32e6c8834d1c965a349 (patch) | |
tree | ec4d3c813046405ebab3ada66b483e8f0c76a50d /generic/ttk | |
parent | b4fd0cbd901926eb56324d54de05aef042204384 (diff) | |
download | tk-ece2290f0f187d183557c32e6c8834d1c965a349.zip tk-ece2290f0f187d183557c32e6c8834d1c965a349.tar.gz tk-ece2290f0f187d183557c32e6c8834d1c965a349.tar.bz2 |
Scaling-related improvements in the "classic" theme.
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkClassicTheme.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index edc44f5..0494fa9 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -66,7 +66,8 @@ static void HighlightElementDraw( &defaultState); GC gc = Tk_GCForColor(highlightColor, d); if (defaultState == TTK_BUTTON_DEFAULT_NORMAL) { - TkDrawInsetFocusHighlight(tkwin, gc, highlightThickness, d, 5); + TkDrawInsetFocusHighlight(tkwin, gc, highlightThickness, d, + round(5 * TkScalingLevel(tkwin))); } else { Tk_DrawFocusHighlight(tkwin, gc, highlightThickness, d); } @@ -128,7 +129,7 @@ static void ButtonBorderElementSize( Ttk_GetButtonDefaultStateFromObj(NULL, bd->defaultStateObj, &defaultState); if (defaultState != TTK_BUTTON_DEFAULT_DISABLED) { - borderWidth += 5; + borderWidth += round(5 * TkScalingLevel(tkwin)); } *paddingPtr = Ttk_UniformPadding((short)borderWidth); } @@ -168,7 +169,7 @@ static void ButtonBorderElementDraw( case TTK_BUTTON_DEFAULT_DISABLED : break; case TTK_BUTTON_DEFAULT_NORMAL : - inset += 5; + inset += round(5 * TkScalingLevel(tkwin)); break; case TTK_BUTTON_DEFAULT_ACTIVE : Tk_Draw3DRectangle(tkwin, d, border, |