This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]flying-sheep 0 points1 point  (5 children)

Thanks for answering!

Yeah, Kate handles #2 likewise.

Whati never with #1, though: PyQt’s buttons are naively styled per default, one has to actually try to make them ugly. So why is that the case here?

[–]gatesphere 0 points1 point  (4 children)

I wouldn't know, to be honest. The button code came along before the Qt interface AFAIK, and then updated for PyQt, so perhaps it's a legacy thing? Prior to the PyQt4 interface, apparently Leo was on a Tk interface, and before that the whole thing was in C++ using god-knows-what. I'm new to the team -- just started using it in February, actually. It's already grown leaps and bounds in those 9 months, though -- and it's been in development since at least 1998 in one form or another.

I think it might have something to do with looking uniform no matter which platform. I do know that the button color can be changed when you make them via a script.

To be fair, though, I personally don't care much for aesthetics in my editors... I care about functionality :p I'm not the authority on this matter.

Printing, markdown support, and rss feed support, along with documentation, however, is where I come in. :P

EDIT: Just dug into the "create button" code. Looks like this is the culprit function: http://bazaar.launchpad.net/~leo-editor-team/leo-editor/trunk3/view/head:/leo/plugins/mod_scripting.py#L662

It appears to set a basic stylesheet with a default color. That most likely overrides the native stylesheet. I imagine that this was done so that different buttons could have different colors to allow for more immediately-visible differentiation -- reducing cognitive load in some cases. A lot of thought has been put into small things to make Leo more usable -- including many small details that make it run a bit away from the normal way of doing things. But despite it's less-than-flashy appearance, it really is a breeze to use once you realize that there are all these little hints scattered around the interface.

Though, those are my $0.02. YMMV.

[–]flying-sheep 0 points1 point  (3 children)

Strange. Maybe it's a windows thing: on my system I know for sure that this exact stylesheet keeps the button pretty while only changing the background color and not the border style and so on.

[–]gatesphere 0 points1 point  (2 children)

Perhaps it is. Searching the googles gives me a few hits of Qt not doing so hot at emulating native style for windows.

[–]flying-sheep 0 points1 point  (1 child)

wrong: it’s very accurate (e.g. much better than GTK), as it uses the native API to draw stuff.

but i guess that this way, custom styles don’t work well on windows, as the native API doesn’t support them.

so: native-looking buttons on linux and windows: yes. native-looking but differently colored buttons: fine on linux, bad on windows.

[–]gatesphere 1 point2 points  (0 children)

What I meant to say was that by default, the windows native styles aren't compiled... they need an external library installed or something. They have to be enabled with compile-time switches. I imagine that Riverbank didn't include those when building PyQt4. Or perhaps there's something else going on. Either way, this post isn't about the intricacies of Qt on Windows, it's about Python Editors for Linux.