Edward K. Ream
unread,Sep 28, 2012, 7:59:32 PM9/28/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to leo-e...@googlegroups.com
Besides scrolling-related issues, rev 5464 takes another step towards eliminating all problematic calls to w.setStyleSheet.
It does this by honoring focus-border settings in preference to background/foreground colors in text widgets. This will happen if @bool use_focus_border = True This is the default, so by default you will get the new scheme.
**Important**: you can still specify colors for text widgets in the Qt style sheet as always, so don't panic ;-) The new scheme simply means that if you allow focus border colors, only focus borders will be redrawn when focus changes *or* when input state changes from, say, insert state to command state.
Because the focus borders are updated without using w.setStyleSheet in any way, the new way will completely eliminate the unwanted scrolling that results from calls to w.setStyleSheet.
Furthermore, using focus borders colors should work well with *any* color scheme, including solarized colors. But the color scheme I prefer and recommend is simply to use a white or sepia background in the body pane. Imo using strong border colors to indicate state is much better than using subtly-different pastel shades for the text background. Ymmv.
Some new settings are needed to make the new scheme work. They are in leoSettings.leo.
@color focus_border_color = blue
@color focus_border_command_state_color = red
@color focus_border_overwrite_state_color = green
The first setting is not new, but iirc, the old default value for the first setting was red. Naturally, you should copy these to myLeoSettings.leo if you change them.
I think most people will enjoy the new scheme. It is much more solid than the old. No unwanted scrolling ever.
Please report any problems with the new code immediately.
Edward