summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-04 21:37:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-04 21:37:30 (GMT)
commit19b8ee093c95c70bf0d8382bedf22aea3a1325aa (patch)
tree3c7103bea371066b8f4071b4ac2ab1d4cb3cfcd4
parent9a19a798482dfcedc151151cbebca1e676437798 (diff)
parentf5312f21552eeb863f2d46fec33b0e4d4fc2173d (diff)
downloadtk-19b8ee093c95c70bf0d8382bedf22aea3a1325aa.zip
tk-19b8ee093c95c70bf0d8382bedf22aea3a1325aa.tar.gz
tk-19b8ee093c95c70bf0d8382bedf22aea3a1325aa.tar.bz2
Merge 8.6
-rw-r--r--macosx/tkMacOSXMenu.c6
-rw-r--r--macosx/ttkMacOSXTheme.c34
-rwxr-xr-xunix/configure17
-rw-r--r--unix/tcl.m416
-rwxr-xr-xwin/configure8
-rw-r--r--win/rules.vc12
-rw-r--r--win/tcl.m411
7 files changed, 34 insertions, 70 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index f97d8e3..f63ef2e 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -728,7 +728,7 @@ TkpConfigureMenuEntry(
* The -background and -foreground options are now ignored in Aqua.
* See ticket [635167af14].
*/
-
+
NSDictionary fontAttributes = TkMacOSXNSFontAttributesForFont(
Tk_GetFontFromObj(mePtr->menuPtr->tkwin, fontPtr));
NSMutableDictionary *attributes = [fontAttributes mutableCopy];
@@ -755,10 +755,10 @@ TkpConfigureMenuEntry(
}
#else
-
+
NSDictionary *attributes = TkMacOSXNSFontAttributesForFont(
Tk_GetFontFromObj(mePtr->menuPtr->tkwin, fontPtr));
-
+
#endif
attributedTitle = [[NSAttributedString alloc] initWithString:title
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 8437aa6..2651537 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
}
diff --git a/unix/configure b/unix/configure
index 674cdee..1abf14d 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1430,8 +1430,7 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-tcl directory containing tcl configuration
(tclConfig.sh)
- --with-encoding encoding for configuration values (default:
- iso8859-1)
+ --with-encoding encoding for configuration values (default: utf-8)
--with-x use the X Window System
Some influential environment variables:
@@ -3511,7 +3510,7 @@ _ACEOF
else
-$as_echo "#define TCL_CFGVAL_ENCODING \"iso8859-1\"" >>confdefs.h
+$as_echo "#define TCL_CFGVAL_ENCODING \"utf-8\"" >>confdefs.h
fi
@@ -3526,14 +3525,6 @@ else
tcl_ok=yes
fi
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
$as_echo "shared" >&6; }
@@ -4513,7 +4504,7 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- CYGWIN_*)
+ CYGWIN_*|MINGW32_*|MSYS_*)
SHLIB_CFLAGS="-fno-common"
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
@@ -5762,7 +5753,7 @@ fi
case $system in
AIX-*) ;;
BSD/OS*) ;;
- CYGWIN_*) ;;
+ CYGWIN_*|MINGW32_*|MSYS_*) ;;
HP_UX*) ;;
Darwin-*) ;;
IRIX*) ;;
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 8ee17e1..c9d9e3a 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -511,14 +511,6 @@ AC_DEFUN([SC_ENABLE_SHARED], [
AC_HELP_STRING([--enable-shared],
[build and link with shared libraries (default: on)]),
[tcl_ok=$enableval], [tcl_ok=yes])
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
AC_MSG_RESULT([shared])
SHARED_BUILD=1
@@ -1083,7 +1075,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- CYGWIN_*)
+ CYGWIN_*|MINGW32_*|MSYS_*)
SHLIB_CFLAGS="-fno-common"
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
@@ -1783,7 +1775,7 @@ dnl # preprocessing tests use only CPPFLAGS.
case $system in
AIX-*) ;;
BSD/OS*) ;;
- CYGWIN_*) ;;
+ CYGWIN_*|MINGW32_*|MSYS_*) ;;
HP_UX*) ;;
Darwin-*) ;;
IRIX*) ;;
@@ -2445,14 +2437,14 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
AC_DEFUN([SC_TCL_CFG_ENCODING], [
AC_ARG_WITH(encoding,
AC_HELP_STRING([--with-encoding],
- [encoding for configuration values (default: iso8859-1)]),
+ [encoding for configuration values (default: utf-8)]),
with_tcencoding=${withval})
if test x"${with_tcencoding}" != x ; then
AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}",
[What encoding should be used for embedded configuration info?])
else
- AC_DEFINE(TCL_CFGVAL_ENCODING,"iso8859-1",
+ AC_DEFINE(TCL_CFGVAL_ENCODING,"utf-8",
[What encoding should be used for embedded configuration info?])
fi
])
diff --git a/win/configure b/win/configure
index c7c59ef..9748e8e 100755
--- a/win/configure
+++ b/win/configure
@@ -3655,14 +3655,6 @@ else
tcl_ok=yes
fi
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
$as_echo "shared" >&6; }
diff --git a/win/rules.vc b/win/rules.vc
index f3e5439..ab43909 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1481,18 +1481,6 @@ lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
lflags = $(lflags) -nodefaultlib:libucrt.lib
!endif
-# Old linkers (Visual C++ 6 in particular) will link for fast loading
-# on Win98. Since we do not support Win98 any more, we specify nowin98
-# as recommended for NT and later. However, this is only required by
-# IX86 on older compilers and only needed if we are not doing a static build.
-
-!if "$(MACHINE)" == "IX86" && !$(STATIC_BUILD)
-!if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)]
-# Align sections for PE size savings.
-lflags = $(lflags) -opt:nowin98
-!endif
-!endif
-
dlllflags = $(lflags) -dll
conlflags = $(lflags) -subsystem:console
guilflags = $(lflags) -subsystem:windows
diff --git a/win/tcl.m4 b/win/tcl.m4
index 8c2228d..fa21b2d 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -358,14 +358,6 @@ AC_DEFUN([SC_ENABLE_SHARED], [
AC_ARG_ENABLE(shared,
[ --enable-shared build and link with shared libraries (default: on)],
[tcl_ok=$enableval], [tcl_ok=yes])
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
AC_MSG_RESULT([shared])
SHARED_BUILD=1
@@ -1085,8 +1077,7 @@ AC_DEFUN([SC_TCL_CFG_ENCODING], [
if test x"${with_tcencoding}" != x ; then
AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}")
else
- # Default encoding on windows is not "iso8859-1"
- AC_DEFINE(TCL_CFGVAL_ENCODING,"cp1252")
+ AC_DEFINE(TCL_CFGVAL_ENCODING,"utf-8")
fi
])