Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk-mouse settings are not saved #464

Open
agaida opened this issue May 2, 2019 · 13 comments
Open

gtk-mouse settings are not saved #464

agaida opened this issue May 2, 2019 · 13 comments
Assignees
Labels

Comments

@agaida
Copy link
Member

agaida commented May 2, 2019

gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=0

The themes will set via lxqt-config-appearance, but not saved and not provided via xsettings - bad :(
Second - will file a new bug for, the cursor-theme-size can't be set.

On the fly it works:

Steps to reproduce:

  1. Open Chrome or Brave broweser
  2. Open lxqt-config-appearance and set a theme - hurray, it works.
  3. Close both.
  4. Open Browser again and be sad.
@agaida agaida added the bug label May 2, 2019
@agaida agaida assigned agaida, tsujan and yan12125 and unassigned agaida May 2, 2019
@tsujan
Copy link
Member

tsujan commented May 2, 2019

@yan12125 Please save me ;) @agaida assigned it to me too but I don't know about these things — had no role in their implementation.

@agaida
Copy link
Member Author

agaida commented May 2, 2019

:) - ok, i removed the hook for @tsujan, a bit more information. I used xfce query tool and was surprised - we set only a few things and ignore the very most possible settings - not that clever and it looks horrible.

Background

I was playing a browser game and noticed the fugly default black cursor. Was about to cry and had a look into

Findings
xfconf-query -c xsettings -l                         
/Gdk/WindowScalingFactor
/Gtk/ButtonImages
/Gtk/CanChangeAccels
/Gtk/ColorPalette
/Gtk/CursorThemeName
/Gtk/CursorThemeSize
/Gtk/DecorationLayout
/Gtk/FontName
/Gtk/IconSizes
/Gtk/KeyThemeName
/Gtk/MenuBarAccel
/Gtk/MenuImages
/Gtk/MonospaceFontName
/Gtk/ToolbarIconSize
/Gtk/ToolbarStyle
/Net/CursorBlink
/Net/CursorBlinkTime
/Net/DndDragThreshold
/Net/DoubleClickDistance
/Net/DoubleClickTime
/Net/EnableEventSounds
/Net/EnableInputFeedbackSounds
/Net/IconThemeName
/Net/SoundThemeName
/Net/ThemeName
/Xfce/LastCustomDPI
/Xft/Antialias
/Xft/DPI
/Xft/Hinting
/Xft/HintStyle
/Xft/RGBA

Our .xsettingsd

# Created by lxqt-config-appearance (DO NOT EDIT!)
Net/IconThemeName "Papirus"
Net/ThemeName "Adwaita"
Gtk/FontName "Noto Sans 10"
Gtk/MenuImages 1
Gtk/ButtonImages 1
Gtk/ToolbarStyle "GTK_TOOLBAR_BOTH_HORIZ"

Solution for me

# Created by lxqt-config-appearance (DO NOT EDIT!)
Net/IconThemeName "Papirus"
Net/ThemeName "Adwaita"
Gtk/FontName "Noto Sans 10"
Gtk/MenuImages 1
Gtk/ButtonImages 1
Gtk/ToolbarStyle "GTK_TOOLBAR_BOTH_HORIZ"
Gtk/CursorThemeName "Chameleon-Pearl-Large"

just added the Theme Name -- works as expected and filed this bug 😄

@agaida
Copy link
Member Author

agaida commented May 4, 2019

@selairi - we should implement it fully :)

@selairi
Copy link
Contributor

selairi commented May 4, 2019 via email

@agaida
Copy link
Member Author

agaida commented May 4, 2019

Cool, thanks - don't know if there are other things xfconf-query missed. will test with Gnome and read a bit more about. Even if we don't provide all the things™ right now we should be prepared to do so.

@yan12125
Copy link
Member

yan12125 commented May 4, 2019

Well, I don't quite understand xsettings either :O

I remember lxqt-config-appearance creates a temporary file and feed it to xsettingsd, so settings are not persistent?

@agaida
Copy link
Member Author

agaida commented May 4, 2019

Only spotted it when playing an online game and couldn't find my cursor - added the needed thing to .xsettingsfoo and xsettingsd picked it up right. So it is just an implementation detail.

@tsujan
Copy link
Member

tsujan commented May 4, 2019

so settings are not persistent?

I guess they aren't complete. @selairi is the expert in GTK settings.

@selairi
Copy link
Contributor

selairi commented May 5, 2019

Hello, I have just upload the changes in: https://github.com/selairi/lxqt-config
It is ready to merge in master branch.

@yan12125 lxqt-config-appearance doesn't use .xsettingsd file. It only runs xsettingsd to alert to GTK applications about changes, then xsettingsd is killed (in order to save RAM). It is not needed run xsettingsd in your LXQt session, because GTK tools read their styles from gtkrc files.

@agaida
Copy link
Member Author

agaida commented May 5, 2019

ok - more verbose - the fact that the mouse style is saved now if fine and a great improvement. When i talk about complete (or nearly complete implementation) i thought about something like that:

possible we provide should be implemented
/Gdk/WindowScalingFactor
/Gtk/ButtonImages Gtk/ButtonImages 1 implemented
/Gtk/CanChangeAccels
/Gtk/ColorPalette
/Gtk/CursorThemeName Gtk/CursorThemeName "Chameleon-Pearl-Large" implemented
/Gtk/CursorThemeSize
/Gtk/DecorationLayout
/Gtk/FontName Gtk/FontName "Noto Sans 10" implemented
/Gtk/IconSizes
/Gtk/KeyThemeName
/Gtk/MenuBarAccel
/Gtk/MenuImages Gtk/MenuImages 1 implemented
/Gtk/MonospaceFontName
/Gtk/ToolbarIconSize
/Gtk/ToolbarStyle Gtk/ToolbarStyle "GTK_TOOLBAR_BOTH_HORIZ" implemented
/Net/CursorBlink
/Net/CursorBlinkTime
/Net/DndDragThreshold
/Net/DoubleClickDistance
/Net/DoubleClickTime
/Net/EnableEventSounds
/Net/EnableInputFeedbackSounds
/Net/IconThemeName Net/IconThemeName "Papirus" implemented
/Net/SoundThemeName
/Net/ThemeName Net/ThemeName "Adwaita" implemented
/Xfce/LastCustomDPI xfce - not needed
/Xft/Antialias
/Xft/DPI
/Xft/Hinting
/Xft/HintStyle
/Xft/RGBA

So i guess we have plenty room for improvement - and we should improve that, maybe a first step would be to select the things we neee, want to have or can ignore.

This table is based on xfconf-query, so i don't know if the list is complete.

@selairi
Copy link
Contributor

selairi commented May 6, 2019

@agaida This is a good point. There are lots of GTK properties that are not set by LXQt and we should set them by default or build new interfaces to select them.

Example, "Net/SoundThemeName" is the XDG sound theme to use for event sounds. This is not set by LXQt. Should we set it by default or write a tool to select sounds? In this case, I would like to set no sound by default, I love silence.

To my mind, we should agree on the default GTK values and we should not write more interfaces.

@selairi
Copy link
Contributor

selairi commented May 6, 2019

My suggestions for default values or to add to LXQt are:

possible we provide should be implemented
/Gdk/WindowScalingFactor It depends on Openbox/Kwin settings ignore it
/Gtk/ButtonImages Gtk/ButtonImages 1 implemented
/Gtk/CanChangeAccels This setting is ignored by GTK 3.10 ignore it
/Gtk/ColorPalette This setting is ignored by GTK 3.10 ignore it
/Gtk/CursorThemeName Gtk/CursorThemeName "Chameleon-Pearl-Large" implemented
/Gtk/CursorThemeSize Now, it seems work properly
/Gtk/DecorationLayout This setting determines which buttons should be put in the titlebar of client-side decorated windows, and whether they should be placed at the left of right. Set to "menu:minimize,maximize,close"
/Gtk/FontName Gtk/FontName "Noto Sans 10" implemented
/Gtk/IconSizes should be implemented
/Gtk/KeyThemeName Name of key theme to load. LXQt doesn't set this. ignore it
/Gtk/MenuBarAccel has been deprecated ignore it
/Gtk/MenuImages Gtk/MenuImages 1 implemented
/Gtk/MonospaceFontName We should implement it and add it to fonts config
/Gtk/ToolbarIconSize
/Gtk/ToolbarStyle Gtk/ToolbarStyle "GTK_TOOLBAR_BOTH_HORIZ" implemented
/Net/CursorBlink Whether the cursor should blink. it should set to false
/Net/CursorBlinkTime
/Net/DndDragThreshold we should set LXQt values
/Net/DoubleClickDistance we should set LXQt values
/Net/DoubleClickTime we should set LXQt values
/Net/EnableEventSounds set to false
/Net/EnableInputFeedbackSounds
/Net/IconThemeName Net/IconThemeName "Papirus" implemented
/Net/SoundThemeName
/Net/ThemeName Net/ThemeName "Adwaita" implemented
/Xfce/LastCustomDPI xfce - not needed
/Xft/Antialias we should set LXQt values
/Xft/DPI we should set LXQt values
/Xft/Hinting we should set LXQt values
/Xft/HintStyle we should set LXQt values
/Xft/RGBA we should set LXQt values

More docs in: https://developer.gnome.org/gtk3/stable/GtkSettings.html

@elviosak
Copy link

elviosak commented Dec 14, 2020

Having some problems with this on a recent install (1 week ago, have no idea why previous install worked fine) the cursor size on chromium-based browsers (tested brave, chromium and vivaldi) is huge (probably double, at 48px), when changing the cursor size on lxqt-config-appearance it works until logoff, so i guess xsettingsd sets it, but it doesnt persist.

might be relevant: my monitor config is weird:
2020-12-13_23-24
top one is a 42 inch tv and bottom is 27 inch monitor, both 1080p, and if i dont disable QT_AUTO_SCALE it breaks qbittorrent's ui, so it could have something to do with HiDPI and how GTK or chromium handles it.

my hacky fix is add desired cursor size in $HOME/.config/gtk-3.0/settings.ini like gtk-cursor-theme-size = 24 and run a script on autostart with inotifywait in a loop to ensure it gets set again when the file is changed, should this be set by lxqt-config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants