Set box orientation in theme.
This commit is contained in:
@@ -169,6 +169,16 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, TextBoxFontType
|
||||
tb->yalign = MAX ( 0, MIN ( 1.0, tb->yalign));
|
||||
// Enabled by default
|
||||
tb->widget.enabled = rofi_theme_get_boolean ( WIDGET ( tb ), "enabled", TRUE );
|
||||
|
||||
Distance w = rofi_theme_get_distance ( WIDGET ( tb ), "width", 0 );
|
||||
int wi = distance_get_pixel ( w, ORIENTATION_HORIZONTAL );
|
||||
if ( wi > 0 )
|
||||
{
|
||||
printf("set width: %d\n", wi);
|
||||
tb->widget.w = wi;
|
||||
textbox_moveresize ( tb, tb->widget.x, tb->widget.y, tb->widget.w, tb->widget.h );
|
||||
}
|
||||
|
||||
return tb;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user