Commit Graph

11 Commits

Author SHA1 Message Date
EvilHowl
a0c773da9e DisplaySettings: Show a confirmation message when applying changes
The changes will be reverted after 10 seconds of no user input.
2021-02-03 10:17:19 +01:00
Linus Groh
6b7c96589b Everywhere: Add missing parent window to about dialogs
Partially addresses #5177.
2021-01-30 13:42:39 +01:00
Nico Weber
2fe6a313c2 LibGfx: Implement blit_offset() in terms of blit()
It's less code, and blit() already handles scaled painters.

Fixes the window server asserting in highdpi mode with a centered
background image. Part of #5017.
2021-01-22 17:32:44 +01:00
Nico Weber
d7a3128c1d DisplaySettings: Add more resolution choices
These are 2x the smallest 4 resolutions. When picking one of these
in 1x and then half the size in 2x, the window server adjust the
ui scale factor, but the actual framebuffer size doesn't change.

2560x1440 also happens to be 5k resolution and monitors with that
resolution do exist -- so that seems like a good upper limit :)
2021-01-17 08:06:12 +01:00
Nico Weber
f37f281f89 DisplaySettings: Add UI for switching the scale factor
For now, only support 1x and 2x scale.

I tried doing something "smarter" first where the UI would try
to keep the physical resolution constant when toggling between
1x and 2x, but many of the smaller 1x resolutions map to 2x
logical resolutions that Compositor rejects (e.g. 1024x768 becomes
512x384, which is less than the minimum 640x480 that Compositor
wants) and it felt complicated and overly magical.

So this instead just gives you a 1x/2x toggle and a dropdown
with logical (!) resolutions. That is, 800x600 @ 2x gives you
a physical resolution of 1600x1200.

If we don't like this after trying it for a while, we can change
the UI then.
2021-01-17 08:06:12 +01:00
Andreas Kling
d312011708 Everywhere: Drop "shared_buffer" in most GUI programs, pledge "recvfd"
Now that WindowServer broadcasts the system theme using an anonymous
file, we need clients to pledge "recvfd" so they can receive it.

Some programs keep the "shared_buffer" pledge since it's still used for
a handful of things.
2021-01-16 19:30:32 +01:00
Nico Weber
63ac9462ad WindowServer: Add a "scale" parameter to the SetResolution message and plumb it through
Now, `chres 640 480 2` can set the UI to HighDPI 640x480 at runtime. A
real GUI for changing the display factor will come later.

(`chres 640 480 2` followed by `chres 1280 960` is very fast since
we don't have to re-allocate the framebuffer since both modes use
the exact same number of physical pixels.)
2021-01-15 22:05:08 +01:00
Nico Weber
9abcc2fb6c DisplaySettings: Fix a comment typo 2021-01-15 19:13:46 +01:00
Nico Weber
699ba84bea DisplaySettings: Rename wallpaper setting "scaled" to "stretch"
I want to add a scale factor for picking pixel density, and using
the same terminology for wallpaper handling would be confusing.
2021-01-15 19:13:46 +01:00
Andreas Kling
20915795a8 Everywhere: Pledge "sendfd" in WindowServer client programs
This is needed for the new way we transfer window backing stores.
2021-01-15 14:10:32 +01:00
Andreas Kling
dc28c07fa5 Applications: Move to Userland/Applications/ 2021-01-12 12:05:23 +01:00