[New-bugs-announce] [issue42685] Improve placing of simple query windows.

Serhiy Storchaka report at bugs.python.org
Sat Dec 19 10:29:47 EST 2020


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

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.

----------
components: Tkinter
messages: 383382
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Improve placing of simple query windows.
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42685>
_______________________________________


More information about the New-bugs-announce mailing list