Commit Graph

1703 Commits

Author SHA1 Message Date
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