Commit graph

8 commits

Author SHA1 Message Date
Timothy Flynn
c911781c21 Everywhere: Remove needless trailing semi-colons after functions
This is a new option in clang-format-16.
2023-07-08 10:32:56 +01:00
Jelle Raaijmakers
f391ccfe53 LibGfx+Everywhere: Change Gfx::Rect to be endpoint exclusive
Previously, calling `.right()` on a `Gfx::Rect` would return the last
column's coordinate still inside the rectangle, or `left + width - 1`.
This is called 'endpoint inclusive' and does not make a lot of sense for
`Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would
return 4 as its right side. This same problem exists for `.bottom()`.

This changes `Gfx::Rect` to be endpoint exclusive, which gives us the
nice property that `width = right - left` and `height = bottom - top`.
It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly
the same.

All users of `Gfx::Rect` have been updated accordingly.
2023-05-23 12:35:42 +02:00
Linus Groh
57dc179b1f Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
2022-12-06 08:54:33 +01:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
Ali Chraghi
1d080e1cda AnalogClock: Keep default alpha hit threshold 2022-04-06 11:36:15 +02:00
Linus Groh
f512b24b21 AnalogClock: Use YYYY-MM-DD format for window title 2021-05-14 20:17:09 +01:00
Brian Gianforcaro
1674d06f78 Userland: Allow the Analog Clock window border to be hidden
Introduce the ability to hide the Analog Clock window borde. With this
feature enabled it looks like the clock is floating and integrated into
the desktop.

The "Cube Demo" has the same feature, and was used as inspiration when
implementing the feature in the Analog Clock.
2021-05-10 12:36:05 +02:00
Erlend
4c43fc0515
AnalogClock: New analog clock application (#6760) 2021-05-09 15:51:36 +02:00