Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
Also allows the user to press Esc while the button is being pressed
to cancel the button action.
|
|
Previous to this commit, if a `Window` wanted to set its width or height
greater than `INT16_MAX` (32768), both the application owning the Window
and the WindowServer would crash.
The root of this issue is that `size_would_overflow` check in `Bitmap`
has checks for `INT16_MAX`, and `Window.cpp:786` that is called by
`Gfx::Bitmap::create_with_anonymous_buffer` would get null back, then
causing a chain of events resulting in crashes.
Crashes can still occur but with `VERIFY` and `did_misbehave` the
causes of the crash can be more readily identified.
|
|
|
|
When setting a Widget->set_visible(false), if that Widget->has_focus()
it will continue to have focus, even though it's not visible to the user
anymore.
Now calling Widget->set_visible(false) will remove focus from the Widget
if it had focus, and the Window will give focus back to the Widget
that had it previously, if there was one.
|
|
This adds support for shift+return key combo in single line TextEditor
fields. Used in this case for searching backwards/forwards in the
Terminal find window.
|
|
|
|
This patch replaces ad-hoc generation of file URL strings with using
URL::create_with_file_scheme().
|
|
|
|
Previously we didn't check that the selection's row index is in a valid
range before attempting to access its data via the model.
This could cause an out-of-bounds access to the model's Vector of
suggestions.
I think this should fix #7404, but I can't verify it does because
I wasn't able to reproduce it on my machine.
|
|
When collapsing a tree that contains the current selection, the parent
node becomes selected instead.
|
|
|
|
This behavior was really irritating and basically never what you wanted
so let's stop doing it.
|
|
The index of the tree column will not change while painting.
Neither will the number of columsn. So avoid a whole bunch of virtual
function calls by caching these two values at the start of painting.
|
|
This adds an implementation for the Home, End, Page Up and Page Down
cursor movements for TreeView.
Also, the Up and Down movement implementations are replaced by a more
efficient traversal mechanism: whereas the old code would walk over all
visible nodes every time, the new code only evaluates relevant sibling
and parent indices.
|
|
Previously, the layout algorithm preferred to give every item an equally
sized slice of the remaining space. This meant that not the entire area
was used when the remaining size did not divide evenly by the number of
items. This caused, for example, the ResizeCorner in HexEditor to be a
couple of pixels left of the actual corner for some sizes of the window.
Now, the remaining pixels are distributed on a first come, first served
basis. However, only one pixel is distributed at a time. This means
items towards the left might me a pixel larger than their siblings
towards the right.
|
|
i.e. Drawing them, or handling mouse events on them.
Fixes #7505.
|
|
`uint` has also been more appropriately renamed to
u32.
|
|
This moves the calculation of selected words that was originally
in the TextEditor application to TextEditor in LibGUI.
This allows all applications with text editors to get
this number without having to calculating it themselves.
|
|
This makes splitters stand out visually so you can actually spot them.
Before this, you had to guess/know where they were, which was weird.
The look of the knurling is the same as GUI::ResizeCorner, to build on
the established visual language.
|
|
Instead of computing the grabbable areas on the fly in mouse event
handlers, we now figure out which parts of the splitter are grabbable
when something moves around, and then remember it.
This makes the code a lot easier to follow.
|
|
Since the introduction of multi-select, we have had both `on_selection`
and `on_selection_change`, the latter of which was only invoked when a
change in selection came in through the model.
This removes `AbstractView::on_selection` and replaces it usage with
the more explicit `on_selection_change` everywhere.
|
|
|
|
Instead of using a low-level, proprietary API inside LibGfx, let's use
Core::AnonymousBuffer which already abstracts anon_fd and offers a
higher-level API too.
|
|
The HashMap API was overkill and made using this less ergonomic than
it should be.
|
|
|
|
This is no longer used by any of our IPC pairs.
|
|
Move the from handshake() to the constructor (and move the constructor
out-of-line while we're at it.)
This prepares getting rid of the handshake() mechanism since this is
the only remaining user.
|
|
|
|
Prevent erasing selected text when pasting with empty clipboard
|
|
The extremely high default precision was obnoxious in user interfaces.
|
|
Also rename the "LibThread" namespace to "Threading"
|
|
The C++ language-server can now autocomplete include paths.
Paths that start with '<' will be searched in /usr/include, and paths
that start with '"' will be searched in the project's root directory.
|
|
|
|
This patch adds a set_system_fonts() IPC API that takes the two main
font queries as parameters. We'll probably expand this with additional
queries when we figure out what they should be.
Note that changing the system fonts on a live system mostly takes
effect in newly launched programs. This is because GUI::Widget will
currently cache a pointer to the Gfx::FontDatabase::default_font()
when first constructed. This is something we'll have to fix somehow.
Also note that the settings are not yet persisted.
|
|
Instead of everybody getting their system fonts from Gfx::FontDatabase
(where it's all hardcoded), they now get it from WindowServer.
These are then plumbed into the usual Gfx::FontDatabase places so that
the old default_font() and default_fixed_width_font() APIs keep working.
|
|
This changes (context) menus across the system to conform to titlecase
capitalization and to not underline the same character twice (for
accessing actions with Alt).
|
|
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`.
|
|
|
|
Instead of doing a full IPC round-trip for the client and server to
greet each other upon connecting, the server now automatically sends
a "fast_greet" message when a client connects.
The client simply waits for that message to arrive before proceeding.
(Waiting is necessary since LibGUI relies on the palette information
included in the greeting.)
|
|
If you type in a filename that doesn't exist, show an error message
instead of closing the FilePicker "successfully."
|
|
Some people apparently like to type in full absolute paths into the
filename box of GUI::FilePicker. So let's handle that as you'd expect
by using the full path as the selected path.
|
|
Return a String instead of a LexicalPath. Also call it a path instead
of a file since that's what we're really returning.
|
|
Instead use default_font().bold_variant() in cases where we want a bold
variant of the default font. :^)
|
|
Finishing a thumbnail generation doesn't affect indices at all.
|