1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-03 04:23:42 -05:00

[Theme] Allow default enabled state of widget to be set in theme

This commit is contained in:
Dave Davenport 2017-04-18 08:47:48 +02:00
parent 8c11b48532
commit 4157b5d825
5 changed files with 5 additions and 5 deletions

View file

@ -325,7 +325,7 @@ box * box_create ( const char *name, boxType type )
b->widget.clicked = box_clicked;
b->widget.motion_notify = box_motion_notify;
b->widget.get_desired_height = box_get_desired_height;
b->widget.enabled = TRUE;
b->widget.enabled = rofi_theme_get_boolean ( WIDGET ( b ), "enabled", TRUE );
b->spacing = rofi_theme_get_distance ( WIDGET ( b ), "spacing", DEFAULT_SPACING );
return b;

View file

@ -123,7 +123,7 @@ container * container_create ( const char *name )
b->widget.clicked = container_clicked;
b->widget.motion_notify = container_motion_notify;
b->widget.get_desired_height = container_get_desired_height;
b->widget.enabled = TRUE;
b->widget.enabled = rofi_theme_get_boolean ( WIDGET ( b ), "enabled", TRUE );
return b;
}

View file

@ -370,7 +370,7 @@ listview *listview_create ( const char *name, listview_update_callback cb, void
lv->widget.clicked = listview_clicked;
lv->widget.motion_notify = listview_motion_notify;
lv->widget.get_desired_height = listview_get_desired_height;
lv->widget.enabled = TRUE;
lv->widget.enabled = rofi_theme_get_boolean ( WIDGET ( lv ), "enabled", TRUE );
lv->eh = eh;
char *n = g_strjoin ( ".", lv->listview_name, "scrollbar", NULL );

View file

@ -66,7 +66,7 @@ scrollbar *scrollbar_create ( const char *name )
sb->pos_length = 4;
// Enabled by default
sb->widget.enabled = TRUE;
sb->widget.enabled = rofi_theme_get_boolean ( WIDGET ( sb ), "enabled", TRUE );
return sb;
}

View file

@ -165,7 +165,7 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, TextBoxFontType
}
// Enabled by default
tb->widget.enabled = TRUE;
tb->widget.enabled = rofi_theme_get_boolean ( WIDGET ( tb ), "enabled", TRUE );
return tb;
}