[gnome-control-center] bluetooth: Center empty states in the panel
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] bluetooth: Center empty states in the panel
- Date: Wed, 12 Jul 2017 00:03:59 +0000 (UTC)
commit 88b6561c8e8130bf0b72b46de303d98fbb5109b4
Author: Miguel Vaello MartÃnez <miguel vaellomartinez gmail com>
Date: Sun Jul 9 15:46:38 2017 +0200
bluetooth: Center empty states in the panel
For the new or alternative version of Control Center, the Bluetooth
empty state will be vertically alligned to the center for any
app window size. Otherwise when the Bluetooh is powered and available,
the align will be as always.
This changes do not affect to the old version because the windows
size (for the old version) is always the same and small
enought to be in the center in any case.
https://bugzilla.gnome.org/show_bug.cgi?id=784720
panels/bluetooth/cc-bluetooth-panel.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/bluetooth/cc-bluetooth-panel.c b/panels/bluetooth/cc-bluetooth-panel.c
index 3e0c3d2..c4c558f 100644
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -133,6 +133,7 @@ power_callback (GObject *object,
static void
cc_bluetooth_panel_update_power (CcBluetoothPanel *self)
{
+ GtkAlign valign;
GObject *toggle;
gboolean sensitive, powered, change_powered;
const char *page;
@@ -141,6 +142,7 @@ cc_bluetooth_panel_update_power (CcBluetoothPanel *self)
self->priv->has_airplane_mode, self->priv->hardware_airplane_mode,
self->priv->bt_airplane_mode, self->priv->airplane_mode);
change_powered = TRUE;
+ valign = GTK_ALIGN_CENTER;
if (self->priv->has_airplane_mode == FALSE) {
g_debug ("No Bluetooth available");
@@ -168,8 +170,10 @@ cc_bluetooth_panel_update_power (CcBluetoothPanel *self)
sensitive = TRUE;
powered = TRUE;
page = BLUETOOTH_WORKING_PAGE;
+ valign = GTK_ALIGN_FILL;
}
+ gtk_widget_set_valign (self->priv->stack, valign);
gtk_widget_set_sensitive (WID ("box_power") , sensitive);
toggle = G_OBJECT (WID ("switch_bluetooth"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]