Closed GoogleCodeExporter closed 9 years ago
This issue in the style editor is caused by some optimization and behavior
changes
made to the Ess handling. Originally each tag was required to specify all
attributes
but the more recent behavior is that only the default tag needs to define all
four
attributes (fore, back, font, size) and all other tags with undefined
attributes
will inheirit from the default style. Ess is also designed to only allow for
one
extra style attribute to be appended to a given style tag specification.
i.e
keyword_style {
fore: #A52B2B bold;
}
When the style editor pulls this StyleItem 'keyword_style' it finds that it
only has
one attribute defined 'fore' and thus only one extra attribute 'bold' can be
defined. So when a request for a new one comes in it removes the old one from
that
tag and adds the new one. For the StyleEditor to be able to work around this
needs
to insert another attribute (most likely copied from the default style) in
order to
house the second extra attribute.
i.e
keyword_style {
fore: #A52B2B bold;
back: #FFFFFF italic;
}
When this happens and is translated into a StyleItem the styling will work as
expected.
I believe there are some notes near the top of ed_style.py about redesigning
the
extra attribute handling. I have had some other ideas since then as well, I
will try
to get this fixed sometime soon.
For now in order to support multiple extra attributes you will need to edit the
ess
by hand to have the duplicate entries to hold the ex attributes.
Cody
Original comment by CodyPrec...@gmail.com
on 2 Jul 2008 at 7:00
Action Items:
1) Adapting parser to allow for multiple modifiers per style tag (done pending
checkin)
2) Add concept of optional 'modfiers' attribute to style item to hold modifier
values when a tag wishes to inheirit all styles but modifiers from
default_style.
(partially complete)
3) Adjust StyleEditor to handle these backend changes
4) Update stylesheet docs
5) Verify that no changes are necessary to existing style sheets (must maintain
backwards compatibility).
Original comment by CodyPrec...@gmail.com
on 30 Jul 2008 at 12:52
Ok the changes in to make this work now have been made.
I haven't had much time to test for side effects of the changes made here,
there will
likely be some that I need to weed out before the next release as the changes
were
fairly major.
If you get a chance to test let me know.
Thanks,
Cody
(p.s Also the syntax modules have had some api additions recently to add more
features. They are capable of providing their own custom container lexers, and
auto
indenter methods.)
Original comment by CodyPrec...@gmail.com
on 31 Jul 2008 at 11:43
I updated to the latest svn and gave it a try. I tried changing the comment
style to
bold + italic, which does show up correctly in the preview pane in the dialog.
Exiting the dialog prompts me to save the new style, which I do and it shows in
my
~/.Editra/styles/stuff.ess:
comment_style {
fore:#838383;
modifiers:bold italic;
}
But, in the editor, nothing has any bold or italic, not comments or any of the
old
styles that used to have the modifiers -- it seems like everything but the
colors has
been cleared.
Original comment by rob.mcmu...@gmail.com
on 31 Jul 2008 at 3:51
Sorry,
It looks like my last commit didn't go through before I left on vacation.
This should be working now.
Thanks,
Cody
Original comment by CodyPrec...@gmail.com
on 5 Aug 2008 at 2:57
cleaning up old 'fixed' issues
Original comment by CodyPrec...@gmail.com
on 3 Feb 2009 at 6:41
Original issue reported on code.google.com by
rob.mcmu...@gmail.com
on 2 Jul 2008 at 5:47