Commit Graph

14 Commits

Author SHA1 Message Date
Dan Klishch
1f4b15dcaa LibGUI: Port rest of the classes to property deserializers 2024-01-06 09:15:37 -07:00
Ali Mohammad Pur
5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
tetektoza
d2995f7517 LibGUI: Add missing constructor to UISize class for fixed_size property
This patch adds a missing constructor to UISize class for fixed_size
property, so the property can take an array if user specified it
in .gml file.
2023-10-24 21:47:18 +02:00
Tim Ledbetter
c74f7e5f2a Userland: Don't use String::from_utf8() for literal strings 2023-09-15 08:44:52 +02:00
kleines Filmröllchen
e2dbce8fd7 LibGUI: Allow generating C++ "constructor" code for UIDimension
This will be used in the proper GML generator to initialize UI dimension
properties.
2023-08-11 21:33:48 +02:00
kleines Filmröllchen
d385adf6bd LibGUI: Don't silently create a 0 UIDimension when the JSON is invalid
The function already can report an invalid JSON value for the dimension,
so let's actually use that for when the number is too large or some
other invalid JSON type, like an object or a boolean, was passed.
2023-08-11 21:33:48 +02:00
Sam Atkins
2fce19a451 LibGUI: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-26 09:57:14 -05:00
Sam Atkins
1dd6b7f5b7 AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()
This is a preparatory step to making `get()` return `ErrorOr`.
2023-01-17 19:52:52 -05:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
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
FrHun
aba6422e11 LibGUI: Add read-only effective size properties for debugging
These new read-only properties help with debugging layouts, by exposing
the size values that are actually used for final size determination.
2022-06-28 17:52:42 +01:00
FrHun
68ad5f3780 LibGUI: Remove temporary compatibility measures for new layout system 2022-06-28 17:52:42 +01:00
FrHun
a4aced7f3a LibGUI: Introduce UIDimension properties 2022-06-28 17:52:42 +01:00
FrHun
024305e742 LibGUI: Add UIDimension and UISize types
These types are used to represent size information for layouts.
They can hold integer (int) values ≥0 or special values like shrink
and fit.
2022-06-28 17:52:42 +01:00