Commit Graph

63726 Commits

Author SHA1 Message Date
Matthias Clasen
3bddbcdd52 inspector: Expand the property list
It looks better this way.
2020-05-30 20:01:14 -04:00
Matthias Clasen
13d5d60db0 inspector: Expand the object tree
This is how it used to look, and it looks better that way.
2020-05-30 20:01:14 -04:00
Matthias Clasen
1b24528b9c columnview: Take expand into account
When allocating columns, distribute extra space
to columns that have expand set to TRUE.
2020-05-30 20:01:14 -04:00
Matthias Clasen
6e7ebc49eb columnviewcolumn: Add an expand property
This will be used to determine how to distribute
available extra space in a column view.
2020-05-30 20:01:14 -04:00
Matthias Clasen
bdc6770bd9 gtk-demo: Add more scrolling benchmarks
Add a listview and gridview to the scrolling
benchmarks.
2020-05-30 20:01:14 -04:00
Matthias Clasen
8d2fef1e23 gtk-demo: Make gridview demo use rubberbanding 2020-05-30 20:01:14 -04:00
Matthias Clasen
90668f7e01 Add rubberband api
Add an enable-rubberband property to GtkListView,
GtkGridView and GtkColumnView.
2020-05-30 20:01:14 -04:00
Matthias Clasen
74f72a146c listbase: Add rubberband selection
Implement the typical rubberband selection, including
autoscroll. This is only useful with multiselection,
and not very compatible with single-click-activate.
Therefore, it is not enabled by default, and needs
to be turned on with the enable-rubber-band property.
2020-05-30 20:01:14 -04:00
Matthias Clasen
5553bf1c39 Add GtkMultiSelection
This is implemented using a private GtkSet helper.
2020-05-30 20:01:14 -04:00
Matthias Clasen
77a3f81971 Add a selection model test
The test shows that we are failing to emit
::selection-changed in some circumstances.
2020-05-30 20:01:14 -04:00
Matthias Clasen
b3e0353e6b testcolumnview: Reordering in the column editor
Use Ctrl-Up/Down to move the column around.
2020-05-30 20:01:14 -04:00
Matthias Clasen
780915e318 testcolumnview: Flesh out column editor
Turn the column list into an editor with
controls for visibility, resizability, reorderability
and width.
2020-05-30 20:01:14 -04:00
Matthias Clasen
7242b801ff columnviewtitle: Display a context menu
When the ::header-menu property is set on the
column, use the menu model to create and show
a context menu.
2020-05-30 20:01:14 -04:00
Matthias Clasen
88669080c4 columnviewcolumn: Add a menu property
Add a ::header-menu property that will be used
to create a context menu for the header of the
column.
2020-05-30 20:01:14 -04:00
Matthias Clasen
51e8dc924b columnview: Add autoscroll
Autoscroll when the pointer gets close to the
edge during column resizing or reordering. This
is similar to what the treeview does, but it is
implemented using a tick callback, and has
variable speed.
2020-05-30 20:01:14 -04:00
Matthias Clasen
29b5d3ab38 columnview: Allow to cancel reorder with Escape
The treeview does this too.
2020-05-30 20:01:14 -04:00
Matthias Clasen
bb06fffab1 columnview: Interactive column reordering
Allow rearranging columns by dragging, in the same
way the treeview does.

We add the "dnd" style class to the header while
it is dragged, and we move the header of the dragged
column to the end of its parents children, so that
it gets drawn on top.
2020-05-30 20:01:14 -04:00
Matthias Clasen
94c5b00231 columnviewcolumn: Add a reorderable property
This will be used for interactive column reordering
in the future.
2020-05-30 20:01:14 -04:00
Matthias Clasen
59e49dafd7 columnviewlayout: Use header allocation for titles
Normally, this will be identical to the column
allocation, but we will temporarily change it
during column reordering.
2020-05-30 20:01:14 -04:00
Matthias Clasen
d5ce5b53d6 columnviewcolumn: Add reordering helpers
Add helper functions that let us temporarily give
a different allocation to headers. These will be
used to implement interactive column reordering
in GtkColumnView.
2020-05-30 20:01:14 -04:00
Matthias Clasen
915bdf24a7 columnviewtitle: Invert on release
This is necessary to make drag-to-reorder work
without triggering inversion.
2020-05-30 20:01:14 -04:00
Matthias Clasen
114054266b columnview: Interactive column resizing
This copies just enough of the treeview code to
get columns moving.
2020-05-30 20:01:14 -04:00
Matthias Clasen
dcea6d6cda columnviewcolumn: Add a helper
We need to check whether clicks are in the headers
of columns, so let the column view get at the the
header widget.
2020-05-30 20:01:14 -04:00
Matthias Clasen
a118267ab7 columnviewcolumn: Add a resizable property
This will be used for interactive column resizing
in the future.
2020-05-30 20:01:14 -04:00
Matthias Clasen
cc63c581c3 columnview: Add a helper
The column code needs to get access to the
listitem widgets that are children of the listview,
so add a getter.
2020-05-30 20:01:14 -04:00
Matthias Clasen
dbc1a8ba11 columnview: Add column reordering
Add an API to allow reordering columns.
2020-05-30 20:01:14 -04:00
Matthias Clasen
515a86645a columnview: Implement horizontal scrolling
The listview inside always thinks it gets its full size,
and updates its horizontal adjustment accordingly.

So keep our own adjustment, and update it in size_allocate.
2020-05-30 20:01:14 -04:00
Matthias Clasen
cbabb85e6d columnview: Revise scroll-minimum handling
Tweak the behavior slightly. We don't show
a scrollbar as long as we have at least
min-size available, but we still give the
entire size to the child, up to nat-size.

This matches how viewports handle scroll-minimum.
2020-05-30 20:01:14 -04:00
Matthias Clasen
1031625bd4 columnviewcolumn: Add a visible property
This lets us hide columns, which is useful.
2020-05-30 20:01:14 -04:00
Matthias Clasen
65ed3aa1d9 inspector: Touch up list styling
This is just the minimal amount of work to make
headers recognizable.
2020-05-30 20:01:14 -04:00
Matthias Clasen
ed04c46078 inspector: Use a column view for actions
A straight conversion from list box to column view.
2020-05-30 20:01:14 -04:00
Matthias Clasen
1b2df91e6d inspector: Make the resource list sortable
This is using a GtkTreeListRowSorter to keep expanded
state of the tree while changing the sorting.
2020-05-30 20:01:14 -04:00
Matthias Clasen
f745c0c2aa inspector: Use a column view for the resource list
A conversion from tree view to column view.
2020-05-30 20:01:14 -04:00
Matthias Clasen
2ed46450ea inspector: Use a column view for properties
Just a straight conversion from list box to column view.
2020-05-30 20:01:14 -04:00
Matthias Clasen
6d168079d4 inspector: Add columns to the object tree
Add columnview columns in the object tree.
We do the same for treeview columns.
2020-05-30 20:01:14 -04:00
Matthias Clasen
fc9462d49e Add some tests for new GtkBuilder syntax
Some valid and invalid examples for <closure>,
<lookup> and <constant>.
2020-05-30 19:31:38 -04:00
Matthias Clasen
9c849d2084 docs: Update the list widget overview
Fill in the GtkComboBox and GtkCellView replacements
in the quick reference table.
2020-05-30 19:31:38 -04:00
Matthias Clasen
336b30c532 gtk-demo: Add a large grid demo
This is similar to the flowbox demo, but much bigger.
2020-05-30 19:31:38 -04:00
Matthias Clasen
b331e29e43 inspector: Use dropdowns in the visual page
Convert everything in the visual page to dropdowns.
2020-05-30 19:31:38 -04:00
Matthias Clasen
54cdafdd67 inspector: Use a dropdown for size groups
Use a GtkDropDown for the modes of size groups.
2020-05-30 19:31:38 -04:00
Matthias Clasen
30541201b6 inspector: Use a dropdown for controllers
Use a GtkDropDown for the phases of event controllers.
2020-05-30 19:31:38 -04:00
Matthias Clasen
6346fa960c inspector: Use a dropdown for attribute mapping
Use a GtkDropDown for the attribute mapping editor.
2020-05-30 19:31:38 -04:00
Matthias Clasen
99c98d0736 inspector: Use dropdowns in property editor
Replace combo boxes by dropdowns in the property editor.
2020-05-30 19:31:38 -04:00
Matthias Clasen
496e673d77 filechooser: Use a dropdown for choices 2020-05-30 19:31:38 -04:00
Matthias Clasen
d3aad3b574 filechooser: Use a dropdown for the filter combo
Replace an internal use of GtkComboBox with GtkDropDown.
2020-05-30 19:31:38 -04:00
Matthias Clasen
371dab51bb Add GtkDropDown
This is a simple drop down control using list models.
2020-05-30 19:31:38 -04:00
Benjamin Otte
3ea2258ce9 xxx: isnanf() is some wtf 2020-05-30 19:30:14 -04:00
Matthias Clasen
c7feae65f1 builderlistitemfactory: Precompile the xml
This is the one place where we can really take advantage
of precompiling, since we instantiate this template
over and over.
2020-05-30 19:30:14 -04:00
Matthias Clasen
b087948933 gtk-demo: Use single-click-activate for minesweeper
The explanation say we do, so do it.
2020-05-30 19:30:14 -04:00
Matthias Clasen
f611d55f16 Spread single-click-activate api
This makes sense to have in all the views,
not just GtkListView.
2020-05-30 19:30:14 -04:00