From 0e5dac8c25d11e3ce921c584c05064a93507393d Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 30 Sep 2020 09:41:28 -0400 Subject: [PATCH 1/4] meson: Change introspection option to yielding feature Yielding option means that if pango is built as a subproject, it will take the value of that option from the parent project (e.g. gst-build). For that to work it must be of the same type, which is "feature" instead of "boolean" in all GStreamer modules. --- .gitlab-ci.yml | 2 +- .gitlab-ci/flatpak-build.sh | 2 +- .gitlab-ci/test-msys2.sh | 2 +- gtk/meson.build | 5 ++++- meson.build | 2 +- meson_options.txt | 5 +++-- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 832880d617..2f425ca327 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,7 +223,7 @@ asan-build: needs: [] variables: script: - - CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=false _build + - CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build - ninja -C _build - .gitlab-ci/run-tests.sh _build wayland artifacts: diff --git a/.gitlab-ci/flatpak-build.sh b/.gitlab-ci/flatpak-build.sh index cbb6c097d1..531741db1d 100644 --- a/.gitlab-ci/flatpak-build.sh +++ b/.gitlab-ci/flatpak-build.sh @@ -22,7 +22,7 @@ flatpak build ${builddir} meson \ -Dprint-backends=file \ -Dbuild-tests=false \ -Dbuild-examples=false \ - -Dintrospection=false \ + -Dintrospection=disabled \ -Ddemos=true \ _flatpak_build diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index d311f4bbe7..dfa8813240 100644 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -67,7 +67,7 @@ meson \ -Dwayland-backend=false \ -Dwin32-backend=true \ -Dvulkan=disabled \ - -Dintrospection=false \ + -Dintrospection=disabled \ -Dgtk:werror=true \ _build unset CCACHE_DISABLE diff --git a/gtk/meson.build b/gtk/meson.build index 3554c1b2f1..3e18f05cb6 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -1075,8 +1075,11 @@ libgtk = library('gtk-4', install: true) gtk_dep_sources = [gtkversion, gtktypebuiltins_h] + # Introspection -build_gir = get_option('introspection') +gir = find_program('g-ir-scanner', required : get_option('introspection')) +build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + if build_gir gir_args = [ '-DGTK_COMPILATION', diff --git a/meson.build b/meson.build index 127671a349..6ad27d2158 100644 --- a/meson.build +++ b/meson.build @@ -876,7 +876,7 @@ summary('Tracker support', tracker3_dep.found(), section: 'Features') # Build summary('Debugging', get_option('debug'), section: 'Build') summary('Optimization', get_option('optimization'), section: 'Build') -summary('Introspection', get_option('introspection'), section: 'Build') +summary('Introspection', build_gir, section: 'Build') summary('Documentation', get_option('gtk_doc'), section: 'Build') summary('Man pages', get_option('man-pages'), section: 'Build') summary('Tests', get_option('build-tests'), section: 'Build') diff --git a/meson_options.txt b/meson_options.txt index f4dc3b43d7..b58c8a9fa0 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -84,8 +84,9 @@ option('man-pages', description : 'Build man pages for installed tools') option('introspection', - type: 'boolean', - value: 'true', + type: 'feature', + value: 'auto', + yield: true, description : 'Build introspection data (requires gobject-introspection)') # Demos, examples and tests From 5b89253fd974e3aeea71acc1a39d71099afcff02 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 30 Sep 2020 17:48:24 +0000 Subject: [PATCH 2/4] Use correct child widget when measuring Fixes a copy/paste error. Fixed #3220 --- gtk/gtkcolumnview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkcolumnview.c b/gtk/gtkcolumnview.c index dcba1c9620..0f1ca8fd42 100644 --- a/gtk/gtkcolumnview.c +++ b/gtk/gtkcolumnview.c @@ -227,7 +227,7 @@ gtk_column_view_measure (GtkWidget *widget, { int header_min, header_nat, list_min, list_nat; - gtk_widget_measure (GTK_WIDGET (self->listview), + gtk_widget_measure (GTK_WIDGET (self->header), orientation, for_size, &header_min, &header_nat, NULL, NULL); From 81cfcba5ad481163f6b914874368c16bbfdf4b22 Mon Sep 17 00:00:00 2001 From: Jakub Steiner Date: Thu, 1 Oct 2020 13:13:10 +0200 Subject: [PATCH 3/4] Adwaita: close button for infobar, searchbar fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3215 --- gtk/theme/Adwaita/_common.scss | 66 ++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 56e0a8d277..7eeb712855 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1343,6 +1343,45 @@ searchbar > revealer > box { } } +/************** + * GtkInfoBar * + **************/ +infobar { + > revealer > box { + padding: 8px; + border-spacing: 12px; + } + + &.action:hover > revealer > box { + background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 47%), 30%), + desaturate(darken(invert($selected_bg_color), 42%), 70%)); + } + + &.info, + &.question, + &.warning, + &.error { + > revealer > box { + border-bottom: 1px solid lighten($borders_color, 5%); + background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 45%), 30%), + desaturate(darken(invert($selected_bg_color), 40%), 70%)); + } + } +} + + //close button for info and searchbar (#3215) + + infobar .close, + searchbar .close { + @include button(undecorated); + min-width: 16px; + min-height: 16px; + padding: 4px; + border-radius: 50%; + + &:hover { @include button(hover); } + } + /***************** * Title buttons * @@ -3622,33 +3661,6 @@ video { background: black; } -/************** - * GtkInfoBar * - **************/ -infobar { - > revealer > box { - padding: 8px; - border-spacing: 12px; - } - - &.action:hover > revealer > box { - background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 47%), 30%), - desaturate(darken(invert($selected_bg_color), 42%), 70%)); - } - - &.info, - &.question, - &.warning, - &.error { - > revealer > box { - border-bottom: 1px solid lighten($borders_color, 5%); - background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 45%), 30%), - desaturate(darken(invert($selected_bg_color), 40%), 70%)); - } - } -} - - /************ * Tooltips * ************/ From 9601863569ffaab4090efb044f9fd51808a245f0 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 1 Oct 2020 15:16:18 +0200 Subject: [PATCH 4/4] CI: Enable introspection again for the Windows build The underlying bug was fixed in glib and backported in MSYS2: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1665 --- .gitlab-ci/test-msys2.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index dfa8813240..d9bc637bdc 100644 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -60,14 +60,12 @@ pkg-config --modversion pango ccache --zero-stats ccache --show-stats export CCACHE_DISABLE=true -# FIXME: introspection disabled for now because of -# https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/340 meson \ -Dx11-backend=false \ -Dwayland-backend=false \ -Dwin32-backend=true \ -Dvulkan=disabled \ - -Dintrospection=disabled \ + -Dintrospection=enabled \ -Dgtk:werror=true \ _build unset CCACHE_DISABLE