8
$\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$

1 Answer 1

6
$\begingroup$

This is not supported.

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$
5
  • 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
    Commented Nov 1, 2013 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
    Commented Nov 1, 2013 at 14:57
  • $\begingroup$ @ideasman42 is this still ongoing? $\endgroup$
    – Youdi
    Commented Jul 12, 2022 at 8:09
  • 1
    $\begingroup$ This has not changed and as far as I know there are no plans to support this. $\endgroup$
    – ideasman42
    Commented Jul 12, 2022 at 8:49
  • $\begingroup$ @ideasman42 Thanks for replying! $\endgroup$
    – Youdi
    Commented Jul 13, 2022 at 4:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .