ladybird/Documentation
Nico Weber 98637bd549 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
2021-01-20 10:28:27 +01:00
..
Browser LibWeb: Rename WebContentView => OutOfProcessWebView 2020-08-17 18:05:35 +02:00
BuildInstructions.md Documentation: Add patch to fedora build deps (#4968) 2021-01-17 08:08:11 +01:00
CLionConfiguration.md Meta: Update CLion and WSL configuration documentations 2020-05-17 23:07:35 +02:00
CodingStyle.md Meta+Docs+CI: Require clang-format >= 11 2020-12-31 21:51:00 +01:00
HardwareCompatibility.md Meta: Add Hardware Compatbility List 2020-12-16 17:30:09 +01:00
HighDPI.md WindowServer: In HighDPI mode, load high-res window buttons and high-res cursors 2021-01-20 10:28:27 +01:00
INSTALL.md Meta: Update install guide with link to hardware compatibility list 2020-12-24 11:02:43 +01:00
NotesOnWSL.md Docs: Update WSL notes with some workarounds for known issues 2020-12-30 20:31:30 +01:00
SmartPointers.md Documentation: Tweak document about smart pointers a bit 2020-03-20 14:41:02 +01:00
UsingQtCreator.md Documentation: Make serenity.includes more easily copyable 2021-01-15 21:51:19 +01:00
VirtualBox.md Documentation: Add an installation guide for VirtualBox 2020-08-05 10:52:48 +02:00
VirtualBox_Creation_Reference.png Documentation: Add an installation guide for VirtualBox 2020-08-05 10:52:48 +02:00