summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2014-10-28 14:42:40 (GMT)
committerKevin Walzer <kw@codebykevin.com>2014-10-28 14:42:40 (GMT)
commit90f1bb2871f27fb60b636b4b70b9b6e5f9dc3eda (patch)
tree0d1a24b0f4bbf57285a9a04fb7fb43dfe3e8d395
parent68b1adab93a62949022d34421ba9de70b87e1510 (diff)
downloadtk-90f1bb2871f27fb60b636b4b70b9b6e5f9dc3eda.zip
tk-90f1bb2871f27fb60b636b4b70b9b6e5f9dc3eda.tar.gz
tk-90f1bb2871f27fb60b636b4b70b9b6e5f9dc3eda.tar.bz2
Fix for different ttk notebook tab metrics on OS X/Yosemite
-rw-r--r--macosx/ttkMacOSXTheme.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 5752fb1..64b96cb 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -294,14 +294,21 @@ 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(