Commit Graph

63801 Commits

Author SHA1 Message Date
Matthias Clasen
78a06859b9 Merge branch 'columnview-expand' into 'master'
columnview: Implement expanding columns

See merge request GNOME/gtk!2007
2020-06-03 21:39:33 +00:00
Matthias Clasen
3ec8f4e84e Merge branch 'columnview-reordering' into 'master'
columnview: Implement interactive reordering

See merge request GNOME/gtk!2006
2020-06-03 21:38:59 +00:00
Matthias Clasen
f13a596d15 Merge branch 'columnview-resizing' into 'master'
columnview: Implement interactive resizing

See merge request GNOME/gtk!2004
2020-06-03 20:04:17 +00:00
Matthias Clasen
94f14778a3 Merge branch 'columnview-scrolling' into 'master'
columnview: Implement horizontal scrolling

See merge request GNOME/gtk!1998
2020-06-03 19:50:59 +00:00
Benjamin Otte
7312284e4f Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

See merge request GNOME/gtk!2024
2020-06-03 17:40:26 +00: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
50f4e53aef Merge branch 'matthiasc/for-master' into 'master'
gtk-demo: Add a dropdown demo

See merge request GNOME/gtk!2023
2020-06-03 17:30:19 +00: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
Benjamin Otte
a60c866a12 listbase: Don't grab_focus() when moving focus
We want to call gtk_widget_child_focus() to have Tab focus the right
widget.
2020-06-03 18:12:49 +02:00
Benjamin Otte
a84f6228ca listitemwidget: Fix focus handling for columnview
ListItemWidget needs to be aware of potentially having multiple
children, so make it aware.
2020-06-03 18:12:00 +02: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
Benjamin Otte
aa38fc712f listbase: Fix leak
We were leaking the temporary tracker here.
2020-06-03 17:49:04 +02:00
Matthias Clasen
0b1c91dc7c gtk-demo: Add a dropdown demo
This shows a few examples of GtkDropDown.
Mostly taken from tests/testdropdown.c.
2020-06-03 11:34:06 -04: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