Age | Commit message (Collapse) | Author |
|
This feels a bit nicer and always places the current index at the top
of visible content in long scrollable lists.
|
|
Fixes ComboBox ListView erroneously setting and scrolling to
indicies just outside its inner rect when mousing along the
bottom or top of the frame.
|
|
Similar to increment/decrement buttons on SpinBoxes, Scrollbar
buttons now draw with the correct highlights after reaching their
min or max.
|
|
Minus a tasteful item height remainder. Ignoring Taskbar is okay now
that the window is a PopUp.
Also expands its width if intersection with the Desktop makes its
ListView scrollable. ComboBox windows no longer intersect horizontally,
remaining firmly "attached" to the editor, similar to other classic UIs.
|
|
Originally implemented to handle resizable ComboBox windows, this
"feature" no longer exists, so calculating min size is no longer
necessary. The calculation was also failing to account for dynamic
ListViews properly.
This patch simplifies things by setting ComboBox ListView's minimum size
explicitly and deferring to AbstractScrollableWidget's more flexible
calculated implementation otherwise.
Fixes FontPicker resizing incorrectly due to overly rigid ListViews.
|
|
The default SortingProxyModel does not allow to react to reodering.
As we would like to keep the column width on sorting, we create a
subclass and inject our code into the sorting method.
|
|
HackStudio's Editor has displayed indicators in its gutter for a long
time, but each required manual code to paint them in the right place
and respond to click events. All indicators on a line would be painted
in the same location. If any other applications wanted to have gutter
indicators, they would also need to manually implement the same code.
This commit adds an API to GUI::TextEditor so it deals with these
indicators. It makes sure that multiple indicators on the same line
each have their own area to paint in, and provides a callback for when
one is clicked.
- `register_gutter_indicator()` should be called early on. It returns a
`GutterIndicatorID` that is then used by the other methods.
Indicators on a line are painted from right to left, in the order
they were registered.
- `add_gutter_indicator()` and `remove_gutter_indicator()` add the
indicator to the given line.
- `clear_gutter_indicators()` removes a given indicator from every line.
- The `on_gutter_click` callback is called whenever the user clicks on
the gutter, but *not* on an indicator.
|
|
This is going to hold other per-line data too.
|
|
|
|
|
|
Since ef7d9c0, shortcut propagation was blocked for blocking modals and
popups. This however is an issue as some blocking modals (like
FilePicker) use shortcuts. This patch allows propagation of shortcuts
but only until the current window.
|
|
First, this patch renames the function
`propagate_shortcuts_up_to_application` to `propagate_shortcuts`.
Handling those levels, will allow us to differentiate shortcuts at
`Window` level and `Application` level. Which will be convenient to
handle dialog-specific shortcuts.
|
|
|
|
|
|
A 1px drop shadow from the track was peeking out behind the knob when
at rightmost or lowest position. That made it look like it was possible
to drag the knob even further right or down. Painting the track 1px
shorter seems like a good compromise to avoid the problem.
|
|
When clicking the value slider bar, the knob was not positioned as
close to the mouse as expected. When moving the mouse right, the knob
would lag a bit behind, and the cursor would eventually be outside the
knob.
The bug was due to knob_rect() taking knob_thickness into account to
prevent the knob from protruding outside the bar. The value_at(pos)
calculated the relative position based on the entire width of the bar.
This discrepancy is fixed by taking knob_thickness into account in
value_at(position).
|
|
When dragging value slider left, the handle would snap to lower value
with the slightest move of the mouse. When dragging to the right
however, it would take a lot more movement to cause a change in value.
This asymmetry made it feel awkward to drag the mouse around. It was
caused by always rounding down using a cast to int. By rounding to the
nearest integer first, we ensure symmetric behavior.
|
|
When dragging the slider handle left/down, the handle would
snap to lower value with the slightest move of the mouse. When dragging
to the right/up however, it would take a lot more movement to cause
a change in value. This asymmetry made it feel really awkward to drag
the slider. It was caused by always rounding down using a cast to int.
By rounding to the nearest integer first, we ensure symmetric behavior.
|
|
Allows the use of GUI::FileTypeFilter in IPC.
|
|
Objects taken by reference are no longer valid when used in
`deferred_invoke`. Explicitly copying them solve the issue.
|
|
|
|
|
|
|
|
Not doing it result in FileManager's progress bar being left as
incomplete even if all jobs were finish.
|
|
As the user might want to have interactions with LibGUI while handling
errors, this code should be executed in the original `EventLoop`.
Similarly to what is done with the error-free path.
|
|
|
|
|
|
|
|
|
|
I had to add a set_title(String) helper function for ImageEditor because
TabWidget requires it. This is a temporary fix and will be handled in
subsequent commit.
|
|
|
|
|
|
After `8a48246` m_nodes[row] amd m_child_nodes[row] return a
NonnullRefPtr<Node>, so we were putting the wrong address
into the ModelIndex's data.
|
|
|
|
Rather than creating a TextStyle struct, and then copying its fields
over to a TextAttributes, let's just create a TextAttributes to start
with. This also simplifies the syntax highlighting code by letting us
define underlines along with the other text styling.
|
|
Rather than having a style AND a field saying whether to use the style,
just make the style Optional.
|
|
|
|
|
|
Similar to POSIX read, the basic read and write functions of AK::Stream
do not have a lower limit of how much data they read or write (apart
from "none at all").
Rename the functions to "read some [data]" and "write some [data]" (with
"data" being omitted, since everything here is reading and writing data)
to make them sufficiently distinct from the functions that ensure to
use the entire buffer (which should be the go-to function for most
usages).
No functional changes, just a lot of new FIXMEs.
|
|
With the new canceled background actions, some thumbnail generation
callbacks are not executed if the user closes the window with a
FileSystemModel quickly enough. Therefore, we remember which thumbnails
we started to generate and consider the associated promises if we're
looking up a thumbnail. Since the thumbnail generation itself continues
running and the cache is application-global, instead of never displaying
thumbnails for images that were "interrupted" generating thumbnails the
first time, we can now fetch their images immediately and reliably.
|
|
Also drop the try_ prefix from the fallible function, as it is no longer
needed to distinguish the two.
|
|
...and simply ignore the errors for now. This allows us to remove the
infallible function and avoid accumulating more callers of it.
|
|
`FilePicker` will now look at the global setting at startup. Note that
changing this parameter inside `FilePicker` won't affect the global
parameter.
|
|
|
|
|
|
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
|
|
|
|
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.
This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
|
|
This also removes DirIterator::error_string(), since the same strerror()
string will be included when you print the Error itself. Except in `ls`
which is still using fprintf() for now.
|
|
This widget originally used text, but at the time we did not support
painting multi-code point emoji as text at all. So it was changed to
paint emoji with their bitmaps in commit 8190120f9531693176ca499c12.
Now that we can paint text with multi-code point emoji, revert this
widget to use text again. This has the added benefit that the dialog has
a what-you-see-is-what-you-get effect; any emoji with text presentation
in the font (e.g. U+00A9 Copyright) will be displayed as such in the
dialog, which is how the text would be painted when selected anyways.
Note that to accommodate some emoji sizes, this also had to bump the
button sizes a bit, otherwise they would be displayed with an ellipsis.
|