summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-10-23 07:39:03 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-10-23 07:39:03 (GMT)
commitc38626d1adc195c2d87e1d6c16fa61ab473683a5 (patch)
treeb315a885a77d6fd35d85e99ec0823db2f294f6cd /win
parente053bd03f34f27fd2871e8275d281fb1277f98e8 (diff)
downloadtk-c38626d1adc195c2d87e1d6c16fa61ab473683a5.zip
tk-c38626d1adc195c2d87e1d6c16fa61ab473683a5.tar.gz
tk-c38626d1adc195c2d87e1d6c16fa61ab473683a5.tar.bz2
Backport of ::tk::mac::useCompatibilityMetrics handling and scrollbar metrics handling from trunk
Diffstat (limited to 'win')
-rw-r--r--win/tkWinButton.c7
-rw-r--r--win/tkWinScrlbr.c20
2 files changed, 5 insertions, 22 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index af1058d..f4d2d05 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.c
@@ -90,7 +90,7 @@ Tk_ClassProcs tkpButtonProcs = {
sizeof(Tk_ClassProcs), /* size */
TkButtonWorldChanged, /* worldChangedProc */
CreateProc, /* createProc */
- NULL
+ NULL /* modalProc */
};
@@ -181,10 +181,7 @@ InitBoxes(void)
*/
void
-TkpButtonSetDefaults(
- Tk_OptionSpec *specPtr) /* Points to an array of option specs,
- * terminated by one with type
- * TK_OPTION_END. */
+TkpButtonSetDefaults()
{
int width = GetSystemMetrics(SM_CXEDGE);
if (width > 0) {
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);
}
/*