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