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
4a4c15b2ac
gtk-demo: Add filtering to the settings demo
...
A demo of filtering with lists was missing so far.
2020-05-30 19:30:14 -04:00
Matthias Clasen
8804427677
gtk-demo: Demo columnview sorting
...
Enhance the settings demo to have a sortable column.
2020-05-30 19:30:14 -04:00
Matthias Clasen
d717971f41
gtk-demo: Cosmetic improvements to the listview demos
...
Set default sizes, window titles and add more
detail to the descriptions.
2020-05-30 19:30:14 -04:00
Benjamin Otte
b43c8ae646
expression: Allow passing a this object to bind()
...
This gives a bit more control over the arguments passed to expressions.
2020-05-30 19:26:46 -04:00
Benjamin Otte
22e6fa3a64
gtk-demo: Add a Clocks demo
...
This demo is meant to showcase expressions.
It also needs the fixes in glib 2.64 to work properly.
2020-05-30 19:26:46 -04:00
Benjamin Otte
a44c06b264
gtk-demo: Add a Coverflow application launcher
...
This is roughly the simplest demo I could come up with.
But I documented it, so there's your tutorial.
Related: #2214
2020-05-30 19:26:46 -04:00
Benjamin Otte
ca9e0c0e68
gtk-demo: Add a minesweeper demo
...
The demo shows creating ones own listmodel and using it to fill a grid.
I am totally getting the hang of React btw:
500 lines of logic with no UI code and 100 lines of GtkBuilder XML and
I get a sweet UI.
2020-05-30 19:26:46 -04:00
Benjamin Otte
6b98948f9a
demo: Add a file browser demo
2020-05-30 19:26:46 -04:00
Timm Bäder
a8d2bb6b22
demo: Use a listview as sidebar
2020-05-30 19:26:45 -04:00
Benjamin Otte
fcdc5030bd
gtk-demo: Introduce awards
...
We need a way to get a useful listbox, so here we go!
2020-05-30 19:26:45 -04:00
Benjamin Otte
bb7968ba77
demo: Add a GSettings tree demo
...
It is meant to look somewhat like dconf-editor when it is done.
So far, it's just a list.
2020-05-30 19:26:45 -04:00
Benjamin Otte
626c525706
listview: Expose GtkListItemFactory APIs
...
Due to the many different ways to set factories, it makes sense to
expose them as custom objects.
This makes the actual APIs for the list widgets simpler, because they
can just have a regular "factory" property.
As a convenience function, gtk_list_view_new_with_factory() was added
to make this whole approach easy to use from C.
2020-05-30 19:26:45 -04:00
Benjamin Otte
2ef2148fb5
gtk-demo: Add a rough start at a Weather demo
...
This demos a horizontal listview.
2020-05-30 19:26:45 -04:00
Benjamin Otte
d3dc9c41b4
gtk-demo: Make fishbowl info text use bindings
...
It's a good demo for how bindings can format multiple properties into an
informative string with 1 line of code (and 5 lines of XML).
2020-05-30 19:26:44 -04:00
Yuri Chornoivan
01bd4cc4e1
Fix minor typos
2020-05-28 11:00:03 +03:00
Matthias Clasen
ffa5334a2d
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Fix the dnd demo drop highlight
See merge request GNOME/gtk!1958
2020-05-23 00:05:16 +00:00
Matthias Clasen
5f6d072459
gtk-demo: Fix the dnd demo drop highlight
...
We want the drop highlight to be around the label,
not around the item containing it, so move the drop
target gesture to the right widget.
2020-05-22 18:52:56 -04:00
Matthias Clasen
ca1c570c21
gtk-demo: Stop using appmenu apis
...
The appmenu-related GtkApplication apis are going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
0f053d1804
gtk-demo: Improve rotation in the dnd demo
...
Make the drag icon preserve the rotation, and improve
placement for the editor and for dnd to take the offset
into account.
2020-05-22 15:38:02 -04:00
Matthias Clasen
7fac6b37db
gtk-demo: Improve editing in the dnd demo
...
Add a scale for the angle, make the edits apply immediately,
and keep the item visible.
2020-05-22 14:06:00 -04:00
Matthias Clasen
d2f979ffaf
gtk-demo: Improve drag icon handling in dnd example
...
Make the opacity change only apply to the 'ghost' of
the item, not the drag icon.
2020-05-22 13:25:17 -04:00
Matthias Clasen
e54060bac2
gtk-demo: Fix entry position in dnd demo
...
gtk_fixed_get_child_position does not work if children
have transforms that are not just 2D translations.
Use gtk_widget_translate_coordinates instead.
2020-05-22 13:17:59 -04:00
Matthias Clasen
965483eb67
gtk-demo: Reorganize the dnd demo
...
Introduce a CanvasItem widget to make things a
bit less ad hoc.
2020-05-22 12:35:18 -04:00
Matthias Clasen
028bccc188
gtk-demo: Use proper drag icons in the dnd demo
...
Use a widget paintable to make the drag icon appear
in two places at once.
2020-05-22 10:50:09 -04:00
Matthias Clasen
8f5444c75b
gtk-demo: Fix breakage in a css demo
...
This is fallout from container api changes. We
were treating a GtkOverlay like a GtkBox, which
it isn't.
2020-05-21 16:24:56 -04:00
Matthias Clasen
96c0fbf209
gtk-demo: Plug another leak
...
We were leaking the builder in the css blendmodes demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 16:24:20 -04:00
Matthias Clasen
98178d8823
gtk-demo: Plug another leak
...
We were leaking the builder in the revealers demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 16:23:42 -04:00
Matthias Clasen
3f6dd34b18
gtk-demo: Plug another leak
...
We were leaking the builder in the cursors demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 15:41:54 -04:00
Matthias Clasen
aaed61de66
gtk-demo: Plug a leak
...
We were leaking the builder in the builder demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 15:41:48 -04:00
Timm Bäder
4b5a8c45b4
gtk4-demo: Fix css_basics demo
2020-05-20 10:29:50 +02:00
Timm Bäder
ae54517b33
gtk4-demo: Fix sliding puzzle demo
2020-05-20 10:29:50 +02:00
Alexander Larsson
32f58e6c0b
gtk-demo/dnd: Fix up drag_cancel
...
This needs to return a boolean, also it should not call end because
that will be called anyway by Gtk+ after cancel, and this was causing
warnings due to the opacity being unset with no dragged widget set.
2020-05-14 10:45:38 +02:00
Alexander Larsson
707229ce17
gtk-demo/dnd: Use gtk_popover_set_child(), not gtk_box_append
2020-05-14 10:13:05 +02:00
Matthias Clasen
7eaa10dd8e
gtk-demo: Fix a problem with the dnd demo
...
When I move this into gtk-demo, I broke the hack
that ensures the GtkColorSwatch type is registered.
Bring it back.
2020-05-14 01:16:56 -04:00
Matthias Clasen
e9d966488b
gtk-demo: Don't overdraw the fishbowl
...
Set overflow to hidden for the fishbowl widget, so the
blur buttons don't leak out into the window shadow.
2020-05-13 19:21:00 -04:00
Matthias Clasen
e87bc3d33d
gtk-demo: Plug a memory leak
...
This leak was there all along. But with the new
gtk_window_destroy(), it shows up as an unclosable
window. Very noticable.
2020-05-13 17:24:57 -04:00
Alexander Mikhaylenko
3bf6bdae73
demo: Remove double borders from the treeview
2020-05-13 20:57:00 +05:00
Alexander Larsson
a02c588b19
gtk-demo: InfoBar is not a GtkBox anymore
...
Use gtk_info_bar_add_child to add children
2020-05-13 11:04:49 +02:00
Alexander Larsson
fede7cd81c
gtk-demo: Fix expander demo
...
GtkExpander is not a GtkBox anymore, so use the new gtk_expander_set_child()
API.
2020-05-13 10:50:41 +02:00
Matthias Clasen
e7bf4a3de8
tests: Move testcairo into gtk4-demo
...
Replace the boring checkboard pattern with this
exciting drawing, and save one test binary at the
same time!
2020-05-12 15:43:43 -04:00
Emmanuele Bassi
4d09bf3b9b
demos: Remove gtk_dialog_run()
...
Use modal dialogs and the "response" signal.
2020-05-12 13:12:08 +01:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
88141103cd
Don't use container api on GtkListBox
2020-05-11 22:21:39 -04:00
Matthias Clasen
3bff7d3a37
Stop using container api on GtkFlowBox
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
0d57abfe65
Stop using container api on GtkFixed
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
932aa58237
Avoid container api on grids
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bc6643f3c2
paned: Redo the api
...
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.
Update all users.
See #2719
2020-05-11 22:21:33 -04:00
Matthias Clasen
025375ff5f
Replace gtk_widget_destroy everywhere
...
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
2020-05-11 12:20:59 -04:00
Matthias Clasen
cd0081d08a
Use gtk_window_destroy
...
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00