Benjamin Otte
727a78a74f
gtk-demo: Add an "Unsorted" option (and default to it)
...
Tests the previous commit and ensures that selecting 16M colors actually
works quickly (it does).
2020-06-21 14:17:47 +02:00
Benjamin Otte
a928ea6c57
sortlistmodel: Look at order
...
For now, we just look at SORT_ORDER_NONE to bypass any sorting.
2020-06-21 14:17:47 +02:00
Benjamin Otte
d3f7dea624
gtk-demo: Reinstate incremental filling
...
Do it via the new size setting on the color list.
Also add an option to set the maximum size of the color list that it'll
be filled to so rudimentary performance testing is possible.
Hint: Do not select 16777216.
This reinstates commit c16848c2bb683f7ddf51571aa5951f8a4a1ea622.
2020-06-21 14:17:47 +02:00
Benjamin Otte
456b7628ee
gtk-demo: Allow color list to have any size
...
For now, limit it to 1<<12 so the sorters don't explode.
2020-06-21 14:17:47 +02:00
Benjamin Otte
f149beb474
gtk-demo: Add a permutation to compute colors from the position
...
This way, the colors are furthest apart at the start and fill up the
remaining spots towards the end.
2020-06-21 14:17:47 +02:00
Benjamin Otte
1b0451761a
gtk-demo: Add custom listmodel for all true colors.
2020-06-21 14:17:47 +02:00
Benjamin Otte
1d26341b03
gtk-demo: Make colors demo contain all 16,777,216 colors
...
This makes it slightly slow, so not sure it should stay like this.
2020-06-21 14:17:47 +02:00
Benjamin Otte
8348a113c6
gtk-demo: Compute HSV values directly
2020-06-21 14:17:47 +02:00
Benjamin Otte
bfdede7acc
Revert "gtk-demo: Make the colors demo populate incrementally"
...
This eases adding a bunch of follow-up features. After those features
have landed, this functionality will be readded.
This reverts commit a10340859d
.
2020-06-21 14:17:47 +02:00
Benjamin Otte
70894b48af
gtk-demo: Embed the RGBA value
2020-06-21 14:17:47 +02:00
Aurimas Černius
b0c6b282fd
Updated Lithuanian translation
2020-06-21 14:47:05 +03:00
Piotr Drąg
393054dd3f
Update Polish translation
2020-06-21 11:37:46 +02:00
Matthias Clasen
97b10df723
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2122
2020-06-21 05:58:15 +00:00
Matthias Clasen
62b214ffdf
filechooserwidget: Use gtk_drop_down_get_selected_item
...
This showed up as a test failure when we get NULL as
selected item and then try to unref it. Luckily
get_selected_item is transfer none, so we don't have
to worry about it.
2020-06-21 01:20:05 -04:00
Benjamin Otte
3549f43902
demo: Use GtkDropDown::selected-item
2020-06-21 02:23:46 +02:00
Benjamin Otte
45167d5c0d
dropdown: emit notify for selected from the changed callback
...
Otherwise we don't emit it when the selection itself changes it - for
exaple because the model changed.
2020-06-21 02:23:46 +02:00
Matthias Clasen
0214b98c5e
Merge branch 'matthiasc/for-master' into 'master'
...
misc listview scrolling fixes
See merge request GNOME/gtk!2119
2020-06-20 21:21:29 +00:00
Matthias Clasen
19c38158fc
Merge branch 'incremental-colors' into 'master'
...
Incremental colors demo
See merge request GNOME/gtk!2121
2020-06-20 20:35:23 +00:00
Matthias Clasen
7ff35340ca
Merge branch 'drop-down-selected-item' into 'master'
...
dropdown: Add GtkDropDown:selected-item
Closes #2861
See merge request GNOME/gtk!2120
2020-06-20 18:51:18 +00:00
Matthias Clasen
a10340859d
gtk-demo: Make the colors demo populate incrementally
...
Add a refill button that incrementally refills the color
demo. This is useful to test how the grid view operates
when the model is frequently changed.
2020-06-20 14:47:57 -04:00
Matthias Clasen
8475d88af0
gtk-demo: Clean up initial selection handling
...
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in 10bcbae68c
.
2020-06-20 14:47:39 -04:00
Matthias Clasen
79b1d24128
Merge branch 'gtk4-arb_fbo' into 'master'
...
Switch to GL_ARB_framebuffer_object
See merge request GNOME/gtk!2079
2020-06-20 17:12:52 +00:00
Matthias Clasen
ad98e72884
dropdown: Add GtkDropDown:selected-item
...
This is the same readonly property we have in
GtkSingleSelection.
Fixes : #2861
2020-06-20 13:11:48 -04:00
Matthias Clasen
3fab2b55cc
gtk-demo: Clean up memory handling in the weather demo
...
gtk_weather_info_new was consuming the info, but not
the timestamp, which confused me. Make it not consume
either, and be more explicit about where the unrefs
happen.
2020-06-20 12:18:17 -04:00
Matthias Clasen
2842030e59
gridview: Don't assert on a condition that can happen
...
We are currently not robust against model changes or
widget invalidations, so we can actually end up in
situations where we run out of items here. Handle
the failure a bit more gracefully, by returning NULL.
This is good enough to make scrolling work okish most
of the time. We still need a proper fix to handle
other situations.
2020-06-20 12:11:59 -04:00
Benjamin Otte
7c2d21892f
gridview: Compute right amount of items to skip
...
We only want to skip the remaining items in the current row, not since
the start of the widget.
2020-06-20 12:08:46 -04:00
Matthias Clasen
677bfe6857
gtk-demo: Clean up initial selection handling
...
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in 10bcbae68c
.
2020-06-20 08:48:29 -04:00
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