[GTK Config] Apply color scheme to GTK3 applications
Needs ReviewPublic

Authored by gikari on Mon, Mar 16, 1:00 PM.

Details

Reviewers
cblack
Group Reviewers
Plasma
Summary

Move from krdb (see D28070) with some refactorings and recoloration GTK module to apply color on the fly.

Depends on D28070

Test Plan

(This demonstration uses recoloration module from D28076, it's not required)

This is how I got it to work, improvements to the process are appreciated

  1. Apply D28070
  2. Compile breeze-gtk and then copy $PREFIX/kde/usr/share/themes/Breeze to /usr/share/themes (replacing the existing Breeze (make a backup)). This is needed because Breeze-Gtk recently changed its color definitions names, which are used in this diff. Old Breeze-Gtk uses different omes and therefore the coloration won't work.
  3. Run systemsettings and reapply Breeze theme from Application Style KCM
  4. Restart kded5
  5. Go to colors KCM, open it side by side with GTK3 applications (preferably Gedit NOT Nautilus or Lutris (those ones are kept open if you press cross in headerbar))
  6. Change the color scheme.
  7. Restart GTK3 application
  8. The application must change the colorscheme

Diff Detail

Repository
R99 KDE Gtk Configuration Tool
Branch
set-colors
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23838
Build 23856: arc lint + arc unit
gikari created this revision.Mon, Mar 16, 1:00 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMon, Mar 16, 1:00 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gikari requested review of this revision.Mon, Mar 16, 1:00 PM
gikari edited the test plan for this revision. (Show Details)Mon, Mar 16, 1:06 PM
gikari retitled this revision from [WIP][GTK Config] Apply color scheme to GTK3 application to [WIP][GTK Config] Apply color scheme to GTK3 applications.
gikari edited the test plan for this revision. (Show Details)
gikari edited the test plan for this revision. (Show Details)
gikari added inline comments.Mon, Mar 16, 1:12 PM
kded/configeditor.cpp
107

Also, I would like to move D24275 to kde-gtk-config repo too with autoloading the module to all GTK applications.

gikari edited the test plan for this revision. (Show Details)Mon, Mar 16, 10:05 PM
gikari planned changes to this revision.Tue, Mar 17, 6:08 PM
gikari updated this revision to Diff 77855.Tue, Mar 17, 6:23 PM
  • Rebase on master
  • Add recoloration module
gikari edited the summary of this revision. (Show Details)Tue, Mar 17, 6:25 PM
gikari edited the test plan for this revision. (Show Details)
cblack requested changes to this revision.Tue, Mar 17, 6:26 PM

The GTK+ module shouldn't be in this patch, as it and the functions to write CSS are separate changes.

This revision now requires changes to proceed.Tue, Mar 17, 6:26 PM
gikari planned changes to this revision.Tue, Mar 17, 6:30 PM
  • I should add the recoloration module to autoload with GTK applications

The GTK+ module shouldn't be in this patch, as it and the functions to write CSS are separate changes.

Then how do I test the recoloration? It seems like it applies randomly whenever the GTK app would like to update the colors, but with that module it's predictable. Or do you mean to make it as a separate patch, but make this one depend on it?

  • I should add the recoloration module to autoload with GTK applications

The GTK+ module shouldn't be in this patch, as it and the functions to write CSS are separate changes.

Then how do I test the recoloration? It seems like it applies randomly whenever the GTK app would like to update the colors, but with that module it's predictable. Or do you mean to make it as a separate patch, but make this one depend on it?

The two items don't have a dependency relation codewise. You simply test the recolouration like how it's been up until now—restart the applications.

You simply test the recolouration like how it's been up until now—restart the applications.

It doesn't work. This is what I was talking about:

It seems like it applies randomly whenever the GTK app would like to update the colors, but with that module it's predictable.

You simply test the recolouration like how it's been up until now—restart the applications.

It doesn't work. This is what I was talking about:

It seems like it applies randomly whenever the GTK app would like to update the colors, but with that module it's predictable.

You seem to be testing with Nautilus, which doesn't actually close when you press the close button.

You simply test the recolouration like how it's been up until now—restart the applications.

It doesn't work. This is what I was talking about:

It seems like it applies randomly whenever the GTK app would like to update the colors, but with that module it's predictable.

You seem to be testing with Nautilus, which doesn't actually close when you press the close button.

Yes, you're right, but I also tested it with Lutris. It also does not work. But with gedit it works fine.

You simply test the recolouration like how it's been up until now—restart the applications.

It doesn't work. This is what I was talking about:

It seems like it applies randomly whenever the GTK app would like to update the colors, but with that module it's predictable.

You seem to be testing with Nautilus, which doesn't actually close when you press the close button.

Yes, you're right, but I also tested it with Lutris. It also does not work. But with gedit it works fine.

Lutris is also another application that doesn't close fully when you press close (however, that part is configurable in Lutris.)

gikari updated this revision to Diff 77860.Tue, Mar 17, 7:01 PM
gikari edited the summary of this revision. (Show Details)
  • Remove the recolor module. It is D28076 now
gikari edited the test plan for this revision. (Show Details)Tue, Mar 17, 7:14 PM
gikari retitled this revision from [WIP][GTK Config] Apply color scheme to GTK3 applications to [GTK Config] Apply color scheme to GTK3 applications.
davidre added a subscriber: davidre.EditedWed, Mar 18, 6:24 PM

It seems it is possible to do this (removing stuff from the data engine) after all. I will try to work on this in the next time

Seems I replied to the wrong diff, oops...