This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2020-12-19.15:29:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608391787.71.0.662938082611.issue42685@roundup.psfhosted.org>
In-reply-to
Content
Currently simple query windows in Tkinter (such as tkinter.simpledialog.askinteger()) are placed at position 50 pixels right and 50 pixels below of the top left corner of the parent widget (even if it is not visible). If the parent is not specified, the initial position was determined by a windows manager before issue1538878, after issue1538878 it was placed at position 50 pixels right and 50 pixels below the default root widget (even if it is not visible).

Issue42630 restored the pre-issue1538878 behavior, but it is still has many quirks.

The proposed patch makes the placing algorithm similar to native Tk dialogs.

* If parent is specified and mapped, the query widget is centered at the center of parent. Its position and size can be corrected so that it fits in the virtual root window.
* Otherwise it is centered at the center of the screen.
History
Date User Action Args
2020-12-19 15:29:47serhiy.storchakasetrecipients: + serhiy.storchaka
2020-12-19 15:29:47serhiy.storchakasetmessageid: <1608391787.71.0.662938082611.issue42685@roundup.psfhosted.org>
2020-12-19 15:29:47serhiy.storchakalinkissue42685 messages
2020-12-19 15:29:47serhiy.storchakacreate