Hi all,
Thanks for your replies.
First, I should say, I have nothing against the "official" demo styling.
I proposed this patch, because its styling suites better my eyes.
Nobody is forced to use it!
I see two two kinds of problems, a) the demo code, and b) the stc
control.
The main issue is due to the use of a proportional font. When using
a proportional font, the caret is not moving properly. It is
not stopping in front of a char. This is specially true for bold styles.
The caret stops in the middle of a "o" or "u", and even after an "i" or
an "l". Just to make things a little bit complicate, this depends on
the position of the char in the line.
I am not very happy with underlined (proportioanl font) styles.
When using narrrow chars like ")", rendering is not perfect. I never
know what stands before/after the ")". Is it char, a white char,
an underlined char or an underscore. Besides this effect, the code
has sometimes a white space before a "(", event if it's not necessary.
Eg def aa (...) instead of def aa(...). This applies to class
definition too.
Q. Does the width of the underline follow the width of the char
itself in proportional fonts? It seems not.
My post was a long because it proposed a replacement of the
whole module wxStyledTextCtrl_2.py, making the replacement
ready to use.
To Robin
···
--------
2.4.2.3 was one of the prerelease iterations used for release testing.
When I get in that mode new builds can come every day or two as the
final little nasties get ironed out.
Did you change anything besides the style settings? (If you had sent a
patch as prefered instead of the whole file I wouldn't have to ask that!
)
You know, with my phone connection...
Did you change anything besides the style settings?
The only line of code I inserted is the self.SetViewEOL(True)
line, now commented. Others mofificatiosns have to do solely with
styling.
- I did not change the faces dictionary.
- I modified the styles definition, SetStyleSpec(...)
- I reorder the definition of the styles in the code.
If I define the styles in "my" order, everything in
working ok. If I use "your" order, some styles are not
working correctly, eg matching braces. Do not ask
why, this is the result of a long "trial and error"
experience. I got enough experience with "psi".
The demo is importing the styles from wxStyledTextCtrl_2.py,
but some features are not imported or overridden. Eg. Colour
of a selected text. I did not check this into details.
I did not make any change in other demo files.
I tried to play with margin widths, but I got problems, see below.
To Neil
-------
The indentation white space is styled in the wxSTC_P_DEFAULT style so the
size can be changed without changing the fonts for other elements.
I agree. I just wanted to say, that navigating with arrows keys is much
easier with a monospace font.
If you are reading this post, I have questions about the margins.
How many predifined margins are there in the stc? Two or three?
Which margin contains what? I have problems with margin widths too.
If I insert the line in the demo code
self.SetMarginWidth(1, 120)
the width (120) does not change.
But after a
self.SetMarginWidth(0, 120)
insetion, I have twice the line numbering!
To UC
-----
Well, there's some people that stick to good old diffs and don't use
any M$ Software in development
M$? Sorry, our single family PC is a win98 platform. I never succeed to
install Linux properly. I prefer to spend my finite hobby time with
Python/wxPython on windows, than trying to configure one of the 1000
Linux distros.
To UC and all others
---------------------
Thanks for the links, I did not know all the proposed tools.
Jean-Michel Fauth, Switzerland