Issue 105: Improved support of cssstyle with XMLGUI
Status:  Done
Owner:
Closed:  Jan 2010
Reported by famille....@gmail.com, Sep 8, 2009
Little modifications to improve xmlgui+cssstyle
1. add support for css selection by id using #mybutton1
   add support for css selection using MTWidget in addition to widget
(sounds more consistant between xmlgui tag name and css name) 

2. fix a bug with xmlgui 

The file contains two patches for the two specified issues. 

hg-push.txt
6.1 KB   View   Download
Sep 8, 2009
Project Member #1 txprog
Thanks for the bug report !

I've look about your diff. First of all, css class are named from the widget class.
If you have a MTSpeciaWidget, the css class will be specialwidget.
So, i don't agree to add "widget_classes.append(parent[0].__name__)" in colors.py.
Use the simplified version instead :)

And a question: why implement a new _id ? the actual id should work.

Thanks anyway for the patch, i'll merge some part and fix the #id rule :)
Status: Accepted
Labels: Component-Core Milestone-0.3.1
Sep 8, 2009
#2 famille....@gmail.com
Thank for the quick reply,

Oups, I didn't noticed that id was a property to _id. You are right this line can be
skipped and the actual id is nicely working.

About the css class naming style, Is there a reason why using a css class name that
is different to the python/xml name ? This look a bit inconsistant with xmlgui where
I have to create object using their full python class name like <MTWidget> and not
<widget>. Of course xmlgui can be changed to allow <widget> instead of
<MTWidget>...but why not having everything python,xmltag,css using the same name ? 

Regards,

Nov 2, 2009
Project Member #3 txprog
(No comment was entered for this change.)
Labels: Milestone-0.4
Dec 8, 2009
Project Member #4 txprog
(No comment was entered for this change.)
Owner: txprog
Jan 27, 2010
Project Member #5 txprog
Part of the patch have been integrated on 0.4
Status: Done