D25945: Sync dark theme preference for GTK3 applications

2019-12-18 Thread Mikhail Zolotukhin
This revision was automatically updated to reflect the committed changes.
Closed by commit R99:99c72b4b9581: Sync dark theme preference for GTK3 
applications (authored by gikari).

REPOSITORY
  R99 KDE Gtk Configuration Tool

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25945?vs=71806=71808

REVISION DETAIL
  https://phabricator.kde.org/D25945

AFFECTED FILES
  CMakeLists.txt
  kded/configvalueprovider.cpp
  kded/configvalueprovider.h
  kded/gtkconfig.cpp
  kded/gtkconfig.h
  src/appearancegtk3.cpp
  src/appearancegtk3.h
  src/appearencegtk.cpp
  src/appearencegtk.h
  src/gtkconfigkcmodule.cpp
  src/ui/gui.ui
  tests/configsavetest.cpp

To: gikari, apol, cblack, broulik, #vdg
Cc: ngraham, GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-18 Thread Nathaniel Graham
ngraham added a comment.


  @apol is the maintainer and @broulik hasn't raised any objections, so I'd say 
you're good to go.

REPOSITORY
  R99 KDE Gtk Configuration Tool

BRANCH
  sync-dark-gtk3-theme-preference

REVISION DETAIL
  https://phabricator.kde.org/D25945

To: gikari, apol, cblack, broulik, #vdg
Cc: ngraham, GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-18 Thread Mikhail Zolotukhin
gikari added a comment.


  @broulik do I need your revision to land this?

REPOSITORY
  R99 KDE Gtk Configuration Tool

BRANCH
  sync-dark-gtk3-theme-preference

REVISION DETAIL
  https://phabricator.kde.org/D25945

To: gikari, apol, cblack, broulik, #vdg
Cc: GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-18 Thread Mikhail Zolotukhin
gikari updated this revision to Diff 71806.
gikari added a comment.


  Rebase on master

REPOSITORY
  R99 KDE Gtk Configuration Tool

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25945?vs=71424=71806

BRANCH
  sync-dark-gtk3-theme-preference

REVISION DETAIL
  https://phabricator.kde.org/D25945

AFFECTED FILES
  CMakeLists.txt
  kded/configvalueprovider.cpp
  kded/configvalueprovider.h
  kded/gtkconfig.cpp
  kded/gtkconfig.h
  src/appearancegtk3.cpp
  src/appearancegtk3.h
  src/appearencegtk.cpp
  src/appearencegtk.h
  src/gtkconfigkcmodule.cpp
  src/ui/gui.ui
  tests/configsavetest.cpp

To: gikari, apol, cblack, broulik, #vdg
Cc: GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-17 Thread Björn Feber
GB_2 added a comment.


  In D25945#577731 , @gikari wrote:
  
  > In D25945#577677 , @cblack wrote:
  >
  > > For flatpaks not respecting the setting preference, have you checked that 
the dark theme variant is installed?
  >
  >
  > Yes, I have installed the theme. But after changing the value in gtk 
configs nothing happens. It could also be the result of my local setup bugs 
(because as the @GB_2 said, the patch works for him flawlessly). So I think he 
(or someone else) should test it.
  >
  > There is a bug  about flatpak 
not using selected GTK theme on X11. It is because it can only be done by 
letting the xsettingd to control the theme of the flatpak app. So, to test 
dark-theme preference sync you need to add to the 
`~/.config/xsettingsd/xsettingsd.conf` this line:
  >
  >   Net/ThemeName "Adwaita"
  >
  >
  > check the dark theme preference checkbox in old GTK KCM and then relaunch 
xsettingsd. The flatpak app should be dark.
  
  
  No, looks like there is no way to make this option work for Flatpak apps, 
because it can't be set with xsettingsd.

REPOSITORY
  R99 KDE Gtk Configuration Tool

BRANCH
  sync-dark-gtk3-theme-preference (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D25945

To: gikari, apol, cblack, broulik, #vdg
Cc: GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-14 Thread Mikhail Zolotukhin
gikari added a comment.


  In D25945#577677 , @cblack wrote:
  
  > For flatpaks not respecting the setting preference, have you checked that 
the dark theme variant is installed?
  
  
  Yes, I have installed the theme. But after changing the value in gtk configs 
nothing happens. It could also be the result of my local setup bugs (because as 
the @GB_2 said, the patch works for him flawlessly). So I think he (or someone 
else) should test it.
  
  There is a bug  about flatpak 
not using selected GTK theme on X11. It is because it can only be done by 
letting the xsettingd to control the theme of the flatpak app. So, to test 
dark-theme preference sync you need to add to the 
`~/.config/xsettingsd/xsettingsd.conf` this line:
  
Net/ThemeName "Adwaita"
  
  check the dark theme preference checkbox in old GTK KCM and then relaunch 
xsettingsd. The flatpak app should be dark.

REPOSITORY
  R99 KDE Gtk Configuration Tool

BRANCH
  sync-dark-gtk3-theme-preference (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D25945

To: gikari, apol, cblack, broulik, #vdg
Cc: GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-14 Thread Carson Black
cblack accepted this revision.
cblack added a comment.
This revision is now accepted and ready to land.


  Code looks fine to me.
  
  For flatpaks not respecting the setting preference, have you checked that the 
dark theme variant is installed? f-d-o runtime doesn't offer an Adwaita-dark 
stub, while GNOME runtime does.
  
  As for xsettingsd, I'm not sure if it synchronises the dark theme preference. 
That doesn't appear to be in the xsettings spec afaik.

REPOSITORY
  R99 KDE Gtk Configuration Tool

BRANCH
  sync-dark-gtk3-theme-preference (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D25945

To: gikari, apol, cblack, broulik, #vdg
Cc: GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-14 Thread Björn Feber
GB_2 added a comment.


  Works perfectly fine for me without waiting.

REPOSITORY
  R99 KDE Gtk Configuration Tool

REVISION DETAIL
  https://phabricator.kde.org/D25945

To: gikari, apol, cblack, broulik, #vdg
Cc: GB_2, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D25945: Sync dark theme preference for GTK3 applications

2019-12-13 Thread Mikhail Zolotukhin
gikari created this revision.
gikari added reviewers: apol, cblack, broulik.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
gikari requested review of this revision.

REVISION SUMMARY
  Previously preference of dark GTK3 theme was set by checkbox in GTK KCM.  
Now, the checkbox is removed and preference is set according to color scheme, 
the user set in Colors KCMm, using the same heuristic, used for filter combobox 
in that KCM.
  
  This makes sense, because, suppose the user set Adwaita GTK3 theme, and their 
color scheme is something dark. Therefore their overall theme is supposedly 
dark, so Adwaita needs to be dark too.
  
  Note, however, that this preference is somewhat buggy. It does not work in 
flatpak apps, it can't be autoreloaded with xsettingsd, and also it is applied 
after some time has passed (this is hypothetical). You can check these 
statements, using the present checkbox in GTK KCM.
  
  Depends on D25872 

TEST PLAN
  1. Apply Adwaita GTK3 Theme
  2. Reload kded5
  3. Apply dark color scheme
  4. Wait some time
  5. (Re)open GTK3 app
  6. App should use Dark color scheme
  7. Apply light color scheme
  8. Wait some time
  9. Reopen GTK3 app
  10. App should use Light color scheme

REPOSITORY
  R99 KDE Gtk Configuration Tool

BRANCH
  sync-dark-gtk3-theme-preference (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D25945

AFFECTED FILES
  CMakeLists.txt
  kded/configvalueprovider.cpp
  kded/configvalueprovider.h
  kded/gtkconfig.cpp
  kded/gtkconfig.h
  src/appearancegtk3.cpp
  src/appearancegtk3.h
  src/appearencegtk.cpp
  src/appearencegtk.h
  src/gtkconfigkcmodule.cpp
  src/ui/gui.ui
  tests/configsavetest.cpp

To: gikari, apol, cblack, broulik
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, 
ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart