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 */
|
||||
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 */
|
||||
if (battery_level == UP_DEVICE_LEVEL_NONE)
|
||||
|
@ -347,4 +352,4 @@ UpDeviceKind
|
|||
cc_battery_row_get_kind (CcBatteryRow *self)
|
||||
{
|
||||
return self->kind;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue