mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Allow theme to override width on box.
This commit is contained in:
parent
ddfdf66d7e
commit
f041313efb
1 changed files with 8 additions and 0 deletions
|
@ -55,6 +55,14 @@ static int box_get_desired_width ( widget *wid )
|
|||
box *b = (box *) wid;
|
||||
int spacing = distance_get_pixel ( b->spacing, b->type );
|
||||
int width = 0;
|
||||
|
||||
// Allow user to override.
|
||||
RofiDistance w = rofi_theme_get_distance ( wid, "width", 0 );
|
||||
width = distance_get_pixel ( w, ROFI_ORIENTATION_HORIZONTAL );
|
||||
if ( width > 0 ) {
|
||||
return width ;
|
||||
}
|
||||
|
||||
if ( b->type == ROFI_ORIENTATION_HORIZONTAL ) {
|
||||
int active_widgets = 0;
|
||||
for ( GList *iter = g_list_first ( b->children ); iter != NULL; iter = g_list_next ( iter ) ) {
|
||||
|
|
Loading…
Reference in a new issue