[issue42541] Tkinter colours wrong on MacOS universal2

2021-01-06 Thread E. Paine


E. Paine  added the comment:

This does not appear to be a problem anymore on Tk 8.6.11 so I think this issue 
can be closed.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2021-01-04 Thread Ned Deily


Ned Deily  added the comment:

As Ronald notes, as of 3.9.1, we are for the immediate future providing two 
macOS installer variants: the traditional 10.9+ Intel-64 variant that is built 
on 10.9 and includes Tk 8.6.8 and the new "experimental" 10.9+ "universal2" 
(Apple Silicon and Intel-64) variant built on macOS 11 which included Tk 
8.6.10. As the new universal2 variant gains more exposure over the next 
releases of 3.9.x, we hope to migrate to that being the recommended variant and 
start to deprecate the traditional 10.9 variant for 3.9.x.  For 3.10 
pre-releases, we are now only providing the "universal2" variant; the next 
alpha release. 3.10.0a4, should be available very shortly and its macOS 
installer is built with the just released Tk 8.6.11. I have only run some 
preliminary tests at the moment and there do seem to be some changes and 
possible regressions in our tests when using 8.6.11 instead of 8.6.10 but I 
will investigate further over the next day or so and open issues as needed. 
Feel free to download 3.10.
 0a4 and test away!

I did not see any issues with missing icons; with a Python framework build, 
Python and IDLE both run under app bundles with supplied icons amd that still 
seems to be working. Things may well be different for non-framework builds but 
they were before, too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2021-01-04 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

W.r.t. building on 10.9: until very recently (trunk and 3.9.1) Python didn’t 
check for symbol availability at runtime. Building on 10.9 is basically a 
workaround for that. 

The, for now experimental, “universal2” installer for 3.9.1 is build on Big Sur 
and includes Tk 8.6.10 (and we’ll track Tk releases now that we have a more 
modern build system).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2021-01-04 Thread Marc Culler


Marc Culler  added the comment:

Well, actually the release was announced today.

There was one bug fix which did not make it into the release but could possibly 
affect Python, due to the fact that Python is installed as a framework, and 
frameworks to not have icons.  I can supply a (1-line) patch if needed.  To 
test, import tkinter, create a tkinter.Tk object and open the "About Python" 
menu.  If the icon displayed on the About dialog looks like a folder then you 
need the patch.

Please let me know what happens when switching to dark mode.  My concern
arises from my understanding that python is being built with a macOS 10.9 SDK, 
which does not understand dark mode.  I don't know what will happen when 
running that code on a system which does support dark mode.  Since Tk can be 
build on Big Sur with a minimum target of 10.9 (and I recommend doing so) I 
think it should be OK. There may be warnings when linking _tkinter.so though.

I do not understand why the 10.9 SDK is needed, since I recently built Python 
3.9.0 on Big Sur, with a minimum target of 10.9, and did not see any 
significant issues.  (Well, maybe A few warnings from the posix module need 
investigation.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2021-01-04 Thread E. Paine


E. Paine  added the comment:

Note: Tcl/Tk 8.6.11 was released a few days ago (thanks Kevin/Marc!).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-03 Thread Marc Culler


Marc Culler  added the comment:

Yes, I can provide a good commit ID to work with.  Please give me a couple of 
days.  The current tip is almost an ideal choice.  There have been no Aqua bug 
reports for quite some time.  But now there is one new one (from Kevin) so I'd 
like to fix that, discuss with Kevin, and test.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-03 Thread Ned Deily


Ned Deily  added the comment:

I agree that moving forward (using an unreleased 8.6.10+ snapshot) is better 
than moving backwards (back to 8.6.9).  Perhaps Marc or Kevin can suggest Tcl 
and Tk dev heads to use.

--
nosy: +culler

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

It is possible to opt out of dark mode using a key in the Info.plist file. This 
can also be used in the Python.app hidden in the framework to globally disable 
support for dark mode.

I wouldn't switch back to 8.6.9, if only because that doesn't build properly on 
macOS 11 (and hence would make building the "univeral2" installer a lot 
harder). 

I'd rather use the tip of the 8.6.x branch for Tk to get the latest bug fixes 
(probably picking a specific commit to be able to reproduce the build).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-03 Thread E. Paine


E. Paine  added the comment:

> we should at least opt out of dark mode for IDLE
That still leaves tkinter almost unusable when dark mode is turned on. I am 
looking into solutions but am not hopeful (maybe we should ask Marc?).

@Ned, what are the alternatives if we decide 8.6.10 is not the way to go (do we 
go back to 8.6.8/9 or forward and use an arbitrary checkpoint assuming 8.6.11 
is not happening soon)? Also, are we intending to provide a universal2 
installer for 3.9.1 (i.e. we need to sort this asap)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is a duplicate of #38261.  I'm closing that other issue because this issue 
has more discussion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread Kevin Walzer


Kevin Walzer  added the comment:

Ned, I wish I knew. Marc and I are both now members of the TCT, and have had a 
few conversations around the release schedule, but the release schedule is more 
or less determined when one or two senior members of the TCT decide things are 
ready. We had some momentum toward an RC of 8.6.11 a few months ago, but that 
seems to have stalled out.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread Ned Deily


Ned Deily  added the comment:

Thanks for checking, Kevin. Is there any update on when we can expect a Tk 
8.6.11?  It's been over a year now since 8.6.10 and there have been so many 
macOS-related changes that have gone into Tk since then. It's really not fair 
to ask downstream packagers, like us for the python.org installers, or end 
users to build with an arbitrary checkpoint of the development branch. Even a 
beta 8.6.11 would be an improvement.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread Kevin Walzer


Kevin Walzer  added the comment:

This bug is not present in IDLE 3.9.0 when built against the tip of Tk 
core-8-6-branch. Marc Culler has done some work to fix the visual artifacts, 
and the work continues. The problem here is that Apple's API churn continually 
breaks parts of Tk with each new OS release, and there is large amount of work 
just to keep things working reasonably.

--
nosy: +wordtech

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread E. Paine


E. Paine  added the comment:

It seems to be some weird internal mismatch. Code modified from 
https://wiki.tcl-lang.org/page/Tk+differences+on+Mac+OS+X (see following) 
suggests that dark mode is not enabled for the window (and yet we are getting 
white foreground colours)

import tkinter as tk
root = tk.Tk()
print(root.tk.call("tk::unsupported::MacWindowStyle", "isdark", "."))

I presume this is a MacOS 11 issue. I will look into raising this with the Tk 
team.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

With some luck it might be possible to work around this. If it isn’t we should 
at least opt out of dark mode for IDLE by changing its Info.plist.


https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app

https://wiki.tcl-lang.org/page/Tk+differences+on+Mac+OS+X

BTW. @epaine: could you file an issue about this in the Tk tracker if you can 
reproduce it directly with Tk (without Tkinter)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread E. Paine


E. Paine  added the comment:

I just compiled Tk 8.6.10 and it has the same problems. So the question now is 
whether we work-around it in Tkinter/IDLE or close this issue as third party.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The problem seems to be that the window background doesn't adjust to dark mode, 
while the window contents does.  

I don't know if we should do something in Tkinter for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread E. Paine


E. Paine  added the comment:

Sorry, that was an important piece of information. It is worth noting that Text 
widgets correctly change background to black.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread E. Paine


E. Paine  added the comment:

> Are you running in dark mode?

Yes. It works fine in light mode.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Are you running in dark mode?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread E. Paine


Change by E. Paine :


Added file: 
https://bugs.python.org/file49646/Screenshot-2020-12-02-at-12-46-06.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42541] Tkinter colours wrong on MacOS universal2

2020-12-02 Thread E. Paine


New submission from E. Paine :

When using tkinter from the universal2 package, the colours are completely 
confused. Most text tries to white, even though the background is light and 
this makes text in Entries completely unreadable (where the background is 
white). This affects both Tk and Ttk.

The first included screenshot is of a simple script which just creates a Tk 
label and Ttk label. The second screenshot is of the IDLE 'open module' 
interface in which I have typed 'test' (though, you cannot see this).

The main problem is that I cannot check whether this is a Tkinter or Tk issue 
as ActiveTcl only offers 8.6.9 and I haven't yet compiled my own copy of Tk.

This is not a problem on the standard installer.

--
components: Tkinter, macOS
files: Screenshot from 2020-12-02 14-37-02.png
messages: 382315
nosy: epaine, ned.deily, ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Tkinter colours wrong on MacOS universal2
versions: Python 3.10, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49645/Screenshot from 2020-12-02 
14-37-02.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com