diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-10-23 07:39:03 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-10-23 07:39:03 (GMT) |
commit | eb2910e329d4314bc9bec018d534ea412f3e6916 (patch) | |
tree | e3a5b11b190a9a0a0c70b9e0204b5444a4c24508 /win/tkWinScrlbr.c | |
parent | 5caad6334049eea1df6fa474c4b2534c22718860 (diff) | |
download | tk-eb2910e329d4314bc9bec018d534ea412f3e6916.zip tk-eb2910e329d4314bc9bec018d534ea412f3e6916.tar.gz tk-eb2910e329d4314bc9bec018d534ea412f3e6916.tar.bz2 |
Backport of ::tk::mac::useCompatibilityMetrics handling and scrollbar metrics handling from trunk
Diffstat (limited to 'win/tkWinScrlbr.c')
-rw-r--r-- | win/tkWinScrlbr.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c index 5032912..2ec6883 100644 --- a/win/tkWinScrlbr.c +++ b/win/tkWinScrlbr.c @@ -52,18 +52,11 @@ typedef struct WinScrollbar { static int initialized = 0; static int hArrowWidth, hThumb; /* Horizontal control metrics. */ -static int vArrowWidth, vArrowHeight, vThumb; /* Vertical control metrics. */ +static int vArrowHeight, vThumb; /* Vertical control metrics. */ TCL_DECLARE_MUTEX(winScrlbrMutex) /* - * This variable holds the default width for a scrollbar in string form for - * use in a Tk_ConfigSpec. - */ - -static char defWidth[TCL_INTEGER_SPACE]; - -/* * Declarations for functions defined in this file. */ @@ -361,21 +354,14 @@ TkpDestroyScrollbar( void UpdateScrollbarMetrics(void) { - Tk_ConfigSpec *specPtr; + int arrowWidth = GetSystemMetrics(SM_CXVSCROLL); hArrowWidth = GetSystemMetrics(SM_CXHSCROLL); hThumb = GetSystemMetrics(SM_CXHTHUMB); - vArrowWidth = GetSystemMetrics(SM_CXVSCROLL); vArrowHeight = GetSystemMetrics(SM_CYVSCROLL); vThumb = GetSystemMetrics(SM_CYVTHUMB); - sprintf(defWidth, "%d", vArrowWidth); - for (specPtr = tkpScrollbarConfigSpecs; specPtr->type != TK_CONFIG_END; - specPtr++) { - if (specPtr->offset == Tk_Offset(TkScrollbar, width)) { - specPtr->defValue = defWidth; - } - } + sprintf(tkDefScrollbarWidth, "%d", arrowWidth); } /* |