Age | Commit message (Collapse) | Author |
|
This is not guaranteed to always work correctly as ArgsParser deals in
StringViews and might have a non-properly-null-terminated string as a
value. As a bonus, using StringView (and DeprecatedString where
necessary) leads to nicer looking code too :^)
|
|
|
|
Either take the underlying objects with release_* methods or move() the
instances around.
|
|
Because usage of the input_type parameter is now higher than of the
placeholder parameter, this makes for a cleaner API.
|
|
Do this where we were already checking if the input was empty after the
InputBox was submitted. Those places gain interactive input validation.
:^)
|
|
Those don't have any non-try counterpart, so we might as well just omit
it.
|
|
|
|
It's the only one, so the `try` prefix is unnecessary now.
|
|
MOAR FIXMES! ;^)
|
|
Rip that bandaid off!
This does the following, in one big, awkward jump:
- Replace all uses of `set_main_widget<Foo>()` with the `try` version.
- Remove `set_main_widget<Foo>()`.
- Rename the `try` version to just be `set_main_widget` because it's now
the only one.
The majority of places that call `set_main_widget<Foo>()` are inside
constructors, so this unfortunately gives us a big batch of new
`release_value_but_fixme_should_propagate_errors()` calls.
|
|
Base+Userland: Add menu item icons
This adds missing icons to Presenter Presentation menu.
This adds missing icon to Image Viewer View menu.
This adds a scale icon for the Image Viewer and Font Editor.
This moves the Fit Image to View icon to the 16x16 folder as it's now
used by Image Viewer and not only Pixel Paint.
This improves the fullscreen and play icons so that they fit together
better.
|
|
|
|
Displays the current active Unicode block range, or, if multiple
glyphs are selected, their count. Clicking toggles the Unicode
block ListView.
|
|
Selections are always normalized when saving undo commands.
The restore_selection() function reverses this process so
negatively sized selections (created right-to-left) continue
to resize correctly with the keyboard when restored.
|
|
Provides a visual cue that arrow key input is shared between these
widgets.
|
|
|
|
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.
|
|
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 :^)
|
|
And write messages in the [action] failed: [error] format to match
common error message formatting elsewhere in Userland.
|
|
And TRY early during initialization in FontEditor to leave the app
in a valid state on error. Fixes OOM crashes when cloning the original
font for highlight modifications.
|
|
And remove their red backgrounds when visible to not be confused with
deletion highlights.
|
|
Like other apps, FontEditor now organizes widget visibility toggles
under a View->Layout submenu. The main toolbar and the status bar
can now be turned on and off.
|
|
|
|
|
|
|
|
|
|
This patch will switch cursor to DragCopy when a user enters a widget
while dragging file(s), giving them a visual clue that it *might* be
dropped into this widget.
This is a rather naive approach, as the cursor icon will change for any
kind of file, as currently programs don't know the drag contents before
dropping it. But after all I think it's better than nothing. :^)
|
|
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.
Also included are changes to readd now missing dependencies to tools
that actually need them.
|
|
|
|
We previously put the generated headers in SOURCES, which did not mark
them as GENERATED (and did not produce a proper dependency).
This commit moves all generated headers into GENERATED_SOURCES, and
removes useless header SOURCES.
|
|
URL had properly named replacements for protocol(), set_protocol() and
create_with_file_protocol() already. This patch removes these function
and updates all call sites to use the functions named according to the
specification.
See https://url.spec.whatwg.org/#concept-url-scheme
|
|
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move
the UCD data to the main LibUnicode library, and rename LibUnicodeData
to LibLocaleData. This is another prepatory change to migrate to
LibLocale.
|
|
with the RenderAbove WindowMode. This mode will ensure child
windows always draw above their parents, even when focus is lost.
RenderAbove modals are automatically themed the same as the old
ToolWindows. Fixes ToolWindows rendering above ALL normal windows,
regardless of parent. We can't rely on WindowType to create these
sort of effects because of WindowManager's strict display hierarchy.
|
|
Co-authored-by: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com>
|
|
|
|
This means that if you modify a glyph, then undo that modification, we
stop showing the glyph as modified.
|
|
This patch replaces the concept of fixed resizees with opportunistic
ones which use the new SpecialDimension::OpportunisticGrow UISize.
This lets us simplify splitter resize code and take advantage of
the layout system's automatic calculations for minimum size and
expansion. Functionally the same as before, but fixes Splitter's
unintended ability to grow window size.
|
|
Some Toolbars for FileManager, FontEditor and PixelPaint can now
collapse on resize.
|
|
Fixes potential OOM crashes when creating a new font and an oversight
in which glyph spacing was not being set.
|
|
Adds fallible functions for opening and saving fonts and cutting
and copying selections. FontEditor now falls back on a guaranteed
default BitmapFont on startup. Fixes crashing on start when the
default system font is set to TrueType.
|
|
|
|
Fail early during font initialization and leave the editor in a
valid state in case of errors during UndoSelection creation.
|
|
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).
No functional changes.
|
|
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.
|
|
|
|
We were already doing the same for its getters, and this makes its
API more consistent with GlyphMapWidget.
|
|
|
|
|
|
This patch removes deprecated GML properties and manual sizing
calculations in favor of the new UIDimensions, and registers more
widgets in the FontEditor namespace to simplify widget setup.
|
|
|