Jump to content

Center for widget element


photo

Recommended Posts

Hello

 

 

I would be nice to have the option to center the widget vertical and horizontal apart.

Adding GUI_ALIGN_CENTER and GUI_ALIGN_TOP does not work at the moment. (don't sure but it was working awhile ago)

 

At the moment it is a bit dirty work to place a button in a hbox and center it correct.

While WidgetButton::getWidth and WidgetButton::getHight only return 0 there is no way to dynamic calculate the right position!

 

 

Kind Regards

Manuel

Link to comment

Hello

 

 

I would be nice to have the option to center the widget vertical and horizontal apart.

Adding GUI_ALIGN_CENTER and GUI_ALIGN_TOP does not work at the moment. (don't sure but it was working awhile ago)

 

At the moment it is a bit dirty work to place a button in a hbox and center it correct.

While WidgetButton::getWidth and WidgetButton::getHight only return 0 there is no way to dynamic calculate the right position!

 

 

Kind Regards

Manuel

 

my understanding is that GUI_ALIGN_TOP implies center alignment

top left is GUI_ALIGN_LEFT|GUI_ALIGN_TOP top right GUI_ALIGN_RIGHT|GUI_ALIGN_TOP

GUI_ALIGN_CENTER is only used when centering in both directions.

Link to comment
×
×
  • Create New...