Set box orientation in theme.

This commit is contained in:
Dave Davenport
2017-05-26 20:23:46 +02:00
parent c23df70aeb
commit b73f938a82
3 changed files with 14 additions and 2 deletions

View File

@@ -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;
}