Commit Graph

1573 Commits

Author SHA1 Message Date
Matthias Clasen
4e745f06e9 gtk-demo: Polish all entry demos
Make the spacing a bit more consistent, and tweak
some strings here and there.
2020-11-02 12:01:11 -05:00
Matthias Clasen
14b65a3c4f gtk-demo: Polish the search bar demo
Rename this, and make it look a bit less like a
debugging tool, and more like a demo.
2020-11-02 12:00:24 -05:00
Matthias Clasen
64ad490bc1 gtk-demo: Tweak tagged entry styling
Move the tags closer together, and avoid resizing too much.
2020-11-02 11:59:22 -05:00
Matthias Clasen
d2d7a4bcab gtk-demo: Tweak window titles
This is an attempt to improve consistency in the sidebar
and the window titles.
2020-11-02 11:11:44 -05:00
Matthias Clasen
14cbd13ef2 gtk-demo: Use typographic style classes
We don't need to hardcode <u> in markup anymore.
Use the heading style class instead.
2020-11-02 08:38:20 -05:00
Matthias Clasen
19052d4360 gtk-demo: Tweak descriptions of constraints demos
Make these a little longer, and include more details.
2020-10-30 15:26:37 -04:00
Matthias Clasen
588fe5b5c1 gtk-demo: Tweak the new constraints demo
With these somewhat random ordering changes, things get
closer to working the same as the code example. Still,
the guide doesn't work right.
2020-10-30 15:04:13 -04:00
Matthias Clasen
49bdc4f0c2 Add another constraints demo
This one attempts to use constraints in a ui file.
It doesn't work.
2020-10-30 15:04:13 -04:00
Matthias Clasen
a0ee25a21e gtk-demo: Remove unnecessary code
I was distracted by this code that sets names
on widgets in the constraints demo - the names
aren't used and aren't needed, so remove them.
2020-10-30 15:01:50 -04:00
Matthias Clasen
d5b9489408 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

Closes #3282

See merge request GNOME/gtk!2755
2020-10-27 22:38:58 +00:00
Matthias Clasen
907fc30fac gtk-demo: Add checkmarks to all dropdown demos
This follows the mockups that these demos are
copied from. Unfortunately, it has to be implemented
for every item factory, so we repeat it here.

Fixes: #3291
2020-10-27 16:13:44 -04:00
Timm Bäder
85702f8f5d dnd demo: Make the transform code a bit more idiomatic 2020-10-22 17:46:34 +02:00
Timm Bäder
56e89e8d26 demos: Remove a dead assignment 2020-10-22 17:46:34 +02:00
Matthias Clasen
44c6619660 gtk-demo: Speed up image demo
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ef7499a31b gtk-demo: Add alternative text to a GtkPicture
This lets us text GtkPicture a11y support.
2020-10-22 07:51:44 -04:00
Matthias Clasen
80e0e3fe4f gtk-demo: Set an accessible role
Set the expected accessible role on the tagged entry
widget in the demo of the same name. Accessible tools
may decide to ignore widgets that have the wrong role,
so setting an appropriate role is important.
2020-10-19 12:56:50 -04:00
Matthias Clasen
92585b75fa Fix compiler warnings 2020-10-15 16:33:35 -04:00
Matthias Clasen
0bd5a96d71 gtk-demo: Fix some issues with the multi view demo
The nested window was not modal, causing it to be
inoperable. And the nested views within were all
shrunk down to nothingness. Give them some width.

Fixes: #3257
2020-10-15 14:42:43 -04:00
Matthias Clasen
8cf955731f gtk-demo: Fix up image handling in the clipboard demo
Using GtkIconPaintable+GtkPicture is not good for symbolic
icons - they don't get properly colored that way. So change
things around to use the icon name if we have it.

Fixes: #3252
2020-10-15 09:19:17 -04:00
Timm Bäder
20bd8e56ee gtk4-demo: Add missing margin-bottom
This was setting margin-end twice
2020-10-14 15:06:12 -04:00
Timm Bäder
df2d7c56c7 gtk4-demo: Remove connection to removed signal 2020-10-14 15:06:12 -04:00
Timm Bäder
0dc0b03d6f glarea demo: Add min size to gl area 2020-10-14 15:06:12 -04:00
Matthias Clasen
8a361f901d gtk-demo: Keep undisplayable resources out of view
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2273e27808 gtk-demo: Ellipsize columns in the characters demo
some of the columns have uneven widths, causing them
to bounce around as you scroll. Ellipsize them and
give them a fixed with.
2020-10-14 15:05:46 -04:00
Emmanuele Bassi
43300b4047 Tone down a user visible message
Self-deprecating humour badly translates to a demo message.
2020-10-09 10:14:41 +01:00
Matthias Clasen
3d9eb61bba gtk-demo: Fix an off-by-one error
This was found by the asan build in our ci.
2020-10-07 15:16:31 -04:00
Matthias Clasen
5a9547da41 gtk-demo: Add an svg paintable demo
It is a little annoying that this demo will not show up
if we don't find librsvg, but I think showing how easy
this paintable is outweights the annoyance.
2020-10-06 15:12:09 -04:00
Matthias Clasen
25cbc1a15a gtk-demo: Recognize .svg as images
We can't guarantee that we can load it, but worst
case you'll get a missing image.
2020-10-06 15:11:08 -04:00
Matthias Clasen
67c6f0a08a gtk-demo: Mention dataset size for Characters 2020-10-05 14:43:38 -04:00
Matthias Clasen
74d99766e4 gtk-demo: Fix up the Characters demo
Move the Unicode names to a separate source file,
and only build the demo if we have harfbuzz (since
we use script names, and those are only available
with harfbuzz).

Also, fix a forgotten type name.
2020-10-05 09:56:04 -04:00
Matthias Clasen
5d26d11868 gtk-demo: Add a column view demo
Make a column view that is showing some Unicode data.
2020-10-04 22:53:45 -04:00
Matthias Clasen
34f33b36f8 Prevent a crash with script names
We can't pass NULL to gettext().
2020-10-04 21:20:48 -04:00
Matthias Clasen
bea3bc5d27 Update the copy in gtk-demo too 2020-10-04 19:48:46 -04:00
Matthias Clasen
279d3c08a9 gtk-demo: Rename the transition shader files
Easier to find them when their name matches the title
that we show in the UI.
2020-10-03 00:01:25 -04:00
Matthias Clasen
19d760f9dd gtk-demo: Fix a typo 2020-10-02 23:54:15 -04:00
Matthias Clasen
72eb89eda7 gtk-demo: Add the shader paintable sources
This is currently not public GTK api, just part of
the demo. So we should show it here.
2020-09-30 15:41:05 -04:00
Matthias Clasen
fd631937f3 transition demo: Make buttons symbolic
It looks better.
2020-09-30 13:43:36 -04:00
Matthias Clasen
77ec961126 Merge branch 'ebassi/for-master' into 'master'
demo: Replace g_print with g_debug

See merge request GNOME/gtk!2645
2020-09-30 15:22:57 +00:00
Matthias Clasen
924e510512 gtk-demo: Update text for the transitions demo
The fire is gone, but we have wobbly widgets!
2020-09-30 11:19:12 -04:00
Alexander Larsson
d6648871b1 gtk-demo/gltransition: Replace fire background with more mellow blobs 2020-09-30 16:38:50 +02:00
Alexander Larsson
5d4a6940fa gtk-demo: Use duck in transitions to get some alpha example 2020-09-30 16:25:30 +02:00
Emmanuele Bassi
b0a0f07bd7 demo: Replace g_print with g_debug
The GtkGears widget is a bit too chatty, especially when used inside
demos like the fishbowl. Let's use g_debug() instead of g_print() for
the GL debugging message.
2020-09-30 12:35:31 +01:00
Alexander Larsson
e9885f9cde gtk-demo: Make gltransitions demo a bit snazzier
This adds a bunch of snazz to the gltransitions demo. It is perhaps
a bit overloaded now, but it demos everything that we can do.

Changes:
 * The fire shader is now not a bin, it just renders an animating
   background with no textures involved.
 * The stacks don't all start on the same page.
 * The shaderbin passes the mouse coordinate to the shader.
 * The shaderbin allows specifying a "border" so that you can
   cause effects outside the bin child (something that is new to gtk4).
 * All the buttons and the stacks are now in shader-bins that runs
   a wobbly-widget effect based on the mouse position that
   wobbles outside the child allocation.
2020-09-30 11:40:37 +02:00
Alexander Larsson
e76cb3e1e4 gtk-demo: Add a shader paintable to the fishbowl
This gets around 500 instances at 60fps on my system.
2020-09-29 09:51:16 +02:00
Alexander Larsson
8bcb031418 gtk-demo: Add GskGLShaderNode demo
Add adds a demo showing off GskGLShaderNode in various ways.

It has a transistion widget, using some examples from
gl-transitions.com, with child widgets being both images, a GL area
and real widgets (that let you edit the transition shaders
themselves.

It also has a fancy fire effect on hove on the buttons.
2020-09-29 09:51:16 +02:00
Alexander Larsson
16cdb33c6c shadertoy demo: Fix GLSL on GLES
I was getting "assignment to varying fragColor" errors
2020-09-29 09:51:16 +02:00
Matthias Clasen
d5e315c470 gtk-demo: Improve the pickers demo
"Two of every kind..." Add some customized pickers
here. This found a number of issues that have been
fixed in the preceding commits.
2020-09-21 11:53:48 -04:00
Matthias Clasen
6b708e9b60 textbuffer: Redo insert markup a little bit
Redo the tag insertion function to avoid quadratic
behavior, and at the same time, fix handling of
alpha for color attributes.

Update the copy of this function in gtk4-demo
as well.
2020-09-19 14:17:28 -04:00
Matthias Clasen
a8adbfbc9f gtk-demo: Cosmetic changes
Polish the text view demos a little bit.
2020-09-17 21:38:10 -04:00
Matthias Clasen
cf1ed3a72a gtk-demo: Fix toggle- vs checkbutton confusion 2020-09-16 23:07:21 -04:00