Commit Graph

30 Commits

Author SHA1 Message Date
Matthias Clasen
caa8fb4fac gtk-demo: Fix a crash
This was broken in 6b2c088a29.
2023-06-17 17:56:41 -04:00
Matthias Clasen
6b2c088a29 demos: Stop using deprecated api
Use texture apis instead of pixbuf ones.
2023-05-16 16:25:59 -04:00
Matthias Clasen
fb8e52f0c9 gtk-demo: Stop using gtk_widget_show/hide 2022-11-28 14:34:55 -05:00
Matthias Clasen
756888a53d gtk-demo: Port to async dialog API 2022-10-29 13:31:41 -04:00
Matthias Clasen
3fc3f8d2ff gtk-demo: Replace combobox in font rendering
Out with the combobox, in with the dropdown.
2022-10-21 21:48:39 -04:00
Matthias Clasen
6efb18330f demos and examples: Ignore deprecations
For now, just ignore deprecations. Eventually,
we will have to go through, drop demos that are
for wholly deprecated widgets, and update others.
2022-10-11 17:18:21 -04:00
Matthias Clasen
54daad3878 gtk-demo: Avoid a segfault
The code in the fontrendering demo is a bit sloppy
and assumes that we always get a single run when
appending a sequence of 4 chars and 4 spaces.

That is not in general true, such as for Emoji.

Instead of working harder to handle Emoji here,
just give up and fall back to 'a'.

Fixes: #5166
2022-09-09 12:34:54 -04:00
Timm Bäder
a61999170e fontrendering: Protect against NULL hints 2021-10-17 11:12:14 +02: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
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
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
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
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
f085ac837c fontrendering demo: Stop using radio buttons
Replace them with grouped toggled buttons.
2020-08-30 22:14:05 -04:00
Matthias Clasen
2c5c938f0d Clean up uses of gtk_toggle_button_get/set_active
Replace all uses on check buttons by the corresponding
check button api.
2020-08-30 21:23:25 -04:00
Matthias Clasen
2335953c5d gtk-demo: Cosmetic fixes for the fontrendering demo
Make this look a bit less thrown together.
2020-08-09 18:02:04 -04:00
Matthias Clasen
b58bad557b gtk-demo: Make fontrendering demo work more than once
We weren't cleaning up properly, causing the window
to not close the second time it is opened.

Fixes: #3019
2020-08-05 14:36:54 -04:00
Matthias Clasen
cd0081d08a Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Timm Bäder
dc36c21835 demos/gtk-demo: Add common_cflags to build
With a few exceptions.
2020-03-07 15:30:35 +01:00
Benjamin Otte
b025ee428c builder: Connect signals automatically
gtk_builder_connect_signals() is no longer necessary, because all the
setup that made it necessary to have this extra step is now done
automatically via the closure functions.
2019-11-22 17:42:31 +01:00
Benjamin Otte
27d05102ab builder: Remove user_data argument from gtk_builder_connect_signals()
This is pretty unused and gets in the way of the next steps.

A potential side effect is that for templates the widget was passed as
the user data argument. If that turns out to be important, we have to
special case that situation.
2019-11-22 07:46:18 +01:00
Matthias Clasen
8b1f3936b6 font rendering demo: Make boxes optional 2019-07-26 00:31:07 -04:00
Matthias Clasen
108ea50179 font rendering demo: Show unrounded extents
This makes more sense.
2019-07-25 23:35:09 -04:00
Matthias Clasen
df1892c052 font rendering: Show ink rect too 2019-07-25 22:06:34 -04:00
Matthias Clasen
0820a79bf5 Improve the font rendering demo
Show the pixel grid, extents, and baseline.
2019-07-25 19:07:12 -04:00
Matthias Clasen
dec4db5943 Add a font rendering demo
This renders a magnified version of the text,
to make the effect of various font rendering options
more visible.

It also shows the phases of subpixel rendering,
if you have a recent pango and cairo.
2019-07-25 16:43:22 -04:00