Age | Commit message (Collapse) | Author |
|
When a text file has only 1 line with long text
autoscroll to the top will no longer loop over
and set the cursor to the end of the line.
|
|
We had support for going to a specific line before, but now we support
jumping around using the `line:column` format :^)
|
|
When the `FilteringOptions::SortByScore` flag is set, filtered indices
are sorted by match score in descending order, meaning the most
relevant results should appear first.
The default behavior of FilteringProxyModel is unchanged.
|
|
This is a regression from f391ccfe53e18395842d0d6b743d08d23b9108e5.
The bug didn't appear on inactive tabs, as they already use
`translated(1, -2)`.
|
|
This is easily identifiable by anyone who uses Duration::now_monotonic,
and any downstream users of that data.
|
|
That's what this class really is; in fact that's what the first line of
the comment says it is.
This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
|
|
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.
|
|
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.
|
|
Increases default dimensions of InputBox, giving it slightly more
divine proportions. Prompt text now always appears above the editor.
|
|
We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is equivalent.
|
|
|
|
This makes it more obvious that enter will return the current
selection and prevents returning without a valid selection.
|
|
Previously, the File Picker didn't activate the pre-selected filter.
|
|
Make a separate rect for the text and use IntRect::centered_within()
to sidestep any subpixel jitter. This way it looks good with both bitmap
and vector fonts.
|
|
Many actions affect Window modality, so let's put a temporary change
governor on activation to stop race conditions.
Fixes being able to spam open/close shortcuts and spawn multiple
FilePickers, among other things.
|
|
Creates two new gatekept helpers for FilePicker and MessageBox to be
used by FSAS to replace the "dummy window" approach to centering
Dialogs. There was a slight delay in creating two windows, one a
transparent intermediary hidden behind the second, to display FSAS
Dialogs. Now we only need to make the window we actually see.
|
|
These options were created 2 years ago but the only use cases thus far
are for Center and CenterWithinParent, so let's chuck the rest for now.
Adds a new DoNotPosition option to opt out of automatic centering and
a ScreenPosition setter and getter for configuration before exec()
|
|
And a center_within(IntRect const&) overload
|
|
|
|
|
|
This prevents the <opacity>% text on the slider being clipped.
|
|
Otherwise, if you change the opacity in the color picker, the slider's
opacity changes.
|
|
And only paint GlyphMapWidget's frame if disabled
|
|
|
|
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.
|
|
|
|
Fixes seek actions not activating by keyboard shortcut when
GlyphMapWidget has focus.
|
|
This prevents callers from accidentally discarding the result of
initialize(), which was the root cause of this OSS Fuzz bug:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55896&q=label%3AProj-serenity&sort=summary
|
|
Clipboard entries are now preserved upon reboot :^). Unfortunately, it
only supports data with the mimetype "text/".
This is done by writing all entries as a JSON object in a file located
in ~/.data.
Co-authored-by: Sagittarius-a <sagittarius-a@users.noreply.github.com>
|
|
Autoscroll delta now takes into account the cursor
position relative to the widget inner rect height
to allow for faster rubber band autoscrolling.
|
|
Fixes incorrect thread highlighting for ResourceGraph panels.
Prior to FrameStyles, these graphs were painted as faux-panels,
this is, sunken containers with a thickness of 1, and weren't
subject to the bug.
|
|
"The official project language is American English […]."
https://github.com/SerenityOS/serenity/blob/5d2e9156239cd707a22ecea6c87d48e5fc1cbe84/CONTRIBUTING.md?plain=1#L30
Here's a short statistic of the occurrences of the word "behavio(u)r":
$ git grep -IPioh 'behaviou?r' | sort | uniq -c | sort -n
2 BEHAVIOR
24 Behaviour
32 behaviour
407 Behavior
992 behavior
Therefore, it is clear that "behaviour" (56 occurrences) should be
regarded a typo, and "behavior" (1401 occurrences) should be preferred.
Note that The occurrences in LibJS are intentionally NOT changed,
because there are taken verbatim from the specification. Hence:
$ git grep -IPioh 'behaviou?r' | sort | uniq -c | sort -n
2 BEHAVIOR
10 behaviour
24 Behaviour
407 Behavior
1014 behavior
|
|
This fixes an issue when we sometime pass in an empty Main::Arguments to
GUI::Application::create().
Also, this mimics the behavior that Application::construct() had which
only iterated over argv when more than one argument was passed to it.
|
|
No need to implement gradients again :^)
|
|
If the ColorSlider returns a hue of 360 degrees one of the various
`VERIFY(hsv.hue >= 0.0 && hsv.hue < 360.0);`
in Color.h will be hit.
|
|
<Ctrl-Del> will crash when deleting at the end of line
where the next line contains only punctuation and seperator characters,
because TextDocument::first_word_break_after will return a wrong index
of the next word break (+1 bigger than the correct index),
thus RemoveTextCommand will try to remove a out-of-bound text range
causing a crash.
|
|
<Ctrl-Backspace> will stuck when deleting at the end of line
which contains only one single character. When finding the
previous word break position starting at column 0 in
TextDocument::first_word_break_before, the code enters an
infinite while loop. The early return should simply fix this.
|
|
|
|
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.
This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.
From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
|
|
`m_original_font` is only set if `GlyphMapWidget::set_font` is called.
But, if the user of `GlyphMapWidget` decides not to set a font,
there will be no value for `m_original_font`.
This commit fixes that issue by checking if `m_original_font` is not
null before attempting to use it.
|
|
Some image formats such as APNG may not use the first frame for
animations.
|
|
Resolves #18618.
8134dcc changed `JsonArray::set()` to insert elements at an index
instead of changing existing elements in-place. Since no behavior
such as `Vector::try_at()` exists yet, it returns nothing.
|
|
Prior to this commit, we were always clearing the TreeView's metadata,
even if it wasn't needed. Now, we only clear it if the callee says that
we should invalidate indices.
This fixes an issue in FileManager (#6903), where updating the file
system by creating/deleting any file/folder would cause the tree to
collapse completely.
This may be more of a 'patch' than an actual fix, since I don't have a
lot of experience with `GUI::TreeView` or `GUI::Model`, but it doesn't
appear to break any other `TreeView` use-cases and using FileManager is
now much better than it was before :^)
|
|
|
|
Now that Variant has operator==(), we don't need to go through all this
trouble to compare two Variant values.
|
|
Previously hackstudio tried to synchronize the language server before
executing the command inside the editor. If sync-command for the server
(for example the CommentLineCommand) is not implemented inside the
function responsible for syncing the language server, the IDE would
crash.
This patch makes it such that the synchronization happens only after IDE
executes the command locally. If such command is not implemented (as
was the case earlier), it would simply reupdate the content inside the
language server. Even though the reupdate might be expensive, it is
better than crashing hackstudio altogether.
Because of reordering, the relevant function names have been changed to
better reflect the code flow.
|
|
Previously, Frames could set both these properties along with a
thickness to confusing effect: Most shapes of the same shadowing only
differentiated at a thickness >= 2, and some not at all. This led
to a lot of creative but ultimately superfluous choices in the code.
Instead let's streamline our options, automate thickness, and get
the right look without so much guesswork.
Plain shadowing has been consolidated into a single Plain style,
and 0 thickness can be had by setting style to NoFrame.
|
|
These icons are a relic of GLabel and were never implemented to
accomodate both image and text. This convenience can always be added
in the future, but no current instance assumes or needs it, so let's
replace them all with ImageWidget to show clearer intent.
|
|
|
|
|