[polari] ui: Replace removed hpadding/vpadding properties
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] ui: Replace removed hpadding/vpadding properties
- Date: Fri, 6 Sep 2013 15:05:27 +0000 (UTC)
commit 806998ef63e082fd19d4209029a9a7c650b4d1f6
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Sep 5 15:20:46 2013 +0200
ui: Replace removed hpadding/vpadding properties
GtkHeaderBar from GTK+ master no longer supports the hpadding/vpadding
properties, so replace their use with some CSS.
data/resources/application.css | 8 ++++++++
data/resources/main-window.ui | 20 ++++++--------------
2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index 863f973..fededdb 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -73,6 +73,14 @@
padding: 6px;
}
+.polari-titlebar-left {
+ /* the horizontal padding confuses left_side_size_group, so we
+ add it as margin-left to the first button instead (in mainWindow.ui);
+ also set the bottom padding to 0 so the separator extends to the
+ bottom */
+ padding: 6px 1px 0;
+}
+
.polari-titlebar-separator {
border-image: linear-gradient(to bottom, @theme_bg_color, shade(@borders, 1.2));
border-image-width: 0 1px 0 0;
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index 27d003f..f06946d 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -29,20 +29,17 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
- <!-- set vpadding to 0 so the separator label extends to the bottom;
- other elements are not are center-aligned, so with the other
- headerbar's (default) vpadding, they end up just right -->
- <property name="vpadding">0</property>
- <!-- the hpadding property confuses left_side_size_group, so we
- add it as margin-left to the first button instead -->
- <property name="hpadding">0</property>
+ <style>
+ <class name="polari-titlebar-left"/>
+ </style>
<child>
<object class="GtkMenuButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
- <property name="margin-left">6</property>
+ <property name="margin-left">5</property>
+ <property name="margin-right">5</property>
<property name="menu_model">join_menu</property>
<property name="action_name">app.room-menu</property>
<style>
@@ -103,13 +100,8 @@
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="show_close_button">True</property>
- <!-- 6 should be the default value, but we set it explicitly
- to make sure it matches the value used in the left group
- (where we move the padding to the first element instead to
- not confuse the size group, see comment for titlebar_left -->
- <property name="hpadding">6</property>
<style>
- <class name="polari-titlebar"/>
+ <class name="polari-titlebar-right"/>
</style>
<child>
<object class="GtkLabel" id="label1">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]