Druid: Window sizing coherency

Created on 29 Mar 2020  路  2Comments  路  Source: linebender/druid

When giving druid a window size (e.g. window_size or with_min_size) what is the expected result? Does that size include OS-styling (title bar and other borders) or is that size meant only for druid-addressable drawing area?

I think having it mean only the addressable drawing area makes the most sense if we want to achieve pixel perfect designs across platforms.

I tested macOS and Windows, haven't looked at Linux yet. On macOS the druid window size does determine the drawing area :+1: but on Windows the drawing area will be smaller because all the OS borders have to fit within the size constraints. :confused:

I think it is possible to change the behavior on Windows, perhaps with AdjustWindowRect and friends.

discussion shell

Most helpful comment

I think it is easiest to be consistent if 'size' refers to the content size of the window.

All 2 comments

I just checked and the GTK shell appears to correctly use window size to determine the drawable area size

I think it is easiest to be consistent if 'size' refers to the content size of the window.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

madig picture madig  路  5Comments

raphlinus picture raphlinus  路  4Comments

bheisler picture bheisler  路  5Comments

cmyr picture cmyr  路  3Comments

Finnerale picture Finnerale  路  5Comments