Commit Graph

26 Commits

Author SHA1 Message Date
Matthias Clasen
e1facc548a resources: Treat svgs as xml
They can have their whitespace removed just the same.
2021-09-19 08:27:08 -04:00
Simon McVittie
52cdf3056d compose: Generate endian-dependent compact Compose data
The GtkComposeTable cache is always in big-endian format and is
byteswapped on load for the more common little-endian CPUs, but
init_builtin_table() in GtkIMContextSimple can't byteswap the built-in
data without copying it, which is undesirable. Pregenerate both big-
and little-endian compose data, and compile the correct flavour into
each build of GTK. This fixes failure of the composetable test when
building for a big-endian architecture such as s390x and (traditional,
big-endian) powerpc.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4217
Signed-off-by: Simon McVittie <smcv@debian.org>
2021-08-30 11:29:46 +01:00
Matthias Clasen
54dffa07f3 composetable: Drop GtkComposeTableCompact
All tables use the compact format now, and we generate
caches in that format too. Bump the cache version to 3
for this.

Replace the python script for generating the builtin table
by a small C program using the same code to generate the data
for the builtin table. This drops the restriction on only
generating a single character in the builtin sequences.
2021-07-13 22:03:23 -04:00
Matthias Clasen
0bf3e4c25b Drop Adwaita and HighContrast themes
These themes will reappear in libadwaita in due course.
2021-04-01 12:39:30 -04:00
Matthias Clasen
3654bcfbe8 Make the theme variants available as themes
This makes it easier to implement the theme switching
in widget-factory, since we don't have a variant setting.
2021-04-01 12:27:26 -04:00
Matthias Clasen
0dcf95b898 Reorganize our themes
Rename the included theme to Default, with 4 variants:
light, dark, hc, hc-dark. This replaces Adwaita,
Adwaita:dark, HighContrast and HighContrastInverse.
We still make the themes available under these names,
and we still set up Adwaita-dark and HighContrastInverse
as the dark variants of Adwaita and HighContrast.

The unification of the theme variants under Default
is not quite perfect; it would be nice to merge
the assets/ and assets-hc/ subdirectories and render
all assets from a single svg file.
2021-04-01 11:42:17 -04:00
Matthias Clasen
3cc7d9b8c0 Move the gesture icons in the right place
Put these images into gtk/icons, where they belong.
2021-01-28 12:27:07 -05:00
Matthias Clasen
1ac9400712 Drop unused logo resource
The inspector no longer sets a window icon.
2021-01-28 12:27:07 -05:00
Matthias Clasen
f60d245e32 Make HighContrastInverse a dark variant
Make HighContrastInverse available as the dark variant of HighContrast,
in addition to being a standalone theme. This regularizes our theme
variants, and doesn't hurt.
2021-01-14 22:55:52 -05:00
Matthias Clasen
f04e5bd590 Make Adwaita-dark available as a theme
This makes Adwaita-dark available as a standalone
theme.
2021-01-14 22:42:50 -05:00
Matthias Clasen
452c909b64 Redo the handling of Emoji data
Use the data files from https://github.com/milesj/emojibase.git
as source for our Emoji data. Slightly change our data format by
adding a group to each item, in both the Emoji data and in the
setting for recent-emoji.

Install translated versions of the data as separate resource
bundles in $prefix/gtk-4.0/emoji, and load them when appropriate.

Currently, we have data for de, en, es, fr, zh, with data taken
from Unicode 13 and CLDR 13.

Fixes: #950 #1511
2020-10-04 01:14:42 -04:00
Nirbheek Chauhan
777435c470 meson: Reduce useless relinking on reconfigure
When we reconfigure, `configure_file()` is called again, and
`*.gresource.xml` files are regenerated, which causes many (all?)
binaries to be relinked. Now we only write those out if the contents
actually changed (or if the output didn't already exist).

This is exactly what Meson already does with `configure_file()` when
`command:` is not used.

While we're at it, also do the same for `gen-c-array.py` and
`gentypefuncs.py` for completeness. Now even if the input to those
changes, re-building of those custom targets may not result in
relinking if the outputted C files have the same contents.
2020-04-03 18:41:55 +05:30
Emmanuele Bassi
f1003d6ae8 Rename GResources for standard GTK themes
After commit 2ab9be54fb we had to rename
the generated CSS files to be included into the GResource bundle; we
kept the URI stable to avoid too much churn, and allow backporting the
change to the 3.24 stable branch. This had the adverse effect of making
it harder to debug issues, as the on-disk file name does not match the
location in the GResource that will be used to print out warnings,
errors, and debugging messages.
2020-03-27 15:20:59 +00:00
Emmanuele Bassi
2ab9be54fb Rename the SCSS files for our themes
It seems that Meson's gnome.compile_resources() cannot deal with two
files with the same name under different directories, which breaks the
build parallelism because the GResource file ends up not depending on
either the Adwaita or the HighContrast gtk-contained.css file.

This commit only changes the on-disk names of the Adwaita and
HighContrast SCSS files, and the corresponding generated CSS files; the
files in the GResource are going to be aliased to the old file names, to
minimise the breakage. We might want to change the theme entry points at
some later date, if we decide to commit to this naming scheme.

Fixes: #2423

See Meson bug: https://github.com/mesonbuild/meson/issues/6615
2020-02-12 20:22:43 +00:00
Matthias Clasen
81b65eadcb Add an Empty theme for tests 2020-01-17 23:47:34 -05:00
Matthias Clasen
e1c1c46e34 inspector: Style the property list
Make the property list look more like a list.
2019-05-07 22:04:41 +00:00
Benjamin Otte
799cb39e08 Remove win32 themeing support
It was unused through all of GTK 3, so it is not worth supporting.

The best Windows themes do not make use of it at all.
2019-03-22 22:30:01 +01:00
Matthias Clasen
6c4e088620 resources: Include more icon directories
We are going to include all the icons that are
used by gtk itself. Prepare for that by including
the necessary subdirectories from the icon theme.
2019-02-12 19:34:19 -05:00
Matthias Clasen
1528e7eabf Add switch icons
These will be used in GtkSwitch in the future.
2019-01-24 20:43:12 -05:00
Matthias Clasen
c8be597b7f Bring back gtk-orientation icons
These are used in the page setup dialog, so we can't
just drop them.
2018-07-27 13:35:29 -04:00
Matthias Clasen
d398c00d20 Fix up the resource generation for icons
The script was looking in the wrong subdirectories.
2018-07-27 09:08:27 -04:00
Matthias Clasen
c6141dffd2 Keep picking up icons as resources
We may need to revisit this at some point. For now,
keep the mechanism in place.

This is a partial revert of 806c659efe.
2018-07-27 08:05:55 -04:00
Matthias Clasen
806c659efe Drop unused old icons
We don't need to ship the deprecated old stock-id named
icons and the drag cursors - we don't use them from resources
anyway.
2018-07-20 08:06:07 -04:00
Matthias Clasen
3287469929 gtk: Stop using pixdata resources
It does not really help, and pixdata is deprecated.
2017-10-18 17:30:20 +02:00
Timm Bäder
1ee32d10ce meson: Add emoji data
Otherwise we crash at runtime.
2017-08-13 18:08:41 +02:00
Tim-Philipp Müller
75fd87ce61 meson: gtk: generate gtk.gresource.xml 2017-05-03 15:10:52 +01:00