diff options
author | Kevin Walzer <kw@codebykevin.com> | 2014-10-28 14:40:24 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2014-10-28 14:40:24 (GMT) |
commit | 2de899be4f282336d57ace6810563233c87b13d6 (patch) | |
tree | d3510a942365222dcb41061a7d7157ebf344c797 | |
parent | 54070426c51de07c9a2e38b05571198f532de4ad (diff) | |
download | tk-2de899be4f282336d57ace6810563233c87b13d6.zip tk-2de899be4f282336d57ace6810563233c87b13d6.tar.gz tk-2de899be4f282336d57ace6810563233c87b13d6.tar.bz2 |
Fix for different ttk notebook tab metrics on OS X/Yosemite
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 5752fb1..a4abc7b 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -294,14 +294,22 @@ static Ttk_StateTable TabPositionTable[] = { * TP30000359-TPXREF116> */ -static const int TAB_HEIGHT = 10; -static const int TAB_OVERLAP = 10; + +int TAB_HEIGHT = 0; +int TAB_OVERLAP = 0; static void TabElementSize( void *clientData, void *elementRecord, Tk_Window tkwin, int *widthPtr, int *heightPtr, Ttk_Padding *paddingPtr) { - *heightPtr = TAB_HEIGHT + TAB_OVERLAP - 1; + TAB_HEIGHT = 10; + TAB_OVERLAP = 10; + /*Different metrics on 10.10/Yosemite.*/ + if (MAC_OS_X_VERSION_MIN_REQUIRED > 100000) { + TAB_OVERLAP = 5; + } + *heightPtr = TAB_HEIGHT + TAB_OVERLAP - 1; + } static void TabElementDraw( |