5
$\begingroup$

I'm messing around with python for the first time.

I'm making my own changes to the interface, just because..

How can I move the text inside the buttons down and to the left? The left image is what I have now and the right one it's what I want to do..

Please have in mind that I have zero python knowledge. But I'm willing to learn..

Left it's what I got, right it's what I want to accomplish..

$\endgroup$
3
$\begingroup$

You can't, Blender's layout engine text alignment (in the internal C code), but Python has no access to this.

This is intentional, Python layout definitions are not supposed to care about details like alignment and color, this is controlled by the layout engine and current theme.

If the layout looks bad this may be a hint we need to improve the layout engine's behavior - its unlikely these details will be exposed to Python, unless theres a very good reason.

$\endgroup$
  • 1
    $\begingroup$ So this is kind of a measure to prevent people to mess stuff? (unless you know C..) I think that is cleaver. This way we don't get strange looking addons and stuff. Thank you ideasman! $\endgroup$ – Utopia780 Nov 1 '13 at 12:51
  • $\begingroup$ @Utopia780 - yes you could say so, the layout engine that Python accesses is for high level layout definition - not defining details about where the text and icon are placed. $\endgroup$ – ideasman42 Nov 1 '13 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.