Commit graph

15 commits

Author SHA1 Message Date
Andreas Kling
005afa4c6e LibGUI: Don't assert when right clicking on a vertical HeaderView
Just log a debug message instead. We still need to actually implement
vertical header context menus, but for now let's at least not crash.
2020-11-28 10:26:05 +01:00
Andreas Kling
688675e89b LibGUI: Make table view row height+padding font-size-relative
This makes tables look a lot nicer with different-sized fonts. :^)
2020-10-25 10:12:03 +01:00
Tibor Nagy
3ce97b9c0e LibGUI: Pad row/column headers of AbstractTableView 2020-09-20 20:54:23 +02:00
Uma Sankar
d7673b41ef
LibGUI: Respect the previously selected sort order in HeaderView (#3522)
Instead of forcefully setting the sort order to Ascending upon column
sort, setting it to the previously selected sort order
2020-09-17 16:15:35 +02:00
Andreas Kling
cab422b441 LibGUI: Use widget override cursors in HeaderView 2020-09-11 14:50:30 +02:00
Andreas Kling
b4f307f982 LibGUI+WindowServer: Rename window "override cursor" to just "cursor"
Let's just say each window has a cursor, there's not really overriding
going on.
2020-09-11 14:26:37 +02:00
Andreas Kling
0f9be82826 LibGfx: Move StandardCursor enum to LibGfx
This enum existed both in LibGUI and WindowServer which was silly and
error-prone.
2020-09-10 19:25:13 +02:00
Andreas Kling
447b65bf7b LibGUI: Add (optional) row headers to GUI::TableView
You can now get row headers in your TableView by simply calling:

    table_view.row_header().set_visible(true)

Note that rows are not yet resizable.
2020-08-26 17:00:40 +02:00
Andreas Kling
49a5038a1a LibGUI: Avoid implementing vertical HeaderView section resize for now
Resizable rows will require a bunch of changes in the table view layout
code, so let's not make the normal resizing areas grabbable for now.
2020-08-26 17:00:40 +02:00
Andreas Kling
e418bdf95b LibGUI: Don't update key column when clicking vertical headers
Vertical headers are only concerned with rows, after all.
2020-08-26 17:00:40 +02:00
Andreas Kling
5b46835a9d LibGUI: Fix HeaderView::section_rect() for vertical headers
Vertical headers shouldn't worry about horizontal padding.
2020-08-26 17:00:40 +02:00
Andreas Kling
c241ab75cd LibGUI: Simplify HeaderView::mouseup_event() slightly 2020-08-26 17:00:40 +02:00
Andreas Kling
3f4df7c6da LibGUI: Reset hovered section when mouse cursor leaves a HeaderView 2020-08-26 17:00:40 +02:00
Andreas Kling
9a25dd99c3 LibGUI: HeaderView should always notify parent when sections resize
The view needs to recompute the scrollable content size whenever this
happens, so let's always notify it. Previously we were only doing this
when resizing columns with interactively (not programmatically.)
2020-08-26 00:51:35 +02:00
Andreas Kling
44e371635e LibGUI: Move table view headers into their own widget
This patch introduces the HeaderView class, which is a widget that
implements the column headers of TableView and TreeView.

This greatly simplifies event management in the view implementations
and also makes it much easier to eventually implement row headers.
2020-08-26 00:51:35 +02:00