summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorcsaba <csaba>2023-11-05 16:08:37 (GMT)
committercsaba <csaba>2023-11-05 16:08:37 (GMT)
commita9c51043b69d0ed4d04761acb1eb5d166232cca3 (patch)
treed35822f8c6d7ecc01cd61077d6ef5d48fdb1b206 /win
parentfe2ec559ed6b54e2b693f74ca0dcfabb9776e6c0 (diff)
downloadtk-a9c51043b69d0ed4d04761acb1eb5d166232cca3.zip
tk-a9c51043b69d0ed4d04761acb1eb5d166232cca3.tar.gz
tk-a9c51043b69d0ed4d04761acb1eb5d166232cca3.tar.bz2
Minor improvement: The function TabElementSize() now takes into account the tab placement.
Diffstat (limited to 'win')
-rw-r--r--win/ttkWinTheme.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c
index 7f5450f..8def5e1 100644
--- a/win/ttkWinTheme.c
+++ b/win/ttkWinTheme.c
@@ -753,6 +753,21 @@ static void TabElementSize(
Tk_GetPixelsFromObj(0, tkwin, tab->borderWidthObj, &borderWidth);
*paddingPtr = Ttk_UniformPadding((short)borderWidth);
+ switch (nbTabsStickBit) {
+ default:
+ case TTK_STICK_S:
+ paddingPtr->bottom = 0;
+ break;
+ case TTK_STICK_N:
+ paddingPtr->top = 0;
+ break;
+ case TTK_STICK_E:
+ paddingPtr->right = 0;
+ break;
+ case TTK_STICK_W:
+ paddingPtr->left = 0;
+ break;
+ }
}
static void TabElementDraw(