When it is set to "Instant", turn off GTK animations.
Details
- Reviewers
gikari - Group Reviewers
Plasma - Commits
- R99:66ab37df7aed: Bind gtk-enable-animations setting to global animation speed slider
(I'd say this is good for 5.18)
- Started gedit, clicked "Open", got it flying in animated.
- Changed slider to Instant in workspace KCM, restarted gedit, clicked "Open", got it show immediately
- Settings change doesn't appear to work at runtime with gtk3 but that's probably unrelated
Diff Detail
- Repository
- R99 KDE Gtk Configuration Tool
- Lint
Lint Skipped - Unit
Unit Tests Skipped
kded/gtkconfig.cpp | ||
---|---|---|
188 | Wrong settings key |
kded/configvalueprovider.cpp | ||
---|---|---|
145 | You don't need this. KConfigWatcher does it automagically on change. I did that because I wanted a way for N connections to only reparse the file once. It also means you can use the config watcher with no signal handling, just install and you get the correct values on the next read. Amazing. My fault for not having enough docs |
kded/configvalueprovider.cpp | ||
---|---|---|
145 | I know, I just kept it consistent with the other code. Let's clean up this everywhere else above separately? |
kded/gtkconfig.cpp | ||
---|---|---|
189 | org.gnome.desktop.interface param is not necessary - it is the default. Most of the settings are in this category in dconf. |
Seems like dconf does not convert string to boolean.
(process:24285): GLib-GIO-CRITICAL **: 17:51:47.492: g_settings_set_value: key 'enable-animations' in 'org.gnome.desktop.interface' expects type 'b', but a GVariant of type 's' was given
The method setGtk3ConfigValueDconf should be parameterized with the argument paramValue to be boolean. Something like this might work:
void ConfigEditor::setGtk3ConfigValueDconf(const QString ¶mName, bool paramValue, const QString &category) { g_autoptr(GSettings) gsettings = g_settings_new(category.toUtf8().constData()); g_settings_set_boolean(gsettings, paramName.toUtf8().constData(), paramValue); }
kded/configvalueprovider.h | ||
---|---|---|
57 | It's not clear what ownConfig config is. GtkConfig does not have its own config (and even if it has, it is a bit strange to watch their own config in this context). If I understand correctly it is the kdeglobals. It would be nice to name it kdeglobalsConfig or globalsConfig |
Also i found out, that gtk apps on start throw this error:
(org.gnome.Nautilus:4278): Gdk-WARNING **: 21:08:58.246: Cannot transform xsetting gtk-enable-animations of type gchararray to type gboolean
This is because of xsettingd config. You need to add Gtk/EnableAnimations to exceptions in QStringList nonStringProperties var in replaceValueInXSettingsdContents method, but it's only a hotfix. It is better to do some parameterezing with QVariants or C++ templates for ConfigEditor functions.