Commit Graph

13 Commits

Author SHA1 Message Date
networkException
b67d4ab52f LibGUI: Allow falling back to default paint behavior in delegate
This patch adds a method that can optionally be implemented to allow
a TableCellPaintingDelegate to fall back to the default painting in a
View.
2022-01-29 11:22:02 +01:00
martinfalisse
8eb8949d9c LibGUI: Calculate row position for scroll into view
When a user is navigating a table view with arrow keys and a row is
outside of the current view, then scroll_into_view is called, and the
position of the rectangle passed to this should take into account the
column headers.

This can be seen making more pleasant the navigation in the System
Monitor in the Processes view, for example.
2022-01-06 17:48:04 +01:00
martinfalisse
452150c632 LibGUI: Bring entire cell into view after auto scroll into view
On account of row and column headers, when a user navigates to
a cell (for example in the spreadsheet application) that is
outside of the view, the cell is not properly aligned and so
is partially cut-off. This fix takes into account the row and
column headers when calculating the Rect to pass to the
scroll_into_view function.
2022-01-03 15:49:07 +01:00
Marcus Nilsson
d660e86d13 LibGUI: Implement automatic scrolling in AbstractView
This adds automatic scrolling when dragging items in TreeViews and other
widgets that inherit from AbstractView when the overloaded
accepts_drag() returns true. This is implemented in FileSystemModel to
allow directories and files to be dragged.
2021-09-29 23:58:55 +02:00
sin-ack
ab2719fd53 LibGUI: Let the table view tell HeaderView about the min. section 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.
2021-08-08 14:12:45 +02:00
Andreas Kling
df96380121 LibGUI: Tighten paint invalidation rects in item views :^)
AbstractView now has a paint_invalidation_rect(index) function that
subclasses can override to provide a tighter invalidation rect for
an index.
2021-07-10 18:30:46 +02:00
Max Trussell
b4da228ea5
LibGUI: Make "Return" after tab return to original column in TableView 2021-06-13 19:46:08 +01:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
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 *
2021-04-22 11:22:27 +02:00
Andreas Kling
52de9b1753 LibGUI: Do AbstractView::set_column_hidden() => set_column_visible()
This API felt backwards, so let's change it.
2021-04-05 11:57:47 +02:00
thankyouverycool
3cc7862487 LibGUI: Support double-click resizing column headers
Columns can now be best-fit resized by double-clicking their
grabbable edges. When a default width is set and all data is empty,
double-clicking will restore the column to its original state.
2021-03-18 07:49:55 +01:00
thankyouverycool
0fc81d23f4 LibGUI: Add variable padding and center bitmaps in TableViews
This lets us make nicer looking bitmap tables and fixes a content
rect issue in TreeView. Also makes key column highlighting optional
2021-03-12 09:59:03 +01:00
thankyouverycool
af581cbd91 LibGUI: Increase row height in Table/ColumnViews and center icons
16x16 icons are now guaranteed at least 1px margins between rows
2021-03-04 16:28:12 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00