Re: SVG format in metacity, gtk, desklets and build system for Gnome
- From: "John (J5) Palmieri" <johnp martianrock com>
- To: Marcin Antczak <marcin antczak e-dev pl>
- Cc: desktop-devel-list gnome org
- Subject: Re: SVG format in metacity, gtk, desklets and build system for Gnome
- Date: Wed, 03 Sep 2003 09:42:44 -0400
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.
> 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. 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 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.
> >
> > 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. 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.
--
J5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]