Age | Commit message (Collapse) | Author |
|
|
|
And make use of mapping functions moved from
LibGUI/FontPickerWeightModel.h => LibGfx/FontStyleMapping.h
|
|
|
|
For use outside constructor. Renames demo to preview to make
the UI and code comport.
|
|
This was used to update GlyphMapWidget on Type changes and is
no longer needed since removal of Type enumeration in bb592ae.
|
|
Fixes display issues in ClipboardHistory.
|
|
And select the restored glyph on undo/redo.
|
|
Previously, Delete left a glyph's width maximized.
|
|
Reduces some complexity dealing with callback effects and fixes
redundant calls to update_title and erroneously set glyph widths.
|
|
Visible glyphs can now be cycled through, or a code point specified
and jumped to directly.
|
|
The editor now unmasks fonts on load, mapping their glyphs to the
complete unicode character set, and masks them upon saving to
reduce disk space. This is a naive approach in terms of memory
usage and can be improved but whose immediate goal is to allow
editing any glyph without concern for range allocation.
|
|
|
|
Previously we would loop over all glyphs in the GlyphMap, compute
their rects, and then test to see if the mouse click position was
inside that rect. This is silly since each element in the glyph
map for a particular font is the same size, and we can just do
some coordinate manipulation to get the index directly.
|
|
|
|
Only one place used this argument and it was to hold on to a strong ref
for the object. Since we already do that now, there's no need to keep
this argument around since this can be easily captured.
This commit contains no changes.
|
|
Brings vertical spacing in line with most other apps using
ToolbarContainers. Fixes GroupBox margins since CSS ordering
change.
|
|
Simplifies building modified/new font titles and lets FontEditor
make use of the comfy ellipsis close button.
|
|
Makes undo/redo actions compatible with the updated UndoStack sans
finalization. Fixes having to click actions twice.
|
|
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same
margin on all edges, for example. The constructors follow CSS' style of
specifying margins. The added constructors are:
- Margins(int all): Sets the same margin on all edges.
- Margins(int vertical, int horizontal): Sets the first argument to top
and bottom margins, and the second argument to left and right margins.
- Margins(int top, int vertical, int bottom): Sets the first argument to
the top margin, the second argument to the left and right margins,
and the third argument to the bottom margin.
|
|
Previously the argument order for Margins was (left, top, right,
bottom). To make it more familiar and closer to how CSS does it, the
argument order is now (top, right, bottom, left).
|
|
|
|
|
|
Applications previously had to create a GUI::Menubar object, add menus
to it, and then call GUI::Window::set_menubar().
This patch introduces GUI::Window::add_menu() which creates the menubar
automatically and adds items to it. Application code becomes slightly
simpler as a result. :^)
|
|
Also mark them as [[nodiscard]].
|
|
|
|
This adds component declarations so that users can select to not build
certain parts of the OS.
|
|
Previously, AK::Function would accept _any_ callable type, and try to
call it when called, first with the given set of arguments, then with
zero arguments, and if all of those failed, it would simply not call the
function and **return a value-constructed Out type**.
This lead to many, many, many hard to debug situations when someone
forgot a `const` in their lambda argument types, and many cases of
people taking zero arguments in their lambdas to ignore them.
This commit reworks the Function interface to not include any such
surprising behaviour, if your function instance is not callable with
the declared argument set of the Function, it can simply not be
assigned to that Function instance, end of story.
|
|
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a.
Booting the system no longer worked after these changes.
|
|
Problem:
- `static` variables consume memory and sometimes are less
optimizable.
- `static const` variables can be `constexpr`, usually.
- `static` function-local variables require an initialization check
every time the function is run.
Solution:
- If a global `static` variable is only used in a single function then
move it into the function and make it non-`static` and `constexpr`.
- Make all global `static` variables `constexpr` instead of `const`.
- Change function-local `static const[expr]` variables to be just
`constexpr`.
|
|
This makes a few modifications to the statusbar text generation:
* Use the canonical U+XXXX representation of unicode characters.
* For control characters, display their alias instead of whitespace.
* Substitute RTL codepoints with U+FFFD so the text paints correctly.
* Only show the glyph's dimensions if it actually exists in the font.
This fixes #7286.
|
|
This adds a simple tooltip to the "Move Glyph" button to indicate its
functionality.
|
|
Without this change, FontEditor would crash due to LibDesktop opening an
IPC connection.
Fixes #7137.
|
|
Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!
|
|
UndoStack will now merge adjacent commands *if they want to be merged*
instead of bundling everything you push onto it until you tell it
to "finalize the combo."
This uses less memory and gives applications full control over how
their undo stacks end up. :^)
|
|
|
|
|
|
We had some inconsistencies before:
- Sometimes "The", sometimes "the"
- Sometimes trailing ".", sometimes no trailing "."
I picked the most common one (lowecase "the", trailing ".") and applied
it to all copyright headers.
By using the exact same string everywhere we can ensure nothing gets
missed during a global search (and replace), and that these
inconsistencies are not spread any further (as copyright headers are
commonly copied to new files).
|
|
|
|
Standardizes saving conventions: Editor now warns on close, new,
and open if there are unsaved changes, and new files prompt to
Save As.
|
|
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
|
|
GlyphBitmap width is currently limited to twiddling 32 bits so
abide by a 32x36 standard for now. Fixes incorrect line values and
ranges and removes unused RefPtr.
|
|
Fixes hidden glyphs being painted in editor and map, and '?'
subsitute glyphs being overdrawn in the system.
|
|
Fixes newline breakage in ClipboardHistory when copying LF glyphs
|
|
Fixes out-of-bounds lines in glyph editor
|
|
When toggled on, glyphs can now be repositioned within the glyph
editor by dragging the mouse
|
|
|
|
The editor can now be adjusted under the View->Scale menu
|
|
|
|
Cycles through classic pangrams and some symbols
|
|
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 *
|