diff --git a/org.freedesktop.Platform.Icontheme.Adwaita.appdata.xml b/org.freedesktop.Platform.Icontheme.Adwaita.appdata.xml new file mode 100644 index 0000000..d6151b5 --- /dev/null +++ b/org.freedesktop.Platform.Icontheme.Adwaita.appdata.xml @@ -0,0 +1,11 @@ + + + org.freedesktop.Platform.Icontheme.Adwaita + CC0-1.0 + Adwaita icon theme + Adwaita icon theme + +

Adwaita icon theme is used by the GNOME desktop.

+
+ https://github.com/GNOME/adwaita-icon-theme +
diff --git a/org.freedesktop.Platform.Icontheme.Adwaita.json b/org.freedesktop.Platform.Icontheme.Adwaita.json new file mode 100644 index 0000000..8041723 --- /dev/null +++ b/org.freedesktop.Platform.Icontheme.Adwaita.json @@ -0,0 +1,46 @@ +{ + "id": "org.freedesktop.Platform.Icontheme.Adwaita", + "branch": "1.0", + "runtime": "org.freedesktop.Sdk", + "build-extension": true, + "sdk": "org.freedesktop.Sdk", + "runtime-version": "1.6", + "sdk-extensions": [], + "separate-locales": false, + "cleanup": [ "/share/info", "/share/man" ], + "appstream-compose": false, + "build-options" : { + "prefix": "/usr/share/runtime" + }, + "modules": [ + { + "name": "adwaita-icon-theme", + "sources": [ + { + "type": "archive", + "url": "https://download.gnome.org/sources/adwaita-icon-theme/3.24/adwaita-icon-theme-3.24.0.tar.xz", + "sha256": "ccf79ff3bd340254737ce4d28b87f0ccee4b3358cd3cd5cd11dc7b42f41b272a" + }, + { + "type": "patch", + "path": "patch/adwaita-icons.patch" + } + ] + }, + { + "name": "appdata", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p ${FLATPAK_DEST}/share/appdata", + "cp org.freedesktop.Platform.Icontheme.Adwaita.appdata.xml ${FLATPAK_DEST}/share/appdata", + "appstream-compose --basename=org.freedesktop.Platform.Icontheme.Adwaita --prefix=${FLATPAK_DEST} --origin=flatpak org.freedesktop.Platform.Icontheme.Adwaita" + ], + "sources": [ + { + "type": "file", + "path": "org.freedesktop.Platform.Icontheme.Adwaita.appdata.xml" + } + ] + } + ] +} diff --git a/org.kde.KStyle.Adwaita.appdata.xml b/org.kde.KStyle.Adwaita.appdata.xml new file mode 100644 index 0000000..3403d0f --- /dev/null +++ b/org.kde.KStyle.Adwaita.appdata.xml @@ -0,0 +1,11 @@ + + + org.kde.KStyle.Adwaita + CC0-1.0 + Adwaita theme + Adwaita widget theme matching the GNOME awaita theme + +

Adwaita widget theme that matches the GNOME awaita theme.

+
+ https://github.com/MartinBriza/adwaita-qt +
diff --git a/org.kde.KStyle.Adwaita.json b/org.kde.KStyle.Adwaita.json new file mode 100644 index 0000000..b5f2e1b --- /dev/null +++ b/org.kde.KStyle.Adwaita.json @@ -0,0 +1,38 @@ +{ + "id": "org.kde.KStyle.Adwaita", + "branch": "5.9", + "runtime": "org.kde.Platform", + "build-extension": true, + "sdk": "org.kde.Sdk", + "runtime-version": "5.9", + "appstream-compose": false, + "separate-locales": false, + "modules": [ + { + "name": "adwaita-qt", + "cmake": true, + "config-opts": ["-DQT_PLUGINS_DIR=/usr/share/runtime/lib/plugins/Adwaita"], + "sources": [ + { + "type": "git", + "url": "https://github.com/MartinBriza/adwaita-qt.git" + } + ] + }, + { + "name": "appdata", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p ${FLATPAK_DEST}/share/appdata", + "cp org.kde.KStyle.Adwaita.appdata.xml ${FLATPAK_DEST}/share/appdata", + "appstream-compose --basename=org.kde.KStyle.Adwaita --prefix=${FLATPAK_DEST} --origin=flatpak org.kde.KStyle.Adwaita" + ], + "sources": [ + { + "type": "file", + "path": "org.kde.KStyle.Adwaita.appdata.xml" + } + ] + } + ] +} diff --git a/org.kde.KStyle.HighContrast.appdata.xml b/org.kde.KStyle.HighContrast.appdata.xml new file mode 100644 index 0000000..4f35157 --- /dev/null +++ b/org.kde.KStyle.HighContrast.appdata.xml @@ -0,0 +1,11 @@ + + + org.kde.KStyle.HighContrast + CC0-1.0 + HighContrast theme + HighContrast widget theme matching the GNOME highcontrast theme + +

HighContrast widget theme that matches the GNOME highcontrast theme.

+
+ https://github.com/MartinBriza/highcontrast-qt +
diff --git a/org.kde.KStyle.HighContrast.json b/org.kde.KStyle.HighContrast.json new file mode 100644 index 0000000..33cf9bc --- /dev/null +++ b/org.kde.KStyle.HighContrast.json @@ -0,0 +1,38 @@ +{ + "id": "org.kde.KStyle.HighContrast", + "branch": "5.9", + "runtime": "org.kde.Platform", + "build-extension": true, + "sdk": "org.kde.Sdk", + "runtime-version": "5.9", + "appstream-compose": false, + "separate-locales": false, + "modules": [ + { + "name": "highcontrast-qt", + "cmake": true, + "config-opts": ["-DQT_PLUGINS_DIR=/usr/share/runtime/lib/plugins/HighContrast"], + "sources": [ + { + "type": "git", + "url": "https://github.com/MartinBriza/highcontrast-qt.git" + } + ] + }, + { + "name": "appdata", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p ${FLATPAK_DEST}/share/appdata", + "cp org.kde.KStyle.HighContrast.appdata.xml ${FLATPAK_DEST}/share/appdata", + "appstream-compose --basename=org.kde.KStyle.HighContrast --prefix=${FLATPAK_DEST} --origin=flatpak org.kde.KStyle.HighContrast" + ], + "sources": [ + { + "type": "file", + "path": "org.kde.KStyle.HighContrast.appdata.xml" + } + ] + } + ] +} diff --git a/org.kde.PlatformTheme.QGnomePlatform.appdata.xml b/org.kde.PlatformTheme.QGnomePlatform.appdata.xml new file mode 100644 index 0000000..6c5594c --- /dev/null +++ b/org.kde.PlatformTheme.QGnomePlatform.appdata.xml @@ -0,0 +1,11 @@ + + + org.kde.PlatformTheme.QGnomePlatform + CC0-1.0 + QGnomePlatform + Qt Platform Theme aimed to accommodate Gnome settings + +

QGnomePlatform is a Qt Platform Theme aimed to accommodate as much of GNOME settings as possible and utilize them in Qt applications without modifying them - making them fit into the environment as well as possible.

+
+ https://github.com/MartinBriza/QGnomePlatform +
diff --git a/org.kde.PlatformTheme.QGnomePlatform.json b/org.kde.PlatformTheme.QGnomePlatform.json new file mode 100644 index 0000000..52b24d1 --- /dev/null +++ b/org.kde.PlatformTheme.QGnomePlatform.json @@ -0,0 +1,91 @@ +{ + "id": "org.kde.PlatformTheme.QGnomePlatform", + "branch": "5.9", + "runtime": "org.kde.Platform", + "build-extension": true, + "sdk": "org.kde.Sdk", + "runtime-version": "5.9", + "appstream-compose": false, + "separate-locales": false, + "build-options" : { + "prefix": "/usr/share/runtime/lib/plugins/QGnomePlatform", + "env": { + "PATH": "/usr/share/runtime/lib/plugins/QGnomePlatform/bin:/usr/bin:/app/bin:/bin" + } + }, + "modules": [ + { + "name": "gsettings-desktop-schemas", + "sources": [ + { + "type": "archive", + "url": "https://download.gnome.org/sources/gsettings-desktop-schemas/3.24/gsettings-desktop-schemas-3.24.0.tar.xz", + "sha256": "f6573a3f661d22ff8a001cc2421d8647717f1c0e697e342d03c6102f29bbbb90" + } + ] + }, + { + "name": "vala", + "cleanup-platform": [ "*" ], + "config-opts": [ "--enable-vapigen", "--enable-unversioned" ], + "sources": [ + { + "type": "archive", + "url": "https://download.gnome.org/sources/vala/0.36/vala-0.36.3.tar.xz", + "sha256": "ac8a4ecd01f62d0c5f62ba50b7290d8c5a1edb308eec772a65b8e79be68f061c" + } + ] + }, + { + "name": "dconf", + "buildsystem": "meson", + "cleanup": [ "/libexec/dconf-service", "/share/dbus-1/services/*" ], + "sources": [ + { + "type": "git", + "url": "git://git.gnome.org/dconf", + "branch": "0.27.1" + } + ] + }, + { + "name": "qgnomeplatform", + "sources": [ + { + "type": "git", + "url": "https://github.com/MartinBriza/QGnomePlatform.git" + }, + { + "type": "shell", + "commands": [ + "sed -i 's@\$\$\\[QT_INSTALL_PLUGINS\\]@/usr/share/runtime/lib/plugins/QGnomePlatform@' qgnomeplatform.pro" + ] + }, + { + "type": "patch", + "path": "patch/qgnomeplatform.patch" + }, + { + "type": "script", + "commands": [ "qmake INCLUDEPATH=/usr/share/runtime/lib/plugins/QGnomePlatform/include/"], + "dest-filename": "configure" + } + ] + }, + { + "name": "appdata", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p ${FLATPAK_DEST}/share/appdata", + "cp org.kde.PlatformTheme.QGnomePlatform.appdata.xml ${FLATPAK_DEST}/share/appdata", + "appstream-compose --basename=org.kde.PlatformTheme.QGnomePlatform --prefix=${FLATPAK_DEST} --origin=flatpak org.kde.PlatformTheme.QGnomePlatform" + ], + "sources": [ + { + "type": "file", + "path": "org.kde.PlatformTheme.QGnomePlatform.appdata.xml" + } + ] + } + ] +} diff --git a/patch/adwaita-icons.patch b/patch/adwaita-icons.patch new file mode 100644 index 0000000..629484d --- /dev/null +++ b/patch/adwaita-icons.patch @@ -0,0 +1,28 @@ +diff --git a/Makefile.am b/Makefile.am +index aa1f59b..0bbbef6 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -209,11 +209,7 @@ install-data-hook: + uninstall-hook: + @rm -f $(DESTDIR)$(themedir)/icon-theme.cache + +-pkgconfigdir = $(datadir)/pkgconfig +-pkgconfig_DATA = adwaita-icon-theme.pc +- + EXTRA_DIST = \ +- adwaita-icon-theme.pc.in \ + Adwaita \ + COPYING_CCBYSA3 \ + COPYING_LGPL \ +diff --git a/configure.ac b/configure.ac +index d855b7a..4f6ab3b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,7 +80,6 @@ AM_CONDITIONAL([ENABLE_L_XL_VARIANTS], [test x$enable_l_xl_variants = xyes]) + + AC_CONFIG_FILES([ + Makefile +-adwaita-icon-theme.pc + src/Makefile + src/fullcolor/Makefile + src/symbolic/Makefile diff --git a/patch/qgnomeplatform.patch b/patch/qgnomeplatform.patch new file mode 100644 index 0000000..2319ba5 --- /dev/null +++ b/patch/qgnomeplatform.patch @@ -0,0 +1,57 @@ +diff --git a/src/gnomehintssettings.cpp b/src/gnomehintssettings.cpp +index 3708a5c..10f9fc3 100644 +--- a/src/gnomehintssettings.cpp ++++ b/src/gnomehintssettings.cpp +@@ -52,8 +52,30 @@ GnomeHintsSettings::GnomeHintsSettings() + : QObject(0) + , m_gtkThemeDarkVariant(false) + , m_palette(nullptr) +- , m_settings(g_settings_new("org.gnome.desktop.interface")) + { ++ bool inSandbox = false; ++ if (!qEnvironmentVariableIsEmpty("XDG_RUNTIME_DIR")) { ++ const QString runtimeDir = qgetenv("XDG_RUNTIME_DIR"); ++ if (!runtimeDir.isEmpty()) { ++ inSandbox = QFileInfo::exists(runtimeDir + QLatin1String("/flatpak-info")); ++ } ++ } ++ ++ if (inSandbox) { ++ if (qEnvironmentVariableIsSet("GIO_EXTRA_MODULES")) { ++ m_gioExtraModules = qgetenv("GIO_EXTRA_MODULES"); ++ QString gioExtraModules = QStringLiteral("%1:%2").arg(m_gioExtraModules).arg(QStringLiteral("/usr/share/runtime/lib/plugins/QGnomePlatform/lib/gio/modules")); ++ qputenv("GIO_EXTRA_MODULES", gioExtraModules.toUtf8()); ++ } else { ++ qputenv("GIO_EXTRA_MODULES", QByteArray("/usr/share/runtime/lib/plugins/QGnomePlatform/lib/gio/modules")); ++ } ++ ++ GSettingsSchemaSource *schema = g_settings_schema_source_new_from_directory("/usr/share/runtime/lib/plugins/QGnomePlatform/share/glib-2.0/schemas/", g_settings_schema_source_get_default(), true, nullptr); ++ m_settings = g_settings_new_full(g_settings_schema_source_lookup(schema, "org.gnome.desktop.interface", true), nullptr, nullptr); ++ } else { ++ m_settings = g_settings_new("org.gnome.desktop.interface"); ++ } ++ + gtk_init(nullptr, nullptr); + + // Set log handler to suppress false GtkDialog warnings +@@ -161,6 +183,8 @@ GnomeHintsSettings::GnomeHintsSettings() + + GnomeHintsSettings::~GnomeHintsSettings() + { ++ qputenv("GIO_EXTRA_MODULES", m_gioExtraModules.toUtf8()); ++ + qDeleteAll(m_fonts); + delete m_palette; + } +diff --git a/src/gnomehintssettings.h b/src/gnomehintssettings.h +index ab3e09e..b4adf7a 100644 +--- a/src/gnomehintssettings.h ++++ b/src/gnomehintssettings.h +@@ -88,6 +88,7 @@ protected: + private: + QStringList xdgIconThemePaths() const; + ++ QString m_gioExtraModules; + gboolean m_gtkThemeDarkVariant; + gchar *m_gtkTheme; + QPalette *m_palette;