New submission from Serhiy Storchaka <storchaka+cpyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue42685>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to