Re: SVG format in metacity, gtk, desklets and build system for Gnome



W liÅ?cie z Å?ro, 03-09-2003, godz. 15:42, John (J5) Palmieri pisze: 
> On Wed, 2003-09-03 at 08:37, Marcin Antczak wrote:
> > W liÅ?cie z Å?ro, 03-09-2003, godz. 13:33, Havoc Pennington pisze: 
> > > On Wed, Sep 03, 2003 at 12:02:53PM +0200, Marcin Antczak wrote:
> > > > Hello!
> > > > 
> > > > I have some thoughts after reading "KDE and Gnome" threat recently on
> > > > this list and I would like to share them and ask what do you think about
> > > > it.
> > > > 
> > > > 1. About themes...
> > > > 
> > > > 	a. We have Metacity which uses specific XML structure do 	describe
> > > > theme layout and elements.
> > > > 
> > > > 	I wonder why developer invents it's own "priopretary" format 	instead
> > > > adapt SVG semantics?
> > > >
> > > 
> > > SVG is a drawing format. The metacity theme is not just drawing. You
> > > could use SVG for the drawing part, but not for the geometry parts or
> > > things like using GTK theme colors.
> > 
> > I know that SVG is a drawing format, but SVG (I don't know if librsvg
> > supports it) is also provides some interactivity.
> As far as I know librsvg simply renders SVG to a pixmap.  
> No interactivity is implemented.

It's sad... 

> 
> > You can define events and use scripting for actions invoked by user
> > actions (mouse, keyboard).
> > 
> > So, I just thought that it could be fun to draw Metacity theme as SVG
> > object with some rules of course.
> > 
> > Then SVG model could have some required elements and some optional axes.
> > 
> > I imagined this:
> > 
> > required: two rectangles - one into another to define "frame geometry"
> > 
> > and theme designer should define some more objects with predefined names
> > to provide some interactivity like this:
> > 
> > <g id="close_button"></g>
> > <g id="minimize"/>
> > 
> > etc.... then Metacity should parse this SVG and find required objects
> > and link them with adequate actions.
> > 
> > I just know that Metacity has specific XML parser built in and I wonder
> > if it just can parse something based on different XML struture - based
> > on well documented and defined SVG format and not on "prioprietary
> > Havoc" ( ;-) ) format....
> The correct word would be nonstandard, not proprietary, but that is what
> XML is for.

Well, you are right - sorry for that.

>   SVG is just too complicated and the Metacity theme format
> is simple, intuitive and enforces constraints that keep the user
> experience a bit more sane.  Don't try to force the sqare peg into the
> round hole.  As Havok pointed out you could always embed SVG and send
> him the patches.  Namespaces are designed just for this task. I
> anxiously await your patch.

I currently don't understand clearly your idea - I know that I can use
SVG for drawing buttons etc. this is something that Jimmac uses in his
Gorilla themes (I think so... but I should check again).

What do you mean "embed SVG" ?

> > I know that now i can link svg images as theme elements but I just would
> > like to go further and not only define button box but entire
> > "title_bar".
> > 
> > I just don't understand why for example (based on
> > http://developer.gnome.org/doc/tutorials/metacity/metacity-themes.html):
> > 
> > "Metacity supports the following operations in any given drawing
> > 'operation' -
> > rectangle Draws a rectangle with origin (x,y) and given width and
> > height. It takes optional attributes filled, which is "false" by
> > default. 
> > <rectangle color="blend/gtk:fg[NORMAL]/gtk:bg[NORMAL] x="0" y="0"
> > width="width" height="height" filled="true"/>"
> > 
> > So if Metacity supports this then why not this?:
> > http://www.w3.org/TR/SVG/shapes.html#RectElement
> > 
> > "The 'rect' element defines a rectangle which is axis-aligned with the
> > current user coordinate system. Rounded rectangles can be achieved by
> > setting appropriate values for attributes rx and ry."
> > 
> > Why you create your own "standard"?
> 
> SVG was immature at the time Havoc wrote Metacity.  He could have waited
> but I'm guessing he figured he would get some real work done.  Now that
> it is mature anyone is free to implement and send in patches.  Again,
> just because something looks good on paper doesn't meen it is the right
> fit for the job.

Maybe you are right but I think that if SVG is mature for now it should
be some way to change Metacity to support this.

> > > 
> > > If you want to add SVG support for the drawing then please feel free
> > > to send a patch, but you are going to be embedding SVG in the theme
> > > file for the drawing, not using SVG for the whole theme.
> > 
> > Well... I just ask - why not?
> 
> Changing the theme format now would be very bad.  It is now a standard
> within the Gnome community and ripping it out would invalidate all the
> great themes that have been created.

Ohh no I don't agree with you at all.
Converting any XML to any another XML (SVG) is a piece of cake with some
well thought XSLT stylesheet and/or Jelly scripts.

>   However, extending the current
> theme format to include SVG would be a great thing.  The tools are
> there, it just needs somone with the inititive and desire to go and do
> it.

I could try to define guides for defining SVG themes and I could write
XSLT for converting one format into another - but I'm not C/C++ coder so
don't count on me in this - anyone interesed :) ?


And at the end you could ask why for the hell anyone could want to do
this if as you said: "the Metacity theme format is simple, intuitive and
enforces constraints that keep the user experience a bit more sane".

Here you have my arguments:

We still don't have any software for easy creating Gnome (Metacity,
GTK...) themes. And as long as we have "nonstandard" solutions we will
not create any.

I just think that with support for SVG in Metacity, SVG icons and some
kind of support in GTK engine (I know that there is an initial release
of something like this in librsvg - gtk/svg theme engine) we could just
at last create something like an SVG models/templates for entire Gnome
desktop.

And then _users_ (!) _designers_ (!) and not only coders could customize
these "models/templates" with for example Sodipodi.

Or maybe more advanced developers could use tools like: Eclipse
(http://www.eclipse.org) and Oxygenxml (http://www.oxygenxml.com) for
writing SVG "by hand"...

Just wonder how many developers we have with XSLT and SVG skills and how
many with "nonstandard" Metacity theming skills?

Then it would be easy to generate SVG files for Metacity, other for GTK
(we can generate gtkrc with XSLT too - with text output), and other for
icons...

.... just only daydreaming :) 


-- 
Marcin Antczak <marcin antczak e-dev pl>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]