[gnome-control-center] screen: Fix resulting top-padding
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] screen: Fix resulting top-padding
- Date: Thu, 8 Sep 2011 16:04:06 +0000 (UTC)
commit 181b313ba8c9ec3f1226e6c62fd1bb5697e09058
Author: Bastien Nocera <hadess hadess net>
Date: Thu Sep 8 16:55:21 2011 +0100
screen: Fix resulting top-padding
When hiding the brightness bar, don't leave unsightly bits of
frame lying around.
https://bugzilla.gnome.org/show_bug.cgi?id=657606
panels/screen/cc-screen-panel.c | 4 +-
panels/screen/screen.ui | 122 +++++++++++++++++++++++++--------------
2 files changed, 80 insertions(+), 46 deletions(-)
---
diff --git a/panels/screen/cc-screen-panel.c b/panels/screen/cc-screen-panel.c
index f5c1d11..1a250c4 100644
--- a/panels/screen/cc-screen-panel.c
+++ b/panels/screen/cc-screen-panel.c
@@ -253,9 +253,7 @@ get_brightness_cb (GObject *source_object, GAsyncResult *res, gpointer user_data
{
gtk_widget_hide (WID ("screen_brightness_hscale"));
gtk_widget_hide (WID ("screen_auto_reduce_checkbutton"));
- /* FIXME: This needs a proper fix:
- * https://bugzilla.gnome.org/show_bug.cgi?id=657606 */
- gtk_label_set_text (GTK_LABEL (WID ("brightness-section-heading")), "");
+ gtk_widget_hide (WID ("brightness-frame"));
g_warning ("Error getting brightness: %s", error->message);
g_error_free (error);
return;
diff --git a/panels/screen/screen.ui b/panels/screen/screen.ui
index a674d10..629d7b3 100644
--- a/panels/screen/screen.ui
+++ b/panels/screen/screen.ui
@@ -98,7 +98,7 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkFrame" id="brightness-frame">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
@@ -120,63 +120,31 @@
<property name="draw_value">False</property>
<property name="value_pos">bottom</property>
<accessibility>
- <relation target="brightness-section-heading" type="labelled-by"/>
+ <relation type="labelled-by" target="brightness-section-heading"/>
</accessibility>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="screen_auto_reduce_checkbutton">
<property name="label" translatable="yes">_Dim screen to save power</property>
- <property name="use_underline">True</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkHBox" id="hbox9">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="turn_off_after_label">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Turn off after:</property>
- <property name="mnemonic_widget">screen_brightness_combobox</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="screen_brightness_combobox">
- <property name="visible">True</property>
- <property name="model">screen_brightness_liststore</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
</child>
</object>
@@ -184,6 +152,7 @@
<child type="label">
<object class="GtkLabel" id="brightness-section-heading">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Brightness</property>
<property name="use_markup">True</property>
<attributes>
@@ -194,38 +163,89 @@
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="turn_off_after_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Turn off after:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">screen_brightness_combobox</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="screen_brightness_combobox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">screen_brightness_liststore</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="screen_lock_main_box">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkSwitch" id="screen_lock_on_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
<accessibility>
- <relation target="lock-section-heading" type="labelled-by"/>
+ <relation type="labelled-by" target="lock-section-heading"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -239,10 +259,12 @@
<child>
<object class="GtkHBox" id="screen_lock_hbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="lock_screen_after_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Lock screen after:</property>
<property name="use_underline">True</property>
@@ -274,6 +296,7 @@
</child>
<child>
<object class="GtkHBox" id="hbox2">
+ <property name="can_focus">False</property>
<property name="no_show_all">True</property>
<child>
<object class="GtkCheckButton" id="screen_lock_not_home_checkbutton">
@@ -281,9 +304,13 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -293,17 +320,22 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="use_action_appearance">False</property>
<property name="relief">none</property>
<property name="image_position">right</property>
<property name="uri">http://glade.gnome.org</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@@ -314,6 +346,7 @@
<child type="label">
<object class="GtkLabel" id="lock-section-heading">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Lock</property>
<property name="use_markup">True</property>
<attributes>
@@ -324,11 +357,14 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="position">1</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]