Commit Graph

64678 Commits

Author SHA1 Message Date
Matthias Clasen
b7ddf0b2e5 Merge branch 'dnd-demo-animation' into 'master'
gtk-demo: Add animated icons to the dnd demo

See merge request GNOME/gtk!2117
2020-06-19 23:57:47 +00:00
Matthias Clasen
eb25fc1d5a gtk-demo: Add animated icons to the dnd demo
This is to test animated drag icons.
2020-06-19 19:26:43 -04:00
Matthias Clasen
395d40485d Merge branch 'listview-dnd' into 'master'
Listview dnd

See merge request GNOME/gtk!2116
2020-06-19 22:24:36 +00:00
Matthias Clasen
17af979b24 testlistdnd: Use editable labels
Use editable labels instead of entries, and write
changes back to the model.
2020-06-19 16:30:25 -04:00
Matthias Clasen
8511f25b97 editablelabel: Allow to drag text
If we allow editing, we should allow direct drags too.
2020-06-19 15:26:53 -04:00
Matthias Clasen
290611f9ce editablelabel: Accept text drops
This seems natural. If we allow editing, we should
allow drops too.
2020-06-19 15:26:53 -04:00
Matthias Clasen
6280066207 testlistdnd: Add a tree
This lets us test auto-expand of tree expanders.
2020-06-19 15:26:47 -04:00
Matthias Clasen
f054c317ee expander: Remove a pointless return
GtkDropControllerMotion::enter does not expect
a boolean return value, so don't provide one.
2020-06-19 15:26:47 -04:00
Matthias Clasen
9555e611e1 treeexpander: Auto-expand during DND
When hovering over a tree expander during DND,
expand the tree after a timeout. This matches
the behavior of GtkTreeView and GtkExpander.
2020-06-19 15:26:47 -04:00
Matthias Clasen
5629ac3c63 Add a list dnd example
Add a test for dnd with listview, gridview and columnview.
2020-06-19 15:26:10 -04:00
Matthias Clasen
110c316810 columnview: Increase the autoscroll threshold
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
2020-06-19 15:26:10 -04:00
Matthias Clasen
470a1aabdd columnview: Autoscroll during DND
Use a drop motion controller to autoscroll horizontally
while a drag operation is hovering over the list. The
vertical scrolling is handled by the listview.
2020-06-19 15:26:10 -04:00
Matthias Clasen
b299d62a73 columnview: separate autoscroll from headers
Break out an update_autoscroll() function that can
be used for other things than header DND. It will
be used for autoscroll during DND in the future.
2020-06-19 15:26:10 -04:00
Matthias Clasen
02b293b59c listbase: Don't use adjustments for autoscrolling
Don't consult the adjustments when determining
scroll deltas. It isn't necessary.
2020-06-19 15:26:10 -04:00
Matthias Clasen
c659a231d6 listbase: Increase the autoscroll threshold
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
2020-06-19 15:26:10 -04:00
Matthias Clasen
4e56581222 listbase: Autoscroll during DND
Use a drop motion controller to autoscroll while
a drag operation is hovering over the list.
2020-06-19 15:26:10 -04:00
Matthias Clasen
e8ba16d9c2 listbase: separate autoscroll from rubberband
Break out an update_autoscroll() function that can
be used for other things than rubberbanding. It will
be used for autoscroll during DND in the future.
2020-06-19 15:26:10 -04:00
Matthias Clasen
4a43c77f66 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2115
2020-06-19 16:17:27 +00:00
Matthias Clasen
55936087e0 columview: Fix cell creation
We were getting lost in the columnview internal
structure here. The rows are children of the listview,
not of the columnview itself.
2020-06-19 11:42:58 -04:00
Matthias Clasen
3141eaecd0 gtk-demo: Modernize the tag entry demo
Use a layout manager, and reduce boilerplate.
2020-06-19 11:42:47 -04:00
Matthias Clasen
69e14ba02f Revert "notebook: Don't capture clicks"
This reverts commit 37eb0496b6.

This change broke notebook scroll arrows.
2020-06-19 11:42:47 -04:00
Benjamin Otte
dffbcd8fdf Merge branch 'wip/otte/for-master' into 'master'
listbase: Fix copy/paste error

See merge request GNOME/gtk!2114
2020-06-19 15:20:32 +00:00
Benjamin Otte
ff3b03c5e2 listbase: Fix copy/paste error
This could lead to "flickering" scroll behavior when scrolling
horizontally.
2020-06-19 15:51:52 +02:00
Florentina Mușat
32f4aa12cd Update Romanian translation 2020-06-19 06:17:36 +00:00
Timm Bäder
fbb7948c13 stack: Avoid using an uninitialized value
This was showing up as criticals since for_size != >= -1.
2020-06-19 05:58:52 +02:00
Timm Bäder
d81a5a8338 stack: Add missing accessors for GtkStackPage properties 2020-06-19 05:26:25 +02:00
Timm Bäder
652323a4bf stack: Fix some documentation mishaps 2020-06-19 05:26:25 +02:00
Timm Bäder
e45518fb5f stack: Fix :needs-attention docs
This is a property on GtkStackPage these days.
2020-06-19 05:26:25 +02:00
Timm Bäder
424e46849a widget: Don't leak css transform 2020-06-19 05:26:25 +02:00
Timm Bäder
68886ba847 treeview: Remove identical if branches
Fixes #2725
2020-06-19 05:26:25 +02:00
Timm Bäder
da85815399 transform: Fix docs to use "transform" instead of "matrix" 2020-06-19 05:26:25 +02:00
Timm Bäder
3bd648e72e stack: stop keeping a cached child render node around
All widgets cache their render node already. Just allocate the
last_visible_child always at 0/0 and then move its rendernode around
during snapshot.

Fixes #2678
2020-06-19 05:26:25 +02:00
Timm Bäder
2ae8ace784 cssselector: Only copy max_selector once 2020-06-19 05:26:25 +02:00
Timm Bäder
1f89f21ca9 numbervalue: Remove some leftover debugging code 2020-06-19 05:26:25 +02:00
Timm Bäder
c6921cdc9d builder: Use default size of 8 for the ObjectProperty arrays 2020-06-19 05:26:25 +02:00
Timm Bäder
7c9f2949ce builder: Avoid allocating things we don't use
We pretty often have no parameters at all, so avoid allocating
ObjectProperties+GArray+GPtrArray in that case.
2020-06-19 05:26:25 +02:00
Timm Bäder
0b13e68bca Avoid calling g_list_model_get_n_items() all the time
These are used in hot paths, e.g. widget construction.
2020-06-19 05:26:25 +02:00
Timm Bäder
5dde4c0a39 transform: Fix equal() docs
This has nothing to do with matrices.
2020-06-19 05:26:25 +02:00
Timm Bäder
b2875d7b19 window: Add automatic titlebar before content widget
Just like we do with explicitly set titlebars
2020-06-19 05:26:24 +02:00
Timm Bäder
0c1cfbbad1 transform: Compare 3d points directly 2020-06-19 05:26:24 +02:00
Timm Bäder
ddacf8cc43 window: Don't add class to css node directly
Use gtk_widget_add_css_class instead
2020-06-19 05:26:24 +02:00
Timm Bäder
395d13d5f1 window: Stop adding css nodes manually
No decoration node, no need to do this.
2020-06-19 05:26:24 +02:00
Timm Bäder
1e6e522a93 window: Remove dead code
There is no decoration node anymore.
2020-06-19 05:26:24 +02:00
Timm Bäder
f49a02e5b5 adwaita: Use proper transform for spinners 2020-06-19 05:26:24 +02:00
Timm Bäder
1e4dc90d62 widget: don't queue a redraw on css transform changes 2020-06-19 05:26:24 +02:00
Timm Bäder
2c3a41a81a csstransformvalue: Make no-transform case explicit 2020-06-19 05:26:24 +02:00
Timm Bäder
203bb42cc1 widget: Re-shuffle preconditions in snapshot_child()
The GtkNative type check is more expensive than the mapped one, so avoid
the former for unmapped widgets
2020-06-19 05:26:24 +02:00
Timm Bäder
461497e8d4 widget: Avoid doing GtkSnapshot work just to append one node
We already know that a widget will have literally 1 node, not more.
Avoid doing the GtkSnapshot state stack dance and just append a new
transform node instead.

Seems to give me around 400 more icons in the fishbowl
2020-06-19 05:26:24 +02:00
Timm Bäder
a974c83423 gsktransform: Make next == NULL case explicit
This is handled with the is_identity() check as well but this way it's
much more obvious what's happening
2020-06-19 05:26:24 +02:00
Timm Bäder
5eb181281a fishbowl: Remove visibility handling
First, almost all widgets are either visible and mapped, or visible and
unmapped because they are !child_visible. In both cases, we do care
about the size. If they are indeed invisible, gtk_widget_measure() will
take care of that by returning all 0.

And gtk_widget_unparent() already queues a resize on the parent if
necessary, so that is unneeded as well.
2020-06-19 05:26:24 +02:00