Theming -- single point of origine

Contribute ideas for future releases.
Forum rules
No support questions here please.
Suggestion & new ideas for Cinnamon go on GitHub.

Theming -- single point of origine

Postby interbird1964 on Sun Aug 19, 2012 2:40 pm

[SPOO - Single Point of Origine]

The Mint-X theme, while beautiful, has always surprised me when
changing to another theme (like Lightning)

Changing to a theme other than Mint-X increases the font-size
so your whole Desktop look 'derailed'.

I tracked it down to /usr/share/themes/Mint-X/gtk-2.0/gtkrc,
around line #53: font_name = "9" and disabling that line makes the
font size appear just like the other themes.
(Not for sub-bars though, you'll have to change more in gtkrc)

I wonder why one would put such font-overrides in a theme that breaks
the "changing themes" experience...


Now, with gtk2,gtk3 and cinnamon themes, it's harder to get a consistent
Desktop experience.
While there are GTK3 themes that kind-a blend-in with the GTK2 theme you
are using when running MATE, using GTK2 apps under Cinnamon seem not to respond
to GTK2 theming. Fonts appear very small in GTK2 apps under Cinnamon; at least on my LMDE system.
(Try Pluma under Cinnamon)

So, running GTK2 apps under cinnamon (LMDE) again decreases the font, but
this time adjusting gtkrc seems to be no solution.


How could we solve this for the future ?


To the Mint Team:
-----------------
I propose to have all themes usable with Linux Mint to be abstracted to XML.
XML can be rendered to anything by using XSL, so all theme-properties will
be in *one place* (XML-file) and themes for *multiple* engines/environments can
be generated (XSLT-file). SVG should be the source format for images,
(on-the-fly) converted to PNG if needed.

Example:
Lightning.xml hold all the properties defining the "Lightning" theme.
It can even embed all the graphics in [!CDATA] base64 encoding, so it serves as a
kind of 'container'.
(ODF would also be an alternative candidate for holding themes but is possibly be overblown)

"Lightning.xsl" translates those properties to GTK2,GTK3,Cinnamon or any
existing (KDE)/future theming/rendering engine format needed.
At build (developer)/install (user select) or runtime (user dynamic).

The XSL is the 'pivot' that ensures all properties of the theme defined
in the XML are rendered correctly to the target environment.
If the target environment does not support a particular property,
sane defaults are supplied. As sane as Linux Mint is :-) (9-of-10)


This idea is based on the concept of "Single Point of Origin" [SPOO].
cons:
- the concept involves a translation which has to be done every time the
origine changes
- ...
pros:
- everything is at a single place, having no out-of-sync or mismatched
configurations/environments
- multiple targets (gtk2/3/cinnamon) all benefit from the 'SPOO'
- future proof
- ...


In short:
THEME.XML -> TRANSLATE.XSL ->
>GTK2
>GTK3
>CINNAMON
>??


If seems like a good idea to you mint-devs, then I'm in to do my part.
You supply the definition of a style, I put it in XML and write the XSL to
generate for what you want.


Greetz,
Ben.
interbird1964
Level 1
Level 1
 
Posts: 20
Joined: Tue Dec 01, 2009 10:05 pm

Linux Mint is funded by ads and donations.
 

Re: Theming -- single point of origine

Postby Monsta on Sun Oct 14, 2012 8:25 am

Hmm... no one is interested yet?

Well, I think this is a nice idea, but looks like it would be quite hard to implement. Theme engines are all different. The layouts of GTK+ 2 and 3 theme files are quite different too. Also, there are probably some properties that one engine understands and the other one doesn't.


interbird1964 wrote:While there are GTK3 themes that kind-a blend-in with the GTK2 theme you
are using when running MATE

Are there any?
I haven't yet seen any GTK+ theme that looks identical in both GTK+ 2 and 3. Identical means you can't tell what GTK+ version the application is using by its looks, you have to look at the package dependencies for that. :)

interbird1964 wrote:Fonts appear very small in GTK2 apps under Cinnamon; at least on my LMDE system.
(Try Pluma under Cinnamon)

Hmm, it works for me... The font_name trick works, Pluma looks the same as in MATE.
On the other hand, your post is from Update Pack 4 era :) and I've checked it in UP5. Maybe something has been fixed since then.
Monsta
Level 5
Level 5
 
Posts: 702
Joined: Fri Aug 19, 2011 3:46 am

Re: Theming -- single point of origine

Postby Asimov on Thu Nov 01, 2012 7:09 pm

The idea is great, but i thing the post is not at the right place. Maybe a base for gkt4 standards: a system with a notion of heritage. I think it's a remark that should be heard by this team: https://live.gnome.org/GtkLove
Asimov
Level 2
Level 2
 
Posts: 95
Joined: Wed Aug 01, 2012 4:04 am

Re: Theming -- single point of origine

Postby interbird1964 on Mon Nov 05, 2012 3:27 am

@Asimov:

Actually it is not a Gnome issue.
There are many window-managers and theme-managers.
If you look at the greybird theme for instance, they recently updated it
to include an xfce theme. So somebody took an effort to manually convert
stuff to the way xfce likes it.

The whole idea is to put all the theme-resources in one xml-file and run that
through an xslt-translator to generate the stuff for every window-manager,
theme-manager and what-not. Even inheritance on the xml-level could be
accomplished.

I'm still playing with the idea but the stuff that has to be generated is very diverse.
Some themes have special tweaks for certain apps or even specific versions of them.
But it's on the 'backburner' here and gets some time slices now an then :-)
interbird1964
Level 1
Level 1
 
Posts: 20
Joined: Tue Dec 01, 2009 10:05 pm


Return to Suggestions & New Ideas

Who is online

Users browsing this forum: No registered users and 1 guest