diff options
author | seandeelywoods <seandeelywoods> | 2015-03-13 23:10:18 (GMT) |
---|---|---|
committer | seandeelywoods <seandeelywoods> | 2015-03-13 23:10:18 (GMT) |
commit | 20c81b194394bb6ea16d1831f6f895b63477819c (patch) | |
tree | 7b09fcdd831c2965e1caa2304724ede4c8ccd260 /macosx/ttkMacOSXTheme.c | |
parent | b08252af5c9e7fd54402875ba3e86123d0911154 (diff) | |
parent | ea4c865b315c006abca19443f5c06ec5d06e2421 (diff) | |
download | tk-20c81b194394bb6ea16d1831f6f895b63477819c.zip tk-20c81b194394bb6ea16d1831f6f895b63477819c.tar.gz tk-20c81b194394bb6ea16d1831f6f895b63477819c.tar.bz2 |
Merging with the latest release
Diffstat (limited to 'macosx/ttkMacOSXTheme.c')
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index a4abc7b..4753a40 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -294,21 +294,12 @@ static Ttk_StateTable TabPositionTable[] = { * TP30000359-TPXREF116> */ - -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) { - 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; + *heightPtr = GetThemeMetric(kThemeMetricLargeTabHeight, heightPtr); + *paddingPtr = Ttk_MakePadding(0, 0, 0, 2); } @@ -327,7 +318,6 @@ static void TabElementDraw( .position = Ttk_StateTableLookup(TabPositionTable, state), }; - bounds.size.height += TAB_OVERLAP; BEGIN_DRAWING(d) ChkErr(HIThemeDrawTab, &bounds, &info, dc.context, HIOrientation, NULL); END_DRAWING @@ -365,8 +355,8 @@ static void PaneElementDraw( .adornment = kHIThemeTabPaneAdornmentNormal, }; - bounds.origin.y -= TAB_OVERLAP; - bounds.size.height += TAB_OVERLAP; + bounds.origin.y -= kThemeMetricTabFrameOverlap; + bounds.size.height += kThemeMetricTabFrameOverlap; BEGIN_DRAWING(d) ChkErr(HIThemeDrawTabPane, &bounds, &info, dc.context, HIOrientation); END_DRAWING @@ -528,6 +518,10 @@ static Ttk_ElementSpec ComboboxElementSpec = { ComboboxElementDraw }; + + + + /*---------------------------------------------------------------------- * +++ Spinbuttons. * @@ -600,6 +594,7 @@ static TrackElementData ScaleData = { kThemeSlider, kThemeMetricHSliderHeight }; + typedef struct { Tcl_Obj *fromObj; /* minimum value */ Tcl_Obj *toObj; /* maximum value */ @@ -661,6 +656,7 @@ static void TrackElementDraw( info.trackInfo.slider.thumbDir = kThemeThumbPlain; } + BEGIN_DRAWING(d) ChkErr(HIThemeDrawTrack, &info, NULL, dc.context, HIOrientation); END_DRAWING |