diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-11-16 10:56:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-11-16 10:56:25 (GMT) |
commit | a9827f93eadc2978316098553e09406dae1f5520 (patch) | |
tree | 4c40167ca8b673d38459b4478944b8bc60cc4a7f | |
parent | bc52b8485678245b43a48cec01756c05b11fc17d (diff) | |
download | tk-a9827f93eadc2978316098553e09406dae1f5520.zip tk-a9827f93eadc2978316098553e09406dae1f5520.tar.gz tk-a9827f93eadc2978316098553e09406dae1f5520.tar.bz2 |
Add DEF_LABEL_FG for all platforms, not only MacOS. Backport some type-casts from 8.7
-rw-r--r-- | generic/tkButton.c | 5 | ||||
-rw-r--r-- | generic/tkGrab.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXDefault.h | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXInit.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 2 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 2 | ||||
-rw-r--r-- | unix/tkUnix3d.c | 8 | ||||
-rw-r--r-- | unix/tkUnixDefault.h | 1 | ||||
-rw-r--r-- | win/tkWinDefault.h | 1 |
9 files changed, 13 insertions, 12 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index 2c7d7d2..9e7c87d 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -104,13 +104,8 @@ static const Tk_OptionSpec labelOptionSpecs[] = { NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0}, -#ifdef DEF_LABEL_FG {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_LABEL_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0}, -#else - {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_BUTTON_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0}, -#endif {TK_OPTION_STRING, "-height", "height", "Height", DEF_BUTTON_HEIGHT, Tk_Offset(TkButton, heightPtr), -1, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", diff --git a/generic/tkGrab.c b/generic/tkGrab.c index a1ff46c..787a2e2 100644 --- a/generic/tkGrab.c +++ b/generic/tkGrab.c @@ -16,6 +16,8 @@ #include "tkWinInt.h" #elif !defined(MAC_OSX_TK) #include "tkUnixInt.h" +#else +#include "tkMacOSXInt.h" #endif /* diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 3a8eb92..5a5ccca 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -69,7 +69,7 @@ #define DEF_BUTTON_DISABLED_FG_COLOR DISABLED #define DEF_BUTTON_DISABLED_FG_MONO "" #define DEF_BUTTON_FG BLACK -#define DEF_LABEL_FG NORMAL_FG +#define DEF_LABEL_FG NORMAL_FG #define DEF_CHKRAD_FG DEF_LABEL_FG #define DEF_BUTTON_FONT "TkDefaultFont" #define DEF_BUTTON_HEIGHT "0" diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index bd0199a..53508aa 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -208,7 +208,7 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip, * matter what the actual OS version of the host may be. And of course * Apple never released macOS 10.16. To work around this we guess the * OS version from the kernel release number, as reported by uname. - */ + */ struct utsname name; char *endptr; diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index caebd7b..1093816 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -319,7 +319,7 @@ XUnmapWindow( for (NSWindow *w in [NSApp orderedWindows]) { TkWindow *winPtr2 = TkMacOSXGetTkWindow(w); WmInfo *wmInfoPtr; - + BOOL isOnScreen; if (!winPtr2 || !winPtr2->wmInfoPtr) { diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 3334356..52880ef 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1113,7 +1113,7 @@ static void DrawDarkTab( faceColor = [NSColor colorWithColorSpace: deviceRGB components: darkSelectedTab count: 4]; - } + } SolidFillRoundedRectangle(context, bounds, 4, faceColor); } HighlightButtonBorder(context, bounds); diff --git a/unix/tkUnix3d.c b/unix/tkUnix3d.c index 7ea67a1..2f2475b 100644 --- a/unix/tkUnix3d.c +++ b/unix/tkUnix3d.c @@ -4,7 +4,7 @@ * This file contains the platform specific routines for drawing 3d * borders in the Motif style. * - * Copyright (c) 1996 by Sun Microsystems, Inc. + * Copyright (c) 1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -13,7 +13,9 @@ #include "tkInt.h" #include "tk3d.h" -#if !(defined(_WIN32) || defined(MAC_OSX_TK)) +#if defined(MAC_OSX_TK) +#include "tkMacOSXInt.h" +#else #include "tkUnixInt.h" #endif @@ -46,7 +48,7 @@ typedef struct { TkBorder * TkpGetBorder(void) { - UnixBorder *borderPtr = ckalloc(sizeof(UnixBorder)); + UnixBorder *borderPtr = (UnixBorder *)ckalloc(sizeof(UnixBorder)); borderPtr->solidGC = NULL; return (TkBorder *) borderPtr; diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 3e9ef97..a3d50b6 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -54,6 +54,7 @@ #define DEF_BUTTON_DEFAULT "disabled" #define DEF_BUTTON_DISABLED_FG_COLOR DISABLED #define DEF_BUTTON_DISABLED_FG_MONO "" +#define DEF_LABEL_FG BLACK #define DEF_BUTTON_FG BLACK #define DEF_CHKRAD_FG DEF_BUTTON_FG #define DEF_BUTTON_FONT "TkDefaultFont" diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index 852de02..b03cbd7 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -59,6 +59,7 @@ #define DEF_BUTTON_DEFAULT "disabled" #define DEF_BUTTON_DISABLED_FG_COLOR DISABLED #define DEF_BUTTON_DISABLED_FG_MONO "" +#define DEF_LABEL_FG NORMAL_FG #define DEF_BUTTON_FG NORMAL_FG #define DEF_CHKRAD_FG TEXT_FG #define DEF_BUTTON_FONT "TkDefaultFont" |