Commit Graph

1766 Commits

Author SHA1 Message Date
Benjamin Otte
6c87d362c5 enums: Add a GtkSymbolicColor enum
That way we don't nedmagic numbres to index the colors array.

Use it in the symbolic paintable demo.
2021-08-30 04:36:16 +02:00
Benjamin Otte
7cdbdb663c gtk-demo: Add a symbolic paintable demo
Don't click the button!
2021-08-29 04:29:53 +02:00
Benjamin Otte
1b390d3857 gtk-demo: Explicitly pass nuclear icon colors 2021-08-29 04:29:53 +02:00
Matthias Clasen
38040c96d6 More markup demos
Showing more of what Pango can do.
2021-08-25 19:38:59 -04:00
Matthias Clasen
b9cad7cc54 textview: Implement new pango attributes
Implement the word and sentence attributes.
2021-08-25 14:57:13 -04:00
Matthias Clasen
bf21df4195 Add an example for text transforms
Show some transformed text in the markup demo.
2021-08-22 15:57:50 -04:00
Matthias Clasen
417b3f9c6b Implement text transforms for GtkTextView
Add a property to GtkTextTag and do all the
legwork to translate it to the Pango attribute.
2021-08-22 15:57:50 -04:00
Matthias Clasen
ba95ef63da Drop PANGO_VERSION_CHECK checks
We require Pango 1.49 now.
2021-08-22 15:26:23 -04:00
Matthias Clasen
6c19a8352f gtk-demo: Add a line height demo
Add an example for widely spaced text to the markup demo.
2021-08-22 15:15:50 -04:00
Matthias Clasen
e3df89b524 gtk-demo: Improve markup demo
The font sizes demo had the space between the font-size spans,
causing us to have a run with just a default sized space between
the words, which in turn leads to wobbly cursor sizes. Avoid that
by including the space in the preceding span.

Also, make it bigger.
2021-08-22 15:15:50 -04:00
Matthias Clasen
a9003f7ac0 gtk-demo: Set line height from markup
Keep the import-markup code in sync with GtkTextBuffer.
2021-08-22 15:15:50 -04:00
Matthias Clasen
5feba67a3d Handle new pango attribute type
Update all the places where we switch over
PangoAttrType to handle PANGO_ATTR_TEXT_TRANSFORM,
and do nothing for now - text-transform support
will land in 4.6.
2021-08-22 11:04:28 -04:00
Benjamin Otte
6b733d2943 gtk-demo: Make clipboard demo paste from clipboard
The old code was just pasting local clipboard data that we put there
ourselves and was causing criticals on remote clipboard data. Now the
code does the proper async paste.
2021-08-19 03:16:48 +02:00
Benjamin Otte
7bc1c9a562 demo: Add a dnd special-case for textures
If the DND/clipboard machinery knows a texture is a texture, it will try
to serialize it. Paintables can't be serialized, so it wouldn't try.
2021-08-19 03:16:48 +02:00
Matthias Clasen
528ebfabf0 Handle the new line height pango attribute
Update all the places where we switch over PangoAttributeType
to handle (and ignore, for now) the new line height attribute.
2021-08-10 08:22:52 -04:00
Matthias Clasen
256f3a0d60 gtk-demo: Spruce up the hypertext demo
Use the newish allow-breaks pango attribute
to make the text break better.
2021-08-07 12:35:17 -04:00
Maximiliano Sandoval R
64b9d53472
appdata: Use launchable rather than id
<id> should be used for the component id and <launchable> for the
desktop file.
2021-07-16 11:14:46 +02:00
Maximiliano Sandoval R
a5e7b92c5d
appdata: Add content_rating
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-content_rating
2021-07-16 11:14:42 +02:00
Maximiliano Sandoval R
2da9ba63e2
appdata: Use correct SPDX license identifier
Following
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-project_license,
for the complete list of identifiers see https://spdx.org/licenses/
2021-07-16 11:09:28 +02:00
Matthias Clasen
c920236c54 gtk-demo: Add a slider to the menu example
This is a fun way to show that we can scale fast.
2021-07-05 19:31:54 -04:00
Matthias Clasen
3227aa2c45 mediastream: Rename apis one more time
Before we end up with names that we are unhappy with,
rename things one more time, and update all callers.
2021-07-03 09:05:33 -04:00
Matthias Clasen
92c6485adf docs: Tweak wording
Instead of drag'n'drop, say drag-and-drop. That is easier
to read, and less unclear on the markdown syntax implications.
2021-06-19 08:03:47 -07:00
Matthias Clasen
96fc5dc3a7 mediastream: Some more api renaming
Also rename gtk_media_stream_ended to
gtk_media_stream_set_ended, to avoid naming
collision with GtkMediaStream:ended.

The existing entry points still exist, deprecated
and marked as non-introspectable.

Update all internal uses.

Fixes: #4023
2021-06-15 18:33:23 -04:00
Matthias Clasen
86b5dba43b mediastream: Rename an api to avoid name collisions
Some bindings can't handle the coexistence of
GtkMediaStream:prepared and gtk_media_stream_prepared.
Help them out by renaming the function to
gtk_media_stream_set_prepared, and rename
gtk_media_stream_unprepared as well, to match.

The existing entry points still exist, deprecated.

Update all internal uses.

Fixes: #4023
2021-06-14 07:50:12 -04:00
Matthias Clasen
3ab97fac1f Cosmetics: Eradicate gdouble
Remove 3 errant uses of gdouble.
2021-06-03 17:41:28 -04:00
Matthias Clasen
25ee6d3f47 demos: Generate appdata
We don't maintain a release history here, but at least
we can put in the right version and date for the current
build.

Fixes: #3993
2021-06-01 15:36:33 -04:00
Matthias Clasen
0996552708 demos: Clean up doc comments
These don't show up anywhere, but might still clean
them up.
2021-05-21 13:53:38 -04:00
Alexander Mikhaylenko
7ebd9291d9 demo: Ensure .image-button on header bar buttons 2021-05-09 20:53:05 +05:00
Alexander Mikhaylenko
c5d2d89930 demo: Use more appropriate back/forward icons 2021-05-09 20:35:39 +05:00
Chun-wei Fan
efb875daef demos: Mark non-static signal handler symbols for export
The symbols in the .ui files for the signal handlers and functions must be
exported so that the system can pick them up during execution.

Fixes #3918.
2021-05-07 10:38:02 +08:00
Matthias Clasen
014fb41448 Help the compiler out
gcc says: error: iteration 2147483649 invokes undefined behavior
                            [-Werror=aggressive-loop-optimizations]
which of course, never happens because ncols is always >= 2.
Add some assertions to tell the compiler.
2021-05-05 08:17:26 -04:00
Matthias Clasen
5e7b5fe085 gtk-demo: Avoid compiler warnings without assertions
Avoid an unused variable warning.
2021-04-12 21:22:46 -04:00
Matthias Clasen
e4ce46e75f gtk-demo: Make header buttons not steal focus
This is rarely useful, and is confusing when it
happens as side-effect of dragging the window.
2021-04-11 15:32:15 -04:00
Matthias Clasen
e4a6101ae0 gtk-demo: Make one text scroll benchmark harder
Add underlines into the mix with the Emoji heavy
text, to see if we can optimize lines.
2021-04-08 23:34:36 -04:00
Matthias Clasen
8b64f0147c gtk-demo: Allow opening images in video player
It works, so why not.
2021-03-29 23:40:17 -04:00
Matthias Clasen
43a1641dd7 Add a frame benchmark
This can be used to gauge what fps we can hope for
in the best case, on a given system.
2021-03-29 08:27:43 -04:00
Matthias Clasen
0ee6868b7f gtk-demo: Add a test for scrolling with Emoji
Make a text with lots of Emoji and text. This
is exercising the GL renderers switching between
different shaders for color and plain glyphs.
2021-03-12 13:19:37 -05:00
Shengyu Zhang
55bfadadc4 gtk-demo: Fix typo GtkKabel -> GtkLabel 2021-02-21 16:20:22 +00:00
Matthias Clasen
516776b630 gtk-demo: Make --version match about
Print the same version information in --version
that we show in the about dialog.
2021-02-18 22:52:15 -05:00
Matthias Clasen
3aa3c21d69 demos: Add devel styling
Add a -Dprofile=devel meson option, and add some visual
hints to the demos that you are running a nightly build.
2021-02-12 00:08:55 -05:00
Matthias Clasen
36eb7c40d0 gtk-demo: Small a11y fix
Label the entry in the assistant demo.
2021-01-05 11:16:10 -05:00
Matthias Clasen
fb31581bb4 gtk-demo: Use GtkVideo in the fishbowl
The demo is called 'Video', so we should actually
use a GtkVideo widget. Doing things this way has
the advantage that we get GL support, which wasn't
working with GtkPicture.
2021-01-04 18:26:29 -05:00
xndcn
34ffdc6e3f gl: Fix implicit leaking of shader object
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.

So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
2020-12-29 23:50:45 +08:00
Emmanuel Gil Peyrot
dd1110ca5c Fix some of gtk4-demo’s transitions example on OpenGL ES
Same issue as the previous commit, int+float is error, and pow() only
works on floats.
2020-12-25 01:36:21 +01:00
Benjamin Otte
2a8f371643 gtk-demo: Don't put the search bar in the scroll area
1. That's a bad idea UI wise as you can't see the search after you
   scrolled.

2. That's a bad idea code-wise because Listviews need to be put into
   a ScrolledWindow or they won't scroll.
2020-12-24 06:38:45 +01:00
Emmanuele Bassi
99e0929d6c build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00
Matthias Clasen
ade4bcb125 Remove NoDisplay from demo desktop files
When these are installed (in particular, as flatpaks),
we should not hide them.

Fixes: #2932
2020-12-09 10:09:06 -05:00
Sophie Herold
a36ccd7f42 gtk-demo: Remove potentially ableist metaphor 2020-12-08 23:02:03 +00:00
Jonas Ådahl
27077d5be8 gtk/window: Make 'default-size' adapt to configured size
This commit changes the behavior of window size computation and the
default size properties to:

 * The default-width and default-height properties are updated to the
   current window size unless the size is fixed by e.g. being maxmized,
   tiled etc.
 * The compute-size semantics are to just pick the default size, or if
   not adequate, use the measured size, and consequently update the
   default size, unless unresizable.
 * gtk_window_get_size() is removed, what's more likely relevant is the
   gtk_window_get_default_size() which will now contain more sensible
   values.

Various places that used gtk_window_get_size() were updated to use
gtk_window_get_default_size() to remember and restore previous sizes.

This also changes the default value of 'default-width' and
'default-height' from -1 to 0. The gtk builder simplify tool is taught
how to omit when the default size is set to both -1 and 0.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2cddec7798 gtk/popover: Use gtk_popover_present() instead of going via GtkNative
This makes it more explicit that managers of popovers make it "present".
2020-12-07 20:37:29 +01:00
Matthias Clasen
423b8209a1 gtk-demo: Use a native filechooser in the words demo 2020-12-03 22:31:05 -05:00
Matthias Clasen
d83554121f gtk-demo: Use a native file chooser in the svg demo 2020-12-03 19:44:45 -05:00
Matthias Clasen
2688b94133 gtk-demo: Use a native filechooser in the video demo 2020-12-03 19:44:34 -05:00
Matthias Clasen
e035baee8a gtk-demo: Remove empty row in the pickers demo
The file chooser button is gone.
2020-12-03 19:25:04 -05:00
Christian Hergert
8e62ff50fe demos: make alienplanet demo work on macOS OpenGL
On the macOS OpenGL implementation, the use of noise2 as a
function within the glsl shader collides with the builtin noise2 of a
different signature.

This changes the name to something similar (noize2) so that we
do not risk colliding names when linking.

With this commit, the shadertoy alienplanet demo works on mac
OpenGL (albeit still with the Cairo renderer).
2020-12-03 10:23:13 -08:00
Matthias Clasen
6e67d44aa3 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3429

See merge request GNOME/gtk!2912
2020-12-03 03:43:19 +00:00
Benjamin Otte
eb9c204535 gtk: Remove GtkFileChooserButton
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Matthias Clasen
714c610d6b gtk-demo: Add a search button
Easter eggs are great, but search shouldn't be one.
2020-12-02 19:53:55 -05:00
Matthias Clasen
b75b359f19 Drop devel styling from our windows
We are about to do a stable release. Time to get used
again to plain old, boring header bars.
2020-11-23 12:10:01 -05:00
nana-4
56eac4f846 gtk-demo: Add .sidebar style class in the main window
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
Matthias Clasen
8e4cc59a7a Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2870
2020-11-20 02:02:10 +00:00
Matthias Clasen
a2ce6268b2 gtk-demo: Make a more interesting constraints demo
Show various ways to influence spacing. This is more or
less modeled on the way Androids constraint layout lets
you set up 'chains'.
2020-11-19 20:35:15 -05:00
Emmanuele Bassi
a4c3bee4a1 a11y: Hide children of GtkFishBowl
The fishbowl widget is purely presentational, and its children should
not be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
5afa985e85 demo: Make GtkFishBowl a presentation widget
It has no accessible content, even if it displays widgets.
2020-11-19 15:20:56 +00:00
Matthias Clasen
09fd2d61c4 gtk-demo: Rename some demos
This is just to make it easier for myself to
find the right sources.
2020-11-18 18:58:45 -05:00
Matthias Clasen
04c4b387a0 gtk-demo: Add more keywords
Add GtkShortcutController as a keyword to some demos that
show its use.
2020-11-18 10:48:57 -05:00
Matthias Clasen
08d6db4ab6 gtk-demo: Plug a memory leak
The Characters demo was leaking its columns.
2020-11-15 23:03:30 -05:00
Emmanuele Bassi
75f9b83b1e Establish a control relation between demo search and list
The search entry changes the content of the list view, so we should
mention that relation to assistive technologies.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
0d6e4f7a6e demo: Add more accessibility labels to the UI 2020-11-12 21:46:05 +00:00
Matthias Clasen
a2897e1868 gtk-demo: Add suggestion entry demos
Add a possible replacement for GtkEntryCompletion
as a demo.

Move the Dropdowns demo to Lists/Selections, and make
it show both GtkDropDown and the suggestion entry, with
some variations.
2020-11-11 15:54:43 -05:00
Matthias Clasen
5ed3ad6cc8 gtk-demo: Split off SvgPaintable
Put the SvgPaintable implementation into its
own source files, for ease of copying.
2020-11-11 10:35:54 -05:00
Matthias Clasen
74a7f73239 Merge branch 'matthiasc/builder-requires' into 'master'
Matthiasc/builder requires

See merge request GNOME/gtk!2806
2020-11-11 03:53:52 +00:00
Chun-wei Fan
a76f37a501 gtk-demo: Fix building scrolling demo without PangoFT2
For builds that do not have PangoFT2, the demo fails to link because we weren't
building listview_ucd.c.  Fix the build by building listview_ucd.c with
script-names.c and unicode-names.c for all builds, as we now require a Pango
version that already always depends on HarfBuzz and those sources do not use
anything from PangoFT2.
2020-11-11 11:15:05 +08:00
Matthias Clasen
d6c753bde7 gtk4-demo: Remove <requires> from ui files
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:37:40 -05:00
Matthias Clasen
3e8260d528 gtk-demo: Plug a memory leak 2020-11-09 23:29:03 -05:00
Matthias Clasen
192f515682 gtk-demo: Tweak a demo title 2020-11-09 23:28:45 -05:00
Matthias Clasen
a745dbfc15 gkt-demo: Add a columview to the scroll demo
This is an interesting case, since it has many labels,
and we are struggling to provide good scrolling performance.
2020-11-09 20:07:09 -05:00
Matthias Clasen
14be50839e gtk-demo: Improve consistency
Make the shortcut triggers demo big enough
to not ellipsize the window title.
2020-11-09 19:54:17 -05:00
Matthias Clasen
a85d9cda07 gtk-demo: Improve consistency
Make the paintable svg demo follow the same
pattern we use for other demos.
2020-11-09 19:53:44 -05:00
Matthias Clasen
7d49f1e250 gtk-demo: Improve consistency
Make the paintable emblems demo follow the same
pattern we use for other demos.
2020-11-09 19:52:28 -05:00
Matthias Clasen
6fa2936956 gtk-demo: Set default size for drawingarea demo
Set a default size, so we don't ellipsize the window
title when the window is presented.
2020-11-09 18:50:43 -05:00
Matthias Clasen
b81463e7d3 gtk-demo: Plug a memory leak 2020-11-09 18:48:10 -05:00
Matthias Clasen
b622745501 gtk-demo: Plug a memory leak 2020-11-09 18:48:10 -05:00
Arnaud Bonatti
db6d7dccd8 Drop “gtk+” plus sign in GtkBuilder <requires>. 2020-11-07 16:16:55 +01:00
Matthias Clasen
d2a7ecf72c gtk-demo: Simplify the run button
Don't create the label manually. It is not necessary,
and letting the button do it also improves the
accessibility setup.
2020-11-04 12:54:48 -05:00
Matthias Clasen
f220a1e3c7 gtk-demo: Set some accessible properties
Set labels in the builder demo. The ARIA authoring practices
say that both menubars and toolbars *must* have an accessible
label.
2020-11-04 12:53:23 -05:00
Emmanuele Bassi
425d8ad02a Set accessible label on GTK Demo's primary menu
Otherwise its label is going to be "GtkMenuButton".
2020-11-04 17:15:13 +00:00
Matthias Clasen
bb24b350ac gtk-demo: Set an accessible role
Set an accessible role for the toolbar in the
builder demo. This tests accessibility support
in GtkBuilder.
2020-11-04 11:36:52 -05:00
Matthias Clasen
c6ef1943e4 gtk-demo: Remove more gtk3-demo icon uses
Use our own logo everywhere.
2020-11-02 22:50:03 -05:00
Matthias Clasen
a3c9f8594a gtk-demo: Tweak images demo
Use our own logo instead of the gtk3-demo one, and
tweak the headings to refledct what we show.
2020-11-02 22:43:44 -05:00
Matthias Clasen
354f2b65fa gtk-demo: Reanimate floppy buddy
Implement a GdkPaintable wrapper around GdkPixbufAnimation,
so floppy buddy can waive again.
2020-11-02 21:38:02 -05:00
Matthias Clasen
fb028f0fe7 gtk-demo: Renovate the paned demo
Make this look less like testgtk from GTK 2.
2020-11-02 13:56:19 -05:00
Matthias Clasen
8a13909bab fixup: window titles 2020-11-02 12:02:19 -05:00
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
Matthias Clasen
18e46bd6f8 gtk-demo: Beef up the hypertext demo
Its almost a dictionary.
2020-09-16 23:01:49 -04:00
Matthias Clasen
a1e21c1acb Merge branch 'wip/sadiq/headerbar-demo' into 'master'
gtk-demo: Add a switch to headerbar demo

See merge request GNOME/gtk!2571
2020-09-16 23:12:26 +00:00
Matthias Clasen
d71337513f gtk-demo: Add another demo
Show how to add a context menu to a custom widget,
and how to make a GtkPicture lookalike.
2020-09-15 22:40:13 -04:00
Matthias Clasen
e4d29ba9fd Merge branch 'master.win32' into 'master'
Some more fixes for Windows

Closes #3157

See merge request GNOME/gtk!2580
2020-09-15 11:12:27 +00:00
Matthias Clasen
9eb4eef48b Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2582
2020-09-15 11:04:54 +00:00
Chun-wei Fan
c766e31e8f demos: Fix minesweeper demos on Windows
Make sure the callback functions in the .ui files are exported, so that
those functions can be recognized at runtime so that things run
properly.
2020-09-15 15:53:20 +08:00
Timm Bäder
d0f182757a sizegroup demo: Fix a checkbutton/togglebutton mixup 2020-09-15 05:21:54 +02:00