forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WindowServer: In HighDPI mode, load high-res window buttons and high-…
…res cursors Bitmap::load_from_file("foo.png", 2) will now look for "foo-2x.png" and try load that as a bitmap with scale factor 2 if it exists. If it doesn't, it falls back to the 1x bitmap as normal. Only places that know that they'll draw the bitmap to a 2x painter should pass "2" for the second argument. Use this new API in WindowServer for loading window buttons and cursors. As a testing aid, ctrl-shift-super-i can force HighDPI icons off in HighDPI mode. Toggling between low-res and high-res icons makes it easy to see if the high-res version of an icon looks right: It should look like the low-res version, just less jaggy. We'll likely have to grow a better API for loading scaled resources, but for now this suffices. Things to check: - `chres 640 480` followed by `chres 640 480 2` followed by `chres 640 480` - window buttons in window context menu (in task bar and on title bar) still have low-res icons - ctrl-shift-super-i in high-res mode toggles sharpness of window buttons and of arrow cursorf - arrow cursor hotspot is still where you'd expect
- Loading branch information
1 parent
5ad2cbe
commit 98637bd
Showing
8 changed files
with
86 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters