summaryrefslogtreecommitdiff
path: root/Userland/Applications/FontEditor/MainWidget.cpp
AgeCommit message (Collapse)Author
2023-05-23Base+Userland: Apply Human Interface Guidelines to Object textthankyouverycool
Corrects a slew of titles, buttons, labels, menu items and status bars for capitalization, ellipses and punctuation. Rewords a few actions and dialogs to use uniform language and punctuation.
2023-05-17FontEditor: Filter files by BitmapFont in FilePickerthankyouverycool
2023-05-17FontEditor: Show complete filename in error messagesthankyouverycool
And clean up Save and Open action code style.
2023-05-17FontEditor: Show recently opened files in File menuthankyouverycool
And update GlyphEditorWidget on initialize(). Fixes Editor not showing the new active glyph when loading recent fonts from a menu.
2023-05-17FontEditor: Add action text to Undo and Redothankyouverycool
2023-05-13FontEditor: Allow application to launch without a fontthankyouverycool
Since LibFSAC requires a reified window before loading a font, it makes sense to have a safe null state for the app. This lets us stay alive after a failed file request on startup, handle failure at any point during initialization, and claw back memory from all our font RefPtrs. A default startup font or none at all can now be set in FontEditor.ini
2023-05-13FontEditor: Let GlyphEditorWidget initialize a null BitmapFontthankyouverycool
And remove public reference getters as there is no guarantee they are nonnull.
2023-05-13LibGUI+Applications: Let GlyphMapWidget initialize a null Fontthankyouverycool
FontEditor will need to clear references to its mutable font in the future while CharacterMap has no use for the highlights clone, so let's convert GlyphMapWidget's set_font wrapper into a separate initialize function for the editor and stop hiding the base function for others. Setting font null in either ultimately points the map to the system's default font.
2023-05-13FontEditor: Move common restoration work into restore_state()thankyouverycool
2023-05-13FontEditor: Use resultant FSAC filename when Saving-asthankyouverycool
Fixes desync between file and title.
2023-05-13FontEditor: Use fallible {Input,Message}Boxesthankyouverycool
And replace DeprecatedString and fix misnamed argument in show_error()
2023-05-13FontEditor: Don't crash on missing iconsthankyouverycool
Instead of crashing on failed icon loading with TRY(), let's report missing but non-critical resources in detail and gracefully move on.
2023-05-13FontEditor: Rename m_edited_font => m_font and remove getterthankyouverycool
Pithier and it matches the naming convention used in FontEditor's child widgets. Since it was never used outside MainWidget and there will soon be no guarantee that m_font is nonnull, the public BitmapFont& getter has also been removed.
2023-05-13FontEditor: Remove unnecessary call to hide() NewFontDialogthankyouverycool
This workaround has not been needed since 5c92397
2023-05-13FontEditor: Remove unnecessary setters and gettersthankyouverycool
As these were only used internally, let's simplify things and prevent potential desync between widget state and saved settings by moving the logic into their respective actions.
2023-05-13FontEditor: Remove unnecessary deferred invokesthankyouverycool
Since moving initialization out of the constructor and recalculating GlyphMap's content size on range and font changes, these deferrals are no longer needed.
2023-05-13FontEditor: Tighten lambda capturesthankyouverycool
2023-05-13FontEditor: Propagate errors formatting preview textthankyouverycool
2023-05-13FontEditor: Propagate errors when loading GMLthankyouverycool
2023-05-13FontEditor: Port some instances of DeprecatedStringthankyouverycool
2023-05-13FontEditor: Iterate slope and weight lists by size()thankyouverycool
2023-05-13FontEditor: Convert Model lists to Vector<String>thankyouverycool
And propagate errors while building them.
2023-05-05FontEditor: Use `LibFileSystemAccessClient`Caoimhe
2023-04-30LibGUI+Userland: Port Labels to Stringthankyouverycool
2023-04-25Applications: Update man page links for applicationsTim Ledbetter
This commit updates all application man page links to point to the Applications subdirectory.
2023-04-19LibGUI+Userland: Make Menu::*add_submmenu take name using new stringKarol Kosek
2023-04-19LibGUI+Userland: Make Window::*add_menu take name using new stringKarol Kosek
2023-04-18FontEditor: Use compact InputBox for Go to Glyph actionthankyouverycool
2023-04-18LibGUI+Userland: Improve error and font handling for InputBoxthankyouverycool
Adds fallible factories, ports DeprecatedString, and rebuilds the layout to accomodate system font changes.
2023-04-15AK+Everywhere: Change URL::path() to serialize_path()MacDue
This now defaults to serializing the path with percent decoded segments (which is what all callers expect), but has an option not to. This fixes `file://` URLs with spaces in their paths. The name has been changed to serialize_path() path to make it more clear that this method will generate a new string each call (except for the cannot_be_a_base_url() case). A few callers have then been updated to avoid repeatedly calling this function.
2023-02-10Everywhere: Remove needless copies of Error / ErrorOr instancesTimothy Flynn
Either take the underlying objects with release_* methods or move() the instances around.
2023-02-04LibGUI+Userland: Switch order of parameters for InputBox::showKarol Baraniecki
Because usage of the input_type parameter is now higher than of the placeholder parameter, this makes for a cleaner API.
2023-02-04Userland: Replace manual checking by using GUI::InputType::NonemptyTextKarol Baraniecki
Do this where we were already checking if the input was empty after the InputBox was submitted. Those places gain interactive input validation. :^)
2023-01-26LibGfx: Remove `try_` prefix from bitmap creation functionsTim Schumacher
Those don't have any non-try counterpart, so we might as well just omit it.
2023-01-13FontEditor: Fix more ignored .to_string() errorsMacDue
2023-01-07LibGUI+Userland: Rename `try_load_from_gml()` -> `load_from_gml()` :^)Sam Atkins
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07Userland: Replace all uses of `load_from_gml` with `try_load_from_gml`Sam Atkins
MOAR FIXMES! ;^)
2023-01-06LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)Sam Atkins
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.
2023-01-02Base+Userland: Add menu item iconsBrandon Jordan
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.
2022-12-20FontEditor: Update preview window after pasting and deleting glyphsthankyouverycool
2022-12-20FontEditor: Add Unicode block/glyph selection Statusbar Segmentthankyouverycool
Displays the current active Unicode block range, or, if multiple glyphs are selected, their count. Clicking toggles the Unicode block ListView.
2022-12-20LibGUI+FontEditor: Restore normalized selections on Undo/Redothankyouverycool
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.
2022-12-20FontEditor: Set Unicode ListView's focus proxy to its search boxthankyouverycool
Provides a visual cue that arrow key input is shared between these widgets.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
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-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
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-11-19FontEditor: Include file basename in error messages when availablethankyouverycool
And write messages in the [action] failed: [error] format to match common error message formatting elsewhere in Userland.
2022-11-19LibGUI+Applications: Allow GlyphMapWidget's set_font() to failthankyouverycool
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.
2022-11-19LibGUI+FontEditor: Allow system emoji to be toggled in GlyphMapWidgetthankyouverycool
And remove their red backgrounds when visible to not be confused with deletion highlights.
2022-11-19FontEditor: Add Layout options to View menuthankyouverycool
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.
2022-11-19FontEditor: Remove redundant set_scale() helperthankyouverycool