Age | Commit message (Collapse) | Author |
|
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
|
|
This resolves #10641.
|
|
|
|
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.
|
|
We always display the tree indent and the icon, so we shouldn't allow
the tree column to shrink beyond that size.
|
|
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 role allows you to specify a custom opacity for icon painting.
Note that the opacity is not in effect when the item is either
selected and/or hovered.
|
|
|
|
Also mark them as [[nodiscard]].
|
|
AbstractView now has a paint_invalidation_rect(index) function that
subclasses can override to provide a tighter invalidation rect for
an index.
|
|
When clicking on the TreeView in profiler without selecting a node and
then pressing up or pgup, cursor_index was in an invalid state. Instead
select the first node in the index.
|
|
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.
|
|
|
|
|
|
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 *
|
|
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:
- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar
This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
|
|
Previously only rows containing root nodes were considered. Fixes
offset content drift and columns failing to resize in multi-column
TreeViews
|
|
|
|
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
|
|
Fixes hidable horizontal scrollbars remaining visible even after
collapsing their responsible nodes. Tree column width defaults to
column header width if wider than current content.
|
|
|
|
|
|
It would be tempting to uncomment these statements, but that won't work
with the new changes.
This was done with the following commands:
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \;
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
|
|
|