This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Creating Header Theme

Tags: None
(comma "," separated)
kde-hackan
Registered Member
Posts
5
Karma
0
OS

Creating Header Theme

Thu Sep 10, 2015 5:26 pm
Hello everybody,

I am making a header theme http://kde-look.org/content/show.php?content=171320 and I would like it to follow system color scheme, mostly thinking about fetching kde system background color into the css or html part of the theme. I have seen another theme get another system color by doing {{header.activecolordark}}. So clearly it can be done and "Fancy Header" for example also gets the system background color, but I can't seem to dig up where it gets the color. I have been browsing through my computer and on search engines for the past two days and it is eating me up that I can't find out how to do it, haha ;D

Any help or pointers would be greately appreciated :)

/ Kris
User avatar
einar
Administrator
Posts
3402
Karma
7
OS

Re: Creating Header Theme

Sun Sep 13, 2015 9:14 pm
What version of PIM are you attempting this from?


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
einar
Administrator
Posts
3402
Karma
7
OS

Re: Creating Header Theme

Mon Sep 14, 2015 7:57 am
I talked with the developer, and the background color is read directly from the system settings.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
kde-hackan
Registered Member
Posts
5
Karma
0
OS

Re: Creating Header Theme

Tue Sep 15, 2015 2:50 am
I am using Theme Editor 4.14.6, although I actually have been writing my current theme in Kate, syntax highlighting and all that.

Anyway, that you for your answer so far. I suspected that the theme reads colors directly from system settings, the question I have is how you grab them from either the html or css -files. There are no built in tools for this in the theme manager.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS

Re: Creating Header Theme

Wed Sep 16, 2015 5:31 am
I don't think you can. As far as I can understand, this is set from the C++ side. You may, however, file a wishlist report on bugs.kde.org if you want access to that feature.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
kde-hackan
Registered Member
Posts
5
Karma
0
OS

Re: Creating Header Theme

Wed Sep 16, 2015 1:54 pm
https://www.dropbox.com/s/xsd2bvxktsymb83/kmd%20system%20color.png?dl=0

That is a screenshot I just took of a kmail header theme which does it ( http://kde-look.org/content/show.php/Light?content=160428 ), it syncs the background color of the header to match the active system color. There must be other colors you can fetch by doing {{ header.SYSTEMCOLORTAG }}
kde-hackan
Registered Member
Posts
5
Karma
0
OS

Re: Creating Header Theme

Wed Sep 16, 2015 10:51 pm
Here's an update on this,

I managed to borrow classes from the the default theme fancy headers. I suppose I did a pretty ugly hack, but hey - It worked :-D

Check out the theme with the link in my first post above :-)

I take back what I said about there not being any tools in the theme editor, I noticed that it has tag-completion when you start typing "header". There are a few colors it can fetch from system color settings there, like active and link color.

The questions remains, though - How does Kmail's default theme Fancy get the system window background color?
User avatar
einar
Administrator
Posts
3402
Karma
7
OS

Re: Creating Header Theme

Fri Sep 18, 2015 5:48 am
Thanks for your investigation. I'll try to ask more to the developers when I get to it.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot]