Matthias Clasen
508ceccb66
gtk4-demo: Polish the font features demo
2022-06-30 19:02:02 -04:00
Matthias Clasen
d6dde63074
gtk4-demo: Restructure the font features demo
2022-06-30 19:02:02 -04:00
Matthias Clasen
bdb1886fc9
gtk4-demo: Cosmetics
...
Rename the ui file to match the C source, to preserve sanity.
2022-06-30 19:02:02 -04:00
Matthias Clasen
e4781e393c
gtk-demo: Beef up font features demo
...
Some work on making this demo better.
2022-06-30 09:42:32 -04:00
Matthias Clasen
092fe2f712
gtk-demo: Cosmetics
...
Tweak the complicated textview demo a bit.
2022-06-23 07:40:55 -04:00
Jan Tojnar
d91e669d98
gtk-demo: Remove mention of directories in picker examples
...
Those were removed in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2909 .
2022-06-22 23:07:28 +02:00
Matthias Clasen
8b3a38779b
gtk-demo: Add some keywords
...
Make it so that the right demos show up when
you search for GtkInscription.
2022-06-13 11:16:51 -04:00
Benjamin Otte
98e0ca7477
gtk-demo: Add a "Read More" label demo.
2022-06-11 22:19:17 +02:00
Benjamin Otte
61bc38cd61
gtk-demo: Use GtkInscription in the wordlist demo
2022-06-10 04:34:23 +02:00
Benjamin Otte
b56b5ed81b
gtk-demo: Use GtkInscription in the main list
2022-06-10 04:34:23 +02:00
Matthias Clasen
5ba5693efd
Make our demos more likable
...
Nobody likes Facebook.
Everybody loves the Eagles.
2022-05-27 17:34:55 -04:00
Matthias Clasen
bcad305136
Make the formatted link more neutral
...
There have been complaints about company names in
our demos. Lets use something else.
Part of: #4716
2022-05-27 08:43:06 -04:00
Alexander Mikhaylenko
1ca2d41a98
icons: Use the proper eye icons
...
adwaita-icon-theme has more appropriate icons for showing/hiding text now.
use those, and in the process fix the fact GtkPasswordEntry has been using
them the other way around.
2022-04-22 16:22:05 +04:00
Matthias Clasen
191558cfa4
gtk-demo: Small fixup to the cursors demo
2022-04-07 07:01:29 -04:00
Matthias Clasen
79fad9f221
gtk-demo: Don't hardcode a title font
...
We want a large font size, but we don't have to
hardcode Sans.
2022-03-18 12:33:33 -07:00
Matthias Clasen
b6b2682bd6
build: Avoid objcopy on arm
...
The trickery we do with objcopy and ld to speed up
resource inclusion does not seem to work right on
32bit Arm, so just skip it there.
Fixes : #4757 , #4748 , #4752
2022-03-14 08:44:09 -04:00
Ting-Wei Lan
e1e88ce665
build: Don't use ld and objcopy when cross-compiling
...
These commands don't work when compiling Windows binaries on Linux.
2022-03-13 15:19:46 +08:00
Guido Günther
db8339ca66
demo: Use gtk_window_present()
...
This lets xdg-activation work as otherwise gdk_wayland_surface_focus is
never invoked.
2022-02-28 16:55:54 +00:00
Jan Alexander Steffens (heftig)
d8befc612f
demos: Make our stack noexec
...
This is similar to https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4330
and https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4334 , which fixed
the main library but missed the demos.
2022-02-03 19:14:36 +00:00
Chun-wei Fan
169172a9e0
demos: Always build font explorer demo
...
We are no longer using PangoFT2 APIs in this demo, so make sure that we build
it on all builds since we already depend on a HarfBuzz/Pango version that
provide everything that we need here.
Drop the unnecessary pangofc-font.h include as a result.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
0a3fad4d47
gtk-demo/language-names.c: Acquire language names natively on Windows
...
Like what was done on gtk/language-names.c, acquire the language names via the
native Windows NLS APIs, eliminating a run-time dependency on iso-codes on
Windows.
2022-01-12 17:29:30 +08:00
Timm Bäder
a00480f4a1
application demo: Resolve a keyboard shortcut conflict
...
There were two menu entries side-by-side with the same keyboard shortcut
2021-12-27 10:02:03 +01:00
Emmanuele Bassi
6f2ff620bd
build: Replace deprecated 'gui_app'
...
Use `win_subsystem: 'windows'` instead.
2021-12-24 15:51:11 +00:00
Matthias Clasen
787111a145
gtk-demo: Add dnd back to the clipboard demo
2021-12-12 16:27:36 -05:00
Matthias Clasen
f8855e892a
gtk-demo: Small followup fixes
...
Make image copy work remotely.
2021-12-12 13:41:24 -05:00
Matthias Clasen
ebb58b7cbc
gtk-demo: Rewrite the clipboard demo
...
This is more in line with the current clipboard
api, and shows handling colors and files.
2021-12-12 13:13:11 -05:00
Georg Vienna
c517e945de
textchildanchor: allow to specify replacement character
2021-12-03 16:02:48 +00:00
Matthias Clasen
b9c2a925e2
Beef up the tabs demo
...
Show various alignments, including numeric.
2021-12-03 07:55:20 -05:00
Matthias Clasen
96778fca92
Fix formatting error in demo about dialogs
...
Try harder to format things nicely.
2021-11-16 16:45:56 -05:00
Benjamin Otte
300a88922e
build: Disable gcc warnings as warnings, too
...
We use -Werror in the build, so even if some warnings are just warnings,
they'd be errors.
2021-11-15 15:35:10 +01:00
Benjamin Otte
061026f21f
gtk-demo: Don't use deprecated librsvg API
...
New API requires a newer librsvg version, so require that one.
2021-11-09 20:29:49 +01:00
Matthias Clasen
895dc94cc9
gtk-demo: Avoid a missing icon
...
The hypertext demo was using an icon that we no longer
include in our embedded icon theme. Use a different one.
2021-11-08 14:17:42 -05:00
Benjamin Otte
a4e83ec584
demos: Remove unused code
2021-10-23 00:03:51 +02:00
Bernhard M. Wiedemann
d6f4a0d2cf
Drop date attribute from our appdata files
...
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
This was suggested by Matthias Clasen as an alternative to MR !3929
2021-10-19 07:37:59 -04:00
Timm Bäder
a61999170e
fontrendering: Protect against NULL hints
2021-10-17 11:12:14 +02:00
Matthias Clasen
8079f8ea3c
Add depfiles back to resource generation
...
The recent change to faster resource generation
lost the depfiles to ensure that we regenerate
resources when any of the contents change.
Bring it back.
2021-10-03 22:23:56 -04:00
Matthias Clasen
200a2f5c71
gtk-demo: Speed up the build
...
Avoid serializing the gresource blob into a C string
and running gcc over it. Instead, use ld to put it
directly into an .o file and add it to the build.
The build system machinations here were copied from
gobject/tests/meson.build, and should ideally be part
of the meson gnome module.
2021-09-30 23:10:24 -04:00
Matthias Clasen
d88c4d122d
gtk-demo: Cosmetics
...
Tweak the color of the outlines in the font rendering
demo.
2021-09-18 11:08:15 -04:00
Matthias Clasen
2c8e55605b
gtk-demo: Improve ink extents rendering
...
Show the pixel-aligned ink rectangle, so we can
see that it includes all the pixels that are inked.
2021-09-17 16:29:30 -04:00
Matthias Clasen
06db477847
gtk-demo: Fix non-circular buttons
2021-09-17 15:24:26 -04:00
Benjamin Otte
3914ecbd0f
gtk-demo: Use textures in listbox example
2021-09-17 04:31:46 +02:00
Matthias Clasen
f7c84ddc7f
gtk-demo: Font rendering - Add some bling
...
Fade the outlines and pixels in and out.
2021-09-04 23:41:44 -04:00
Matthias Clasen
f4a4dd2615
gtk-demo: Font rendering - expand docs
2021-09-04 23:05:55 -04:00
Matthias Clasen
b718d99d1f
gtk-demo: Font rendering - Add keynav
...
Add mnemonics to most controls, and make
Ctrl+/- change the zoom.
2021-09-04 23:00:17 -04:00
Matthias Clasen
c7215d1199
gtk-demo: Font rendering - add outlines
...
Should outlines as well.
2021-09-04 22:56:07 -04:00
Matthias Clasen
24d69ef125
gtk-demo: Font rendering - better start
...
Turn antialiasing on initially, and turn the
extents and grid off. Otherwise we show pretty
shocking rendering right from the start.
2021-09-04 22:56:07 -04:00
Matthias Clasen
7c3fbdecf2
gtk-demo: Font rendering - improve the grid
...
Allow changing the character shown in the grid.
2021-09-04 22:56:07 -04:00
Matthias Clasen
b77938f40f
Cosmetics
...
Remove an unused object from the font rendering
demo ui file.
2021-09-04 22:55:47 -04:00
Matthias Clasen
f3ccf62463
gtk-demo: Improve the font rendering demo
...
Add a toggle for antialiasing, and make the metrics
hinting turn on rounding of positions, to match what
we do with settings now.
2021-09-03 11:29:44 -04:00
Matthias Clasen
ad3dad1965
Initial support for new Pango attributes
...
This is still missing the GtkTextTag hookup,
but it fixes the build.
2021-09-01 10:32:45 -04:00
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