summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/Cursor.cpp
AgeCommit message (Collapse)Author
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()Andreas Kling
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-09-04Cursors: Add new Magnifying glass cursorMustafa Quraish
There are a few places in the system where this could be useful, such as PixelPaint and the MandelBrot demo. It seems general enough that it is probably useful to have it as a system-wide cursor rather than loading it manually each time.
2021-09-04Cursors: Add new Eyedropper cursorMustafa Quraish
This can be used immediately in PixelPaint (separate commit), but I am adding this as a system-wide cursor since it may also be useful for other applications that want to use it.
2021-08-23WindowServer+LibGfx: Move CursorParams to LibGfxMaciej Zygmanowski
They will be used by MouseSettings in the next commit.
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-02AK+Everywhere: Remove StringView::find_{first,last}_of(char) methodsMax Wipfli
This removes StringView::find_first_of(char) and find_last_of(char) and replaces all its usages with find and find_last respectively. This is because those two methods are functionally equivalent. find_{first,last}_of should only be used if searching for multiple different characters, which is never the case with the char argument. This also adds the [[nodiscard]] to the remaining find_{first,last}_of methods.
2021-06-30AK: Remove the LexicalPath::is_valid() APIMax Wipfli
Since this is always set to true on the non-default constructor and subsequently never modified, it is somewhat pointless. Furthermore, there are arguably no invalid relative paths.
2021-06-21WindowServer: Fix animated cursor regressionTom
2021-06-20WindowServer: Load multiple scaled versions of Bitmaps and CursorsTom
This enables rendering of mixed-scale screen layouts with e.g. high resolution cursors and window button icons on high-dpi screens while using lower resolution bitmaps on regular screens.
2021-04-29Everywhere: "file name" => "filename"Andreas Kling
2021-04-23AK: Rename adopt() to adopt_ref()Andreas Kling
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-12WindowServer+LibGfx: Enumerate Disallow cursorthankyouverycool
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-01-22Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-20WindowServer: In HighDPI mode, load high-res window buttons and high-res cursorsNico Weber
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-12Services: Move to Userland/Services/Andreas Kling