Age | Commit message (Collapse) | Author |
|
No behavior change.
|
|
|
|
TreeView now prints columns mostly like it used to. The paddings are now
properly applied, though. focus_rect drawing has been gated behind a
selection_behavior() check to make sure we don't draw a focus rect
around the column text when we're supposed to draw it over the entire
row.
|
|
AbstractTableView (which TreeView inherits from) sets the selection
behavior of the view to SelectRows. This is not how TreeViews are used
in most of the system, and TreeView::paint_event actually always draws
with the assumption of selecting individual items. This commit defines
the expected selection behavior for TreeViews. Users of TreeView can
still override this via TreeView::set_selection_behavior.
|
|
FileSystemModel will now react to specific events from Core::FileWatcher
in order to granularly update its data based on addition or removal of
files from the tree. Metadata changes are currently not handled, but in
the future they can be used to re-stat() a file to get its updated
statistics.
|
|
This commit has no functional changes.
|
|
SortingProxyModel always expected the source model to have the same
number of rows as long as it has not been invalidated. Now that we have
granular updates, this assumption is no longer true, and we need to
resize the source/proxy_rows vectors to the new size. This is safe since
the values in the vector are overwritten right afterwards.
|
|
These can be used by Model subclasses to signal the exact operations
that happened to a model, so that persistent model indices in that
area are not invalidated.
|
|
This patch adds persistent indices to models. A PersistentModelIndex is
a ModelIndex that will survive most model updates (provided that the
data the PersistentModelIndex points to has not been removed by the
model's data store). PersistentModelIndex objects can be safely held
by objects outside the model they originated from.
|
|
We always display the tree indent and the icon, so we shouldn't allow
the tree column to shrink beyond that size.
|
|
Previously HeaderView would just assume that each column or row could
have a minimum size of 2. This makes it so that AbstractTableView
subclasses can provide a new minimum value for a specific column.
|
|
After the update -> invalidate change a couple places broke when
update() was supposed to be manually called. This instance was not
marked virtual or override, which made it hard to detect. This commit
makes sure that update() on the original model is called when the
RunningProcessesModel needs an update.
|
|
Clang is a bit more pedantic than GCC when diagnosing implicit
fallthroughs, and doesn't care if the succeeding label only contains a
single break statement.
|
|
The text was painted with the assumption that no other column would be
present after the tree column, which won't always be true. Additionally,
some alignment and focus rect-related issues have been fixed.
|
|
This allows an application to display a tooltip without waiting for a
timer to fire first.
|
|
An empty GUI::Icon would cause the column auto-sizing logic to crash.
|
|
ValueSlider is a more generalized version of OpacitySlider when we need
a slider with values displayed. It will always show the current value
with a user defined suffix.
|
|
The previous name did not describe what the function checked, and was
easy to confuse with ModelIndex::is_valid.
|
|
|
|
Most of the models were just calling did_update anyway, which is
pointless since it can be unified to the base Model class. Instead, code
calling update() will now call invalidate(), which functions identically
and is more obvious in what it does.
Additionally, a default implementation is provided, which removes the
need to add empty implementations of update() for each model subclass.
Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
|
|
|
|
Fixes buttons not getting redrawn after pressing them with return or
space key.
|
|
This ensures that the user can't copy/cut text from password boxes which
would reveal the password. It also makes sure that the undo/redo actions
stay disabled because it's difficult to reason about what these do
exactly without being able to see the result.
|
|
|
|
Asking the user for a password is a fairly common thing, so let's have
a reusable GUI dialog for it! This first iteration only supports having
pre-filled "server" and "username" fields. This can obviously be made
more flexible as needs arise. :^)
|
|
|
|
Currently, any number of menubars can be plugged in and out of a window.
This is unnecessary complexity, since we only need one menubar on a
window. This commit removes most of the logic for dynamically attaching
and detaching menubars and makes one menubar always available. The
menubar is only considered existent if it has at least a single menu in
it (in other words, an empty menubar will not be shown).
This commit additionally fixes a bug wherein menus added after a menubar
has been attached would not have their rects properly setup, and would
therefore appear glitched out on the top left corner of the menubar.
|
|
|
|
This ensures the selection rubber band in icon views stays within the
visible area.
|
|
This commit adds a new property to Label which allows one to enable or
disable text wrapping. Statusbar now uses this property to disable text
wrapping in its segments, since text wrapping in statusbars doesn't make
sense.
|
|
|
|
|
|
This change allows us to specify where on screen we'd like the Dialog
window to be drawn. By default it's set to CenterWithinParent which
may fall back to Center if parent window is unset or not visible on
screen.
|
|
This reverts commit cfc9ee6f16b9c4d2b246bb2832dd436637cbeaad.
This change was wrong: The parent *does* lose hover when the mouse
cursor enters a child widget. Hover is not hierarchical, there is only a
hovered window and a hovered widget within that window.
This fixes an issue with GUI::TabWidget buttons appearing hovered
despite the mouse cursor not being over the buttons.
|
|
This reverts commit a5a32fbccef8f8f663001363a278f80ef6320efe.
This change was wrong: it's fine for a child widget to receive an enter
event despite its parent never getting one. Only the widget directly
under the mouse cursor is considered hovered for enter/leave purposes.
|
|
Use the new "Accent" color role to emphasize the currently active tab
within a GUI::TabWidget. :^)
|
|
Since interfaces may look different depending on the window active state
we need to update them when it changes.
|
|
|
|
Previously it was using int for indexes and using the -1 magic value.
Supersedes b9d51b86015e8410a2082c42f95651c0599ec7ae
|
|
Previously it would only do this if the mouse was over the close
button.
If you released the mouse outside the close button, the close button
would appear permanently depressed afterwards.
|
|
You can now see the outline of GUI widgets when hovering them.
For example:
$ export GUI_HOVER_DEBUG=1
$ FileManager
Then move the mouse around in the file manager. :^)
|
|
The previous text_rect() algorithm only produced the right result for
horizontally centered labels.
This adds some missing padding to GUI::Statusbar which we've apparently
needed for some time. :^)
|
|
Anyone who inherits from `GUI::Clipboard::ClipboardClient` will receive
clipboard notifications via `clipboard_content_did_change()`.
Update ClipboardHistoryModel, TextEditor and TerminalWidget to inherit
from this class.
|
|
|
|
|
|
|
|
This was breaking many places which didn't expect text to wrap. Now,
the only place where text currently wraps is in GUI::Label.
|
|
Prior to this change, changing the view would hide the error label
and show an empty directory.
|
|
|
|
Previously there was a dead zone between the item icon and its text
in IconViews. This meant that you could click between the icon and
the text label and hit nothing.
This patch improves the situation by inflating both rects so that
they both overlap and become a bit easier to hit.
|