Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,15 @@ Superuser created successfully.
but instead use more of the YAML-specific syntax.
</para>
</listitem>
<listitem>
<para>
GNOME desktop environment now enables
<literal>QGnomePlatform</literal> as the Qt platform theme,
which should avoid crashes when opening file chooser dialogs
in Qt apps by using XDG desktop portal. Additionally, it will
make the apps fit better visually.
</para>
</listitem>
</itemizedlist>
</section>
</section>
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2111.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,5 @@ To be able to access the web UI this port needs to be opened in the firewall.
- Nginx will use the value of `sslTrustedCertificate` if provided for a virtual host, even if `enableACME` is set. This is useful for providers not using the same certificate to sign OCSP responses and server certificates.

- `lib.formats.yaml`'s `generate` will not generate JSON anymore, but instead use more of the YAML-specific syntax.

- GNOME desktop environment now enables `QGnomePlatform` as the Qt platform theme, which should avoid crashes when opening file chooser dialogs in Qt apps by using XDG desktop portal. Additionally, it will make the apps fit better visually.
7 changes: 7 additions & 0 deletions nixos/modules/services/x11/desktop-managers/gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,13 @@ in
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];

# Harmonize Qt5 application style and also make them use the portal for file chooser dialog.
qt5 = {
enable = mkDefault true;
platformTheme = mkDefault "gnome";
style = mkDefault "adwaita";
};

networking.networkmanager.enable = mkDefault true;

services.xserver.updateDbusEnvironment = true;
Expand Down
25 changes: 11 additions & 14 deletions pkgs/development/libraries/qgnomeplatform/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
, lib
, fetchFromGitHub
, nix-update-script
, cmake
, pkg-config
, gtk3
, adwaita-qt
, glib
, gtk3
, qtbase
, qmake
, qtx11extras
, pantheon
, substituteAll
, gsettings-desktop-schemas
}:

mkDerivation rec {
pname = "qgnomeplatform";
version = "0.6.1";
version = "0.8.0";

src = fetchFromGitHub {
owner = "FedoraQt";
repo = "QGnomePlatform";
rev = version;
sha256 = "1mwqg2zk0sfjq54vz2jjahbgi5sxw8rb71h6mgg459wp99mhlqi0";
sha256 = "C/n8i5j0UWfxhP10c4j89U+LrpPozXnam4fIPYMXZAA=";
};

patches = [
Expand All @@ -33,24 +33,21 @@ mkDerivation rec {
];

nativeBuildInputs = [
cmake
pkg-config
qmake
];

buildInputs = [
adwaita-qt
glib
gtk3
qtbase
qtx11extras
];

postPatch = ''
# Fix plugin dir
substituteInPlace decoration/decoration.pro \
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
substituteInPlace theme/theme.pro \
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
'';
cmakeFlags = [
"-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}"
"-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}"
];

passthru = {
updateScript = nix-update-script {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
diff --git a/common/gnomehintssettings.cpp b/common/gnomehintssettings.cpp
index 9860e57..40fa6ec 100644
--- a/common/gnomehintssettings.cpp
+++ b/common/gnomehintssettings.cpp
@@ -80,9 +80,17 @@ void gtkMessageHandler(const gchar *log_domain,
GnomeHintsSettings::GnomeHintsSettings()
: QObject(0)
diff --git a/src/common/gnomesettings.cpp b/src/common/gnomesettings.cpp
index 717cc9b..ee255ea 100644
--- a/src/common/gnomesettings.cpp
+++ b/src/common/gnomesettings.cpp
@@ -150,10 +150,18 @@ GnomeSettingsPrivate::GnomeSettingsPrivate(QObject *parent)
: GnomeSettings(parent)
, m_usePortal(checkUsePortalSupport())
, m_canUseFileChooserPortal(!m_usePortal)
- , m_gnomeDesktopSettings(g_settings_new("org.gnome.desktop.wm.preferences"))
- , m_settings(g_settings_new("org.gnome.desktop.interface"))
, m_fallbackFont(new QFont(QLatin1String("Sans"), 10))
{
+ g_autoptr(GSettingsSchemaSource) schemaSource = nullptr;
+ g_autoptr(GSettingsSchema) gnomeDesktopSchema = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18499,7 +18499,7 @@ with pkgs;

qrupdate = callPackage ../development/libraries/qrupdate { };

qgnomeplatform = libsForQt514.callPackage ../development/libraries/qgnomeplatform { };
qgnomeplatform = libsForQt5.callPackage ../development/libraries/qgnomeplatform { };

randomx = callPackage ../development/libraries/randomx { };

Expand Down