On Thu, May 30, 2013 at 9:27 AM, Terry Brown <[email protected]>wrote:
Prior to two revisions ago there was a bg parameter to the button
> creation commands which did nothing, although it was required,
The bg arg is back, but not required.
> and a little known way to style individual buttons in the master stylesheet
> with
>
> QPushButton#<button text>-button { <style> }
>
> because the button creation machinery sets the QObject name of each
> button to the text of the button plus '-button'.
>
> I've tidied up the style code to take advantage of the new stylesheet
> macro expansion, and added another property to buttons so they can be
> styled by kind (or class or type, but I used the work kind for obvious
> reasons :-), as well as individual name.
Good.
> The settings in the stylesheet are now:
>
>
> *color names*
> @MistyRose1 = #FFE4E1
> @LightSteelBlue1 = #CAE1FF
> @LightBlue = #ADD8E6
>
> Buttons may be styled by name:
> QPushButton#<button text>-button { <style> }
> or by kind:
> QPushButton[button_kind="<button kind>"] { <style> }
>
Cool!
BTW, the leo_color_database in leoColor.py uses lower-case names:
'mistyrose1' instead of 'MistyRose1'. The thinking was that Leo's core
code could just lower() on the color name so as to make such names
case-insensitive. Not sure whether this will complicate using this dict
for templates...
Edward
P.S. Terry, I'm trusting that when the dust clears you will write a
tutorial for all your good templating work. If you don't, I fear you may
be its only user ;-)
EKR
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.