power: Hide the icon of the battery row when unused
This gives more room to the label.
This commit is contained in:
parent
a75a0f0384
commit
97ba14e002
1 changed files with 7 additions and 2 deletions
|
@ -275,7 +275,12 @@ cc_battery_row_new (UpDevice *device,
|
||||||
|
|
||||||
/* Icon */
|
/* Icon */
|
||||||
if (is_kind_battery && icon_name != NULL && icon_name[0] != '\0')
|
if (is_kind_battery && icon_name != NULL && icon_name[0] != '\0')
|
||||||
|
{
|
||||||
gtk_image_set_from_icon_name (self->icon, icon_name, GTK_ICON_SIZE_BUTTON);
|
gtk_image_set_from_icon_name (self->icon, icon_name, GTK_ICON_SIZE_BUTTON);
|
||||||
|
gtk_widget_show (GTK_WIDGET (self->icon));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gtk_widget_hide (GTK_WIDGET (self->icon));
|
||||||
|
|
||||||
/* Percentage label */
|
/* Percentage label */
|
||||||
if (battery_level == UP_DEVICE_LEVEL_NONE)
|
if (battery_level == UP_DEVICE_LEVEL_NONE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue