Commit Graph

1821 Commits

Author SHA1 Message Date
Matthias Clasen
336b30c532 gtk-demo: Add a large grid demo
This is similar to the flowbox demo, but much bigger.
2020-05-30 19:31:38 -04:00
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
767e7cb06f constraint-editor: Don't poke around in widget internals 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
Benjamin Otte
4abdf695e3 filterlistmodel: Rewrite to use GtkFilter 2020-05-30 12:30:23 -04:00
Matthias Clasen
1f4130b927 widget-factory: Add a mnemonic conflict
Make Alt-e the mnemionic for both the Edit menu
and the Select button on page 2. This shows that
mnemonic cycling doesn't currently work, we always
open the menu.
2020-05-28 08:34:06 -04:00
Yuri Chornoivan
01bd4cc4e1 Fix minor typos 2020-05-28 11:00:03 +03:00
Matthias Clasen
5317e4bc07 constraint-editor: Don't use g_type_ensure
This isn't necessary if we export the get_type function.
2020-05-25 14:14:28 -04: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
d5da3b9199 print-editor: Stop using appmenu apis
The appmenu-related GtkApplication apis are going away.
2020-05-22 17:31:05 -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
Chun-wei Fan
a4416e389a print-editor demo: Fix linking on Visual Studio
We need to pass in '/entry:mainCRTStartup' as we did for the other demo
programs that have 'gui_app: true' in their Meson build settings.
2020-05-18 11:35:52 +08:00
Matthias Clasen
3035bf1e39 widget-factory: Cosmetics
Add a frame around the white background in the background
selection dialog. Otherwise, it is not really visible.
2020-05-16 21:54:14 -04: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
102e7d0838 widget-factory: Ensure we have some backgrounds
The flowbox demo is otherwise less than useful,
if /usr/share/gnome/backgrounds isn't present.

At the same time, give the scale in the listbox
some function.
2020-05-14 00:28:03 -04:00
Matthias Clasen
ce949c0f25 widget-factory: Cosmetic changes
Change which rows in the listbox on page 2 are activatable,
and trigger a dialog. It did not really make sense that this
would happen when clicking on the spin button to focus it.
2020-05-13 19:22:31 -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
Matthias Clasen
ab148c0135 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

Closes #2740, #2742, and #2741

See merge request GNOME/gtk!1890
2020-05-13 12:08:29 +00:00
Matthias Clasen
10813ddc23 Merge branch 'gtk-demo-expander-fix' into 'master'
gtk-demo: Fix expander demo

See merge request GNOME/gtk!1889
2020-05-13 11:44:11 +00:00