From ee2b3bf1f8dde21c17795d277a8b708b8a29b8c0 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 08:59:53 +0000 Subject: Sync unix/tcl.m4 with Tcl --- unix/configure | 4 ++-- unix/tcl.m4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unix/configure b/unix/configure index 4a68870..43e9d1a 100755 --- a/unix/configure +++ b/unix/configure @@ -5146,7 +5146,7 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*) + CYGWIN_*|MINGW32_*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" @@ -7068,7 +7068,7 @@ fi case $system in AIX-*) ;; BSD/OS*) ;; - CYGWIN_*|MINGW32_*) ;; + CYGWIN_*|MINGW32_*|MSYS_*) ;; IRIX*) ;; NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index f4a3b8a..b01901b 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1247,7 +1247,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*) + CYGWIN_*|MINGW32_*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" @@ -2060,7 +2060,7 @@ dnl # preprocessing tests use only CPPFLAGS. case $system in AIX-*) ;; BSD/OS*) ;; - CYGWIN_*|MINGW32_*) ;; + CYGWIN_*|MINGW32_*|MSYS_*) ;; IRIX*) ;; NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; -- cgit v0.12 From 07850a4b2aed6dbaa1b3b4764fbddca31e084b93 Mon Sep 17 00:00:00 2001 From: culler Date: Fri, 4 Dec 2020 02:40:32 +0000 Subject: Fix [3ef77f434e]: Combobox focus ring is missing in Dark Mode. --- macosx/ttkMacOSXTheme.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 1e7797d..b4ba894 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1872,19 +1872,24 @@ static Ttk_ElementSpec EntryElementSpec = { * 1 pixel to account for the fact that the button is not centered. */ -static Ttk_Padding ComboboxPadding = {4, 2, 20, 2}; +static Ttk_Padding ComboboxPadding = {4, 4, 20, 4}; +static Ttk_Padding DarkComboboxPadding = {6, 6, 22, 6}; static void ComboboxElementSize( TCL_UNUSED(void *), TCL_UNUSED(void *), - TCL_UNUSED(Tk_Window), + Tk_Window tkwin, int *minWidth, int *minHeight, Ttk_Padding *paddingPtr) { *minWidth = 24; *minHeight = 23; - *paddingPtr = ComboboxPadding; + if (TkMacOSXInDarkMode(tkwin)) { + *paddingPtr = DarkComboboxPadding; + } else { + *paddingPtr = ComboboxPadding; + } } static void ComboboxElementDraw( @@ -1905,19 +1910,24 @@ static void ComboboxElementDraw( }; BEGIN_DRAWING(d) - bounds.origin.y += 1; if (TkMacOSXInDarkMode(tkwin)) { - bounds.size.height += 1; + bounds = CGRectInset(bounds, 3, 3); + if (state & TTK_STATE_FOCUS) { + DrawDarkFocusRing(bounds, dc.context); + } DrawDarkButton(bounds, info.kind, state, dc.context); - } else if ([NSApp macOSVersion] > 100800) { - if ((state & TTK_STATE_BACKGROUND) && - !(state & TTK_STATE_DISABLED)) { - NSColor *background = [NSColor textBackgroundColor]; - CGRect innerBounds = CGRectInset(bounds, 1, 2); - SolidFillRoundedRectangle(dc.context, innerBounds, 4, background); + } else { + if ([NSApp macOSVersion] > 100800) { + if ((state & TTK_STATE_BACKGROUND) && + !(state & TTK_STATE_DISABLED)) { + NSColor *background = [NSColor textBackgroundColor]; + CGRect innerBounds = CGRectInset(bounds, 1, 4); + bounds.origin.y += 1; + SolidFillRoundedRectangle(dc.context, innerBounds, 4, background); + } } + ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL); } - ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL); END_DRAWING } -- cgit v0.12 From f5312f21552eeb863f2d46fec33b0e4d4fc2173d Mon Sep 17 00:00:00 2001 From: culler Date: Fri, 4 Dec 2020 20:20:48 +0000 Subject: Fix segfault introduced by the fix for [4a40c6cace]. --- macosx/tkMacOSXWm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index c100d38..942a6f8 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -2894,9 +2894,11 @@ WmManageCmd( * See [4a40c6cace]. */ - winPtr->changes.x -= macWin->xOff; - winPtr->changes.y -= macWin->yOff; - XMoveWindow(winPtr->display, winPtr->window, 0, 0); + if (macWin) { + winPtr->changes.x -= macWin->xOff; + winPtr->changes.y -= macWin->yOff; + XMoveWindow(winPtr->display, winPtr->window, 0, 0); + } TkFocusSplit(winPtr); Tk_UnmapWindow(frameWin); -- cgit v0.12