classification
Title: IDLE: use ttk.Frame for ttk widgets
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, markroseman, miss-islington, terry.reedy
Priority: normal Keywords: patch, patch, patch

Created on 2018-06-28 04:02 by markroseman, last changed 2020-10-25 03:58 by terry.reedy. This issue is now closed.

Files
File name Uploaded Description Edit
topframe.png markroseman, 2018-06-28 04:02
Pull Requests
URL Status Linked Edit
PR 11395 merged terry.reedy, 2018-12-31 22:12
PR 11419 merged miss-islington, 2019-01-03 03:04
PR 11433 merged cheryl.sabella, 2019-01-04 23:50
PR 22899 merged miss-islington, 2020-10-22 19:15
PR 22900 merged miss-islington, 2020-10-22 19:15
PR 22941 merged markroseman, 2020-10-24 15:05
PR 22942 merged markroseman, 2020-10-24 15:49
PR 22943 merged markroseman, 2020-10-24 16:09
PR 22949 merged miss-islington, 2020-10-24 23:32
PR 22950 merged miss-islington, 2020-10-24 23:33
PR 22951 merged miss-islington, 2020-10-24 23:45
PR 22952 merged miss-islington, 2020-10-24 23:45
PR 22956 merged miss-islington, 2020-10-25 03:14
PR 22957 merged miss-islington, 2020-10-25 03:14
Messages (20)
msg320646 - (view) Author: Mark Roseman (markroseman) * Date: 2018-06-28 04:02
When adding a bunch of ttk widgets into a toplevel window, there needs to be an intervening ttk.Frame to ensure the background of the widgets matches the overall background.

The reason is the 'toplevel' is part of the classic tk widgets and not ttk, so it isn't guaranteed to have the same background. In practice, the only platform where the toplevel and ttk.Frame have different backgrounds is macOS. Check out topframe.png for an example, top is without the intervening ttk.Frame, bottom adds it in.

(Adding bug mainly so we have a place to store a concrete example of what this looks like)
msg320800 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-06-30 18:08
The image could have been attached to #27477, but a new issue for a new PR is needed anyway.  I will make this a dependency of that issue.

I did not at first see the difference in the screen-capture images on my monitor in Firefox with the room lighting and my eye condition as it was then, but today I do.  On Mac, the defaulf ttk background is slightly darker than the default tk background.  (No so on Windows.)  It looks subtlely tacky.  I imagine this effect might be more obvious and annoying on the live screen.

As I mentioned elsewhere, this is a second reason to insert a frame inside Toplevel, but it is a reason to do this *now*.  Please submit a PR for this addition to searchbase: a new ttk Frame, with a bit of space added.  Please call it self.frame as in query or perhaps self.searchframe, analogous to viewframe in textview.

When SearchDialogBase is renamed SearchFrameBase(Frame) and the toplevel stuff moved to another class, self.???frame in the Frame subclass will become self, so the name will only appear in the toplevel class.

In test_searchbase.SearchDialogBaseTest.test_open_and_close, adding
        self.assertEqual(self.dialog.frame.state(), 'normal')
will test the change, failing now, passing with it.  I don't know of any other changes needed in files other than searchbase.

configdialog needs a similar PR.  config_key needs a complete ttk conversion.
msg332837 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-31 22:08
The change is trivial and there was already a Frame test, which initially failed.  I will open another issue about similar changes needed elsewhere.
msg332839 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-12-31 22:30
We don't really need a new issue.  Mark's opening post was generic.  I grepped for ttk to get existing ttk imports and am making Frame and LabelFrame the first item or items for each import.  I won't worry about whether any background is visible, as this could change.

Cheryl, please note the import convention and review the diff when posted.
msg332904 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-03 03:04
New changeset aff0adabf3ace62073076f4ce875ff568f2d3180 by Terry Jan Reedy in branch 'master':
bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
https://github.com/python/cpython/commit/aff0adabf3ace62073076f4ce875ff568f2d3180
msg332905 - (view) Author: miss-islington (miss-islington) Date: 2019-01-03 03:22
New changeset b364caa39999658e843151602356e527851d6c68 by Miss Islington (bot) in branch '3.7':
bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
https://github.com/python/cpython/commit/b364caa39999658e843151602356e527851d6c68
msg379321 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-22 18:57
I closed this prematurely. Cheryl's PR 11433 converts frames for help and statusbar.  My patch also omitted searchbase, perhaps because this I wanted to refactor at the same time.  In any case, the macOS appearance bug that motivated Mark's post remains, and a patch will have to make sure that the derived dialogs add frames inside the new master frame instead of the toplevel.

The message I deleted meant to say
#35598 converted config_key to ttk, including a ttk frame inside toplevel.
msg379324 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-22 19:14
New changeset facb522d44fceaf15de6bc95de1cd680c4621c2a by Cheryl Sabella in branch 'master':
bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433)
https://github.com/python/cpython/commit/facb522d44fceaf15de6bc95de1cd680c4621c2a
msg379331 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-22 19:58
New changeset 25687bbe0da160ebdd3cd422a01d677ce467e72e by Miss Skeleton (bot) in branch '3.9':
bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22899)
https://github.com/python/cpython/commit/25687bbe0da160ebdd3cd422a01d677ce467e72e
msg379332 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-22 19:58
New changeset 06c9e01c651c35c2e058eca0f7073dd405578f78 by Miss Skeleton (bot) in branch '3.8':
bpo-33987: IDLE: Use ttk Frame on doc window and statusbar (GH-11433) (GH-22900)
https://github.com/python/cpython/commit/06c9e01c651c35c2e058eca0f7073dd405578f78
msg379544 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-24 23:32
New changeset e53e54425d9b7b9b7b082817da104d60bb25e3a2 by Mark Roseman in branch 'master':
bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
https://github.com/python/cpython/commit/e53e54425d9b7b9b7b082817da104d60bb25e3a2
msg379545 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-24 23:45
New changeset c579ad14d3b5bb9a45d7b9cc708eaf0bf4884c50 by Mark Roseman in branch 'master':
bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
https://github.com/python/cpython/commit/c579ad14d3b5bb9a45d7b9cc708eaf0bf4884c50
msg379547 - (view) Author: miss-islington (miss-islington) Date: 2020-10-24 23:51
New changeset c1b620eecc2ca0f9ae9d5ee2d973e823db295ad2 by Miss Skeleton (bot) in branch '3.8':
bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
https://github.com/python/cpython/commit/c1b620eecc2ca0f9ae9d5ee2d973e823db295ad2
msg379548 - (view) Author: miss-islington (miss-islington) Date: 2020-10-24 23:53
New changeset 4efd2defb899c5c45334814234c842f8f513879e by Miss Skeleton (bot) in branch '3.9':
bpo-33987: Use ttk Label on IDLE statusbar (GH-22941)
https://github.com/python/cpython/commit/4efd2defb899c5c45334814234c842f8f513879e
msg379549 - (view) Author: miss-islington (miss-islington) Date: 2020-10-25 00:03
New changeset 253c8eb40ec5a87aa539f913fcd83d1759069981 by Miss Skeleton (bot) in branch '3.8':
bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
https://github.com/python/cpython/commit/253c8eb40ec5a87aa539f913fcd83d1759069981
msg379551 - (view) Author: miss-islington (miss-islington) Date: 2020-10-25 01:08
New changeset 2d493893c7aa9af633c4ebeb56ecce42e3a82e9f by Miss Skeleton (bot) in branch '3.9':
bpo-33987: Use master ttk Frame for IDLE config dialog (GH-22943)
https://github.com/python/cpython/commit/2d493893c7aa9af633c4ebeb56ecce42e3a82e9f
msg379557 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-25 03:14
New changeset 5df6c99cb450fe2f30be681dbf68cd1d34d3bbe4 by Mark Roseman in branch 'master':
bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
https://github.com/python/cpython/commit/5df6c99cb450fe2f30be681dbf68cd1d34d3bbe4
msg379558 - (view) Author: miss-islington (miss-islington) Date: 2020-10-25 03:36
New changeset 9cf26b00e42787bc668c62f1b5dde814f8307259 by Miss Skeleton (bot) in branch '3.9':
bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
https://github.com/python/cpython/commit/9cf26b00e42787bc668c62f1b5dde814f8307259
msg379559 - (view) Author: miss-islington (miss-islington) Date: 2020-10-25 03:41
New changeset 8485d3b911c3cb73ed6217a47c7720f9277efc01 by Miss Skeleton (bot) in branch '3.8':
bpo-33987: Add master ttk Frame to IDLE search dialogs (GH-22942)
https://github.com/python/cpython/commit/8485d3b911c3cb73ed6217a47c7720f9277efc01
msg379561 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-25 03:58
Thanks for hopefully finishing this issue.
History
Date User Action Args
2020-10-25 03:58:21terry.reedysetstatus: open -> closed
messages: + msg379561

keywords: patch, patch, patch
resolution: fixed
stage: patch review -> resolved
2020-10-25 03:41:29miss-islingtonsetmessages: + msg379559
2020-10-25 03:36:58miss-islingtonsetmessages: + msg379558
2020-10-25 03:14:34miss-islingtonsetpull_requests: + pull_request21875
2020-10-25 03:14:27miss-islingtonsetpull_requests: + pull_request21874
2020-10-25 03:14:05terry.reedysetmessages: + msg379557
2020-10-25 01:08:25miss-islingtonsetmessages: + msg379551
2020-10-25 00:03:40miss-islingtonsetmessages: + msg379549
2020-10-24 23:53:37miss-islingtonsetmessages: + msg379548
2020-10-24 23:51:07miss-islingtonsetmessages: + msg379547
2020-10-24 23:45:20miss-islingtonsetpull_requests: + pull_request21870
2020-10-24 23:45:13miss-islingtonsetpull_requests: + pull_request21869
2020-10-24 23:45:07terry.reedysetmessages: + msg379545
2020-10-24 23:33:07miss-islingtonsetpull_requests: + pull_request21868
2020-10-24 23:32:59miss-islingtonsetpull_requests: + pull_request21867
2020-10-24 23:32:42terry.reedysetmessages: + msg379544
2020-10-24 16:09:36markrosemansetpull_requests: + pull_request21861
2020-10-24 15:49:17markrosemansetpull_requests: + pull_request21860
2020-10-24 15:05:05markrosemansetpull_requests: + pull_request21859
2020-10-22 19:58:33terry.reedysetmessages: + msg379332
2020-10-22 19:58:08terry.reedysetmessages: + msg379331
2020-10-22 19:15:31miss-islingtonsetpull_requests: + pull_request21831
2020-10-22 19:15:22miss-islingtonsetstage: needs patch -> patch review
pull_requests: + pull_request21830
2020-10-22 19:14:44terry.reedysetmessages: + msg379324
2020-10-22 18:57:31terry.reedysetstatus: closed -> open
versions: + Python 3.9, Python 3.10, - Python 3.7
messages: + msg379321

keywords: patch, patch, patch
resolution: fixed -> (no value)
stage: resolved -> needs patch
2020-10-22 18:50:14terry.reedysetmessages: - msg332835
2019-01-04 23:58:18cheryl.sabellasetpull_requests: - pull_request10861
2019-01-04 23:58:05cheryl.sabellasetpull_requests: - pull_request10860
2019-01-04 23:50:45cheryl.sabellasetpull_requests: + pull_request10861
2019-01-04 23:50:37cheryl.sabellasetpull_requests: + pull_request10860
2019-01-04 23:50:28cheryl.sabellasetpull_requests: + pull_request10859
2019-01-03 05:59:25terry.reedysetkeywords: patch, patch, patch
status: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-01-03 03:22:14miss-islingtonsetnosy: + miss-islington
messages: + msg332905
2019-01-03 03:16:05terry.reedysetpull_requests: - pull_request10827
2019-01-03 03:15:47terry.reedysetpull_requests: - pull_request10828
2019-01-03 03:04:34miss-islingtonsetstage: test needed -> patch review
pull_requests: + pull_request10828
2019-01-03 03:04:29miss-islingtonsetstage: test needed -> test needed
pull_requests: + pull_request10827
2019-01-03 03:04:24miss-islingtonsetstage: test needed -> test needed
pull_requests: + pull_request10826
2019-01-03 03:04:10terry.reedysetmessages: + msg332904
2018-12-31 23:18:17terry.reedysetpull_requests: - pull_request10772
2018-12-31 23:18:02terry.reedysetpull_requests: - pull_request10773
2018-12-31 22:30:39terry.reedysetkeywords: patch, patch, patch

title: IDLE: add ttk.Frame inside searchbaseToplevel -> IDLE: use ttk.Frame for ttk widgets
messages: + msg332839
stage: patch review -> test needed
2018-12-31 22:13:00terry.reedysetkeywords: + patch
stage: test needed -> patch review
pull_requests: + pull_request10773
2018-12-31 22:12:53terry.reedysetkeywords: + patch
stage: test needed -> test needed
pull_requests: + pull_request10772
2018-12-31 22:12:45terry.reedysetkeywords: + patch
stage: test needed -> test needed
pull_requests: + pull_request10771
2018-12-31 22:08:47terry.reedysetnosy: + cheryl.sabella
messages: + msg332837
2018-12-31 21:38:45terry.reedysetmessages: + msg332835
2018-12-11 23:24:41terry.reedysetversions: - Python 3.6
2018-06-30 18:44:04terry.reedylinkissue27477 dependencies
2018-06-30 18:08:29terry.reedysettitle: need ttk.Frame inside Toplevel(s) -> IDLE: add ttk.Frame inside searchbaseToplevel
messages: + msg320800
stage: test needed
2018-06-28 04:02:30markrosemancreate