Andreas Kling
fd5eb79d19
LibGUI: Make GMenu inherit from CObject
...
This is primarily to make it possible to pass a GMenu* where a CObject*
is expected.
2019-12-09 21:05:44 +01:00
Andreas Kling
e630ad5927
GTableView: Don't allow resizing columns to a negative width
...
This is definitely not perfect but better than letting you put the
GTableView into a weird state with negative column widths. :^)
2019-11-20 22:27:12 +01:00
Andreas Kling
e08d605f72
GTableView: Don't hover-highlight unsortable column headers
...
The hover highlight is meant to indicate that the button is pressable.
Non-sortable columns are not pressable.
2019-11-20 22:23:51 +01:00
Andreas Kling
16c290e8d5
GTableView: Highlight the hovered column header
...
This makes it feel even *more* like a proper button.
2019-11-20 22:19:30 +01:00
Andreas Kling
191535d626
LibGUI: Make the GTableView column headers behave like proper buttons
...
Previously they would resort based on the column immediately when you
mousedown on them. Now we track the click event and show the header
in a pressed state, etc. The usual button stuff :^)
2019-11-20 22:11:43 +01:00
Andreas Kling
0b0017bbbd
LibGUI: Make the GTableView row background colors a little brighter
...
This has been bothering me for a long time.. :^)
2019-11-20 21:52:34 +01:00
Andreas Kling
e52fe07d2e
GTableView: Paint with white background when model-less
...
This matches the behavior of GTreeView.
2019-11-09 00:41:00 +01:00
Andreas Kling
229dbd0ab2
GTableView: Only paint the currently visible table rows
...
This makes painting way faster for models with large amounts of data.
2019-09-18 14:10:09 +02:00
Andreas Kling
11f2e7cd5c
GMenu: Update apps now that you can create a nameless GMenu
...
We had many context menus with names, simply because you were forced
to give them names.
2019-09-13 22:14:07 +02:00
Andreas Kling
f360858836
LibGUI: Tweak selection modification behavior on context menu event
...
Before bringing up the context menu, clicking...
- ...on an already selected item leaves selection alone
- ...on an unselected item makes it the only selected item
- ...outside any item clears the selection
2019-09-13 21:58:30 +02:00
Andreas Kling
a5e0242992
GTableView: Switch to using GModelSelection to support multi-select
2019-09-07 19:35:45 +02:00
Andreas Kling
7a906ab539
LibGUI: Teach GScrollableWidget how to hide unnecessary scrollbars
...
This is now an opt-in mode enabled by calling:
should_hide_unnecessary_scrollbars(true)
This patch enables the mode for GTreeView and GTableView. :^)
2019-09-05 21:37:15 +02:00
Sergey Bugaev
22e6978c71
WindowServer+LibGUI+FontEditor: Encode special characters as UTF-8
2019-09-05 16:37:39 +02:00
Andreas Kling
8a91b90258
GTableView: Fix column resize cursor not showing up in scrolled tables
...
If the table was scrolled somewhat, we'd stop showing the resize cursor
when hovering the mouse cursor between two table column headers.
2019-08-17 15:01:45 +02:00
Andreas Kling
8031960541
GTableView: Fix row selection when clicking between two cells
...
We should still select the entire row when you click between two cells.
2019-08-17 14:56:53 +02:00
Andreas Kling
9789ee9b58
GTableView: Add a way to customize cell painting per-column
...
You can now set a GTableCellPaintingDelegate per column in GTableView.
For columns with a painting delegate set, the view will defer to the
delegate for painting each cell in that column.
2019-08-14 20:34:46 +02:00
Ignas S
6228e18a09
GTableView and friends: API improvements for 'Sortable' flag.
2019-08-12 11:01:47 +02:00
Ignas S
823d5d097b
GTableView: add 'sortable' column header flag.
...
This prevents sorting unsortable by unsortable things, like icons.
2019-08-12 11:01:47 +02:00
Andreas Kling
b5525d4ec3
GTableView: Add a mode for automatically sizing column to fit content
...
You can now call GTableView::set_size_columns_to_fit_content(true) and
the table columns will grow to fit the content. They will never shrink,
only grow.
This means I can spend a lot less time fidgeting with column widths :^)
2019-08-09 19:30:24 +02:00
Andreas Kling
899366da9d
GTableView: Debug-log the current column width while resizing
...
This makes it easier to decide on a good initial width for a column.
2019-08-08 20:41:24 +02:00
Andreas Kling
df51014834
GTableView: Elide cell content so it doesn't overflow the cell rect
...
I originally thought I'd have to implement text clipping in Painter for
this, but it seems like I can get away without doing that today. :^)
Fixes #390 .
2019-07-31 21:18:01 +02:00
Andreas Kling
04b9dc2d30
Libraries: Create top level directory for libraries.
...
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00