Best way to determine user's screensize?

2QdxY4RzWzUUiLuE at potatochowder.com 2QdxY4RzWzUUiLuE at potatochowder.com
Sat Oct 31 08:51:38 EDT 2020


On 2020-10-31 at 13:02:03 +0100,
"Peter J. Holzer" <hjp-python at hjp.at> wrote:

> On 2020-10-31 12:30:43 +1100, Chris Angelico wrote:

> > There is no valid way for an application to read my mind and size
> > itself. Attempting to query my screen size seems to just make things
> > worse in a lot of situations.

> You still haven't answered the question: Where should the initial
> window size come from? Does your window manager tell the application
> how large a window should be? And if it does, can you as a user
> configure that? I don't think mine (xfce) does that. (I guess tiling
> WMs generally do that, but I've never used one.)

The intial/default window should be big enough to contain the
initial/default content, regardless of the configuration of the
screen(s)/monitor(s).  "The GUI," whether it's something near the
bottom, like X11, or something more complicated, like GTK or Qt, should
have the information and/or the API to make the widgets usable and the
text readable, possibly based on user configuration (e.g., I like 6
point type on my 288dpi laptop display; other people might like 12 point
type on their 72dpi big screen monitor).


More information about the Python-list mailing list