Matthias Clasen
510f719975
gtk-demo: Make gridview demo use rubberbanding
2020-06-03 13:34:28 -04:00
Matthias Clasen
03c2202942
Add rubberband api
...
Add an ::enable-rubberband property to GtkListView,
GtkGridView and GtkColumnView.
2020-06-03 13:34:27 -04:00
Matthias Clasen
b3a97cb755
listbase: Simplify rubberbanding
...
The new approach is:
- plain: clear and start a new selection
- extend: add to the existing selection
- modify: subtract from the existing selection
2020-06-03 13:32:57 -04:00
Matthias Clasen
a9273e1c73
listbase: Split off rubberband data
2020-06-03 13:32:57 -04:00
Matthias Clasen
14d11ebcab
listbase: Use a widget for the rubberband
...
We no longer need to juggle manual css nodes. Just create
a widget for the rubberband, and update its allocation
as we rubberband.
2020-06-03 13:32:57 -04:00
Matthias Clasen
7dc458d925
Add autoscroll
...
This is an expected feature with rubberband selection:
as you get close to the edge while doing rubberband
selection, the list scrolls to extend your selection.
2020-06-03 13:32:57 -04:00
Matthias Clasen
a0f04bdcf3
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 explicitly.
2020-06-03 13:32:57 -04:00
Matthias Clasen
28f6e27276
Add GtkMultiSelection
...
This is implemented using a private GtkSet helper.
Includes tests.
2020-06-03 13:32:57 -04:00
Matthias Clasen
5ef427bd65
gtk-demo: Expand columns in the settings demo
...
Expand the columns that are likely to appear
at the end.
2020-06-03 13:32:15 -04:00
Matthias Clasen
03c1fa43f4
inspector: Expand the actions list
2020-06-03 13:32:15 -04:00
Matthias Clasen
3b9f0ab866
inspector: Expand the resource list
...
This is an experiment with adding a filler column.
2020-06-03 13:32:15 -04:00
Matthias Clasen
9617a00ae3
inspector: Expand the property list
...
It looks better this way.
2020-06-03 13:32:15 -04:00
Matthias Clasen
1408199957
inspector: Expand the object tree
...
This is how it used to look, and it looks better that way.
2020-06-03 13:32:15 -04:00
Matthias Clasen
067df8d4dd
columnview: Take expand into account
...
When allocating columns, distribute extra space
to columns that have expand set to TRUE.
2020-06-03 13:32:15 -04:00
Matthias Clasen
2ab1b13092
columnview: Add a GtkColumnViewColumn:expand property
...
This will be used to determine how to distribute
available extra space in a column view.
2020-06-03 13:32:15 -04:00
Matthias Clasen
964d0c219a
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-06-03 13:31:39 -04:00
Matthias Clasen
c58eb9c276
columnview: Allow to cancel reorder with Escape
...
The treeview does this too.
2020-06-03 13:31:39 -04:00
Matthias Clasen
5d4893b3f0
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-06-03 13:31:39 -04:00
Matthias Clasen
11b4e0d4c0
columnview: Add a GtkColumnView:reorderable property
...
This property controls if users can reorder columns
by drag-and-drop. It defaults to TRUE.
2020-06-03 13:31:39 -04:00
Matthias Clasen
e637693131
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-06-03 13:31:39 -04:00
Matthias Clasen
c9d5b77403
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-06-03 13:31:39 -04:00
Matthias Clasen
574595993c
columnviewtitle: Trigger action on release
...
This is necessary to make drag-to-reorder work
without triggering resorting.
2020-06-03 13:31:31 -04:00
Matthias Clasen
ac082e5504
gtk-demo: Make some columns resizable
...
Make the columns in the List > Settings demo
resizable, to demonstrate this functionality.
2020-06-03 12:49:40 -04:00
Matthias Clasen
f65f9591a1
columnview: Interactive column resizing
...
This copies just enough of the treeview code to
get columns moving.
2020-06-03 12:49:40 -04:00
Matthias Clasen
a1eadde25b
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-06-03 12:49:40 -04:00
Matthias Clasen
66e5027756
columnview: Add a GtkColumnViewColumn:resizable property
...
This will be used for interactive column resizing
in the future.
2020-06-03 12:49:38 -04:00
Matthias Clasen
aa2d339508
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-06-03 12:48:56 -04:00
Matthias Clasen
d43aacefc9
columnview: Add GtkColumnViewColumn:fixed-width
...
Add a fixed-width property similar to the same property
of GtkTreeViewColumn.
2020-06-03 12:48:39 -04:00
Matthias Clasen
f0a0e20b2f
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 when allocating.
2020-06-03 12:48:20 -04:00
Matthias Clasen
befdd8bb66
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-06-03 12:48:20 -04:00
Benjamin Otte
27ed2cc009
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2022
2020-06-03 16:33:54 +00:00
Matthias Clasen
19da93b675
Merge branch 'columnview-menu' into 'master'
...
columnview: Add header menus
See merge request GNOME/gtk!2001
2020-06-03 15:51:26 +00:00
Matthias Clasen
ab2c8de4de
Merge branch 'matthiasc/for-master' into 'master'
...
selection model: Further documentation tweaks
See merge request GNOME/gtk!2021
2020-06-03 15:11:59 +00:00
Benjamin Otte
00f2b134e3
columnview: Make sure focus can move into cells
...
The cells themselves should never be focusable though.
2020-06-03 16:55:39 +02:00
Benjamin Otte
0b8cebd6ef
ffmediafile: Add fixes for recent cflags changes
...
Related: #2771
2020-06-03 16:23:49 +02:00
Matthias Clasen
53a9b7f6c0
selection model: Further documentation tweaks
...
Reword this to use plain language instead of throwing
arond reentrancy and ordering.
2020-06-03 07:51:29 -04:00
Matthias Clasen
667fd927ee
Merge branch 'selection-model-docs' into 'master'
...
selectionmodel: Clarify docs
Closes #2806
See merge request GNOME/gtk!2017
2020-06-03 05:27:46 +00:00
Matthias Clasen
a8956838d3
selectionmodel: Clarify docs
...
Clarify some things that were not clear to me before
discussing them.
Fixes : #2806
2020-06-02 15:09:16 -04:00
Matthias Clasen
f6be407e33
Merge branch 'carlosgc/emoji-chooser-fixes' into 'master'
...
Fix emoji chooser warnings on destroy
See merge request GNOME/gtk!2016
2020-06-02 16:06:47 +00:00
Carlos Garcia Campos
2bf9b37e59
emojichooser: Unparent the variations popup on dispose and before adding a new one
...
This was causing warnings when destroying the emoji chooser because it
had children left.
2020-06-02 16:47:56 +02:00
Carlos Garcia Campos
d2e0ada794
textview: Unparent the emoji chooser on dispose
...
This was causing the warning "GtkEmojiChooser is not a child of
GtkTextView" when destroying a GtkTextView if the emoji chooser was
shown.
2020-06-02 16:47:56 +02:00
Matthias Clasen
c07ae5806e
Merge branch 'matthiasc/for-master' into 'master'
...
Cosmetic improvements to the filebrowser demo
See merge request GNOME/gtk!2015
2020-06-02 04:30:29 +00:00
Matthias Clasen
5afe6f7825
Cosmetic improvements to the filebrowser demo
...
Make it look good.
2020-06-01 23:13:20 -04:00
Matthias Clasen
d02c48f987
Add more columns to the settings demo
...
Flesh out this demo more, so we can have a
non-trivial column editor here at some point.
2020-06-01 22:10:53 -04:00
Matthias Clasen
c835214540
Add a header menu to settings demo
...
Allow toggling column visibility from here.
2020-06-01 22:10:53 -04:00
Matthias Clasen
cb2901ec40
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-06-01 22:10:53 -04:00
Matthias Clasen
f27bd061fb
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-06-01 22:10:53 -04:00
Matthias Clasen
572386e4ce
Merge branch 'matthiasc/for-master' into 'master'
...
print backend: Fix list model handling in dispose
See merge request GNOME/gtk!2013
2020-06-02 00:07:45 +00:00
Matthias Clasen
67a972182e
Merge branch 'ebassi/expression-type' into 'master'
...
Ebassi/expression type
See merge request GNOME/gtk!2014
2020-06-01 22:48:26 +00:00
Matej Urbančič
5955e11a5a
Added Slovenian translation
2020-06-01 22:19:55 +02:00