[polari] css: Use a regular separator in titlebar
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] css: Use a regular separator in titlebar
- Date: Tue, 5 Jul 2016 16:29:27 +0000 (UTC)
commit ccdf6b33fd6db9dcdbbfc082319e752290ef209b
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jul 5 16:41:32 2016 +0200
css: Use a regular separator in titlebar
The current style copies the separator style from an old Adwaita
version. Just use a normal separator and let the theme do its job.
data/resources/application.css | 24 +++++-------------------
data/resources/main-window.ui | 19 ++++++-------------
2 files changed, 11 insertions(+), 32 deletions(-)
---
diff --git a/data/resources/application.css b/data/resources/application.css
index 2ce89b2..7a11efd 100644
--- a/data/resources/application.css
+++ b/data/resources/application.css
@@ -102,25 +102,11 @@
padding: 6px;
}
-.titlebar headerbar:dir(ltr):first-child,
-.titlebar headerbar:dir(rtl):last-child {
- /* 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 vertical padding to 0 so the separator extends to the
- bottom */
- padding: 0 1px;
-}
-
-.polari-titlebar-separator {
- border-image: linear-gradient(to bottom, @theme_bg_color, shade(@borders, 1.2));
- border-image-width: 0 1px 0 0;
- border-image-slice: 1;
-}
-
-.polari-titlebar-separator:backdrop {
- border-image: none;
- border-color: transparent;
-}
+/* Hack: Move separator by 1px so that it aligns with the sidebar */
+.titlebar > separator:dir(ltr) { margin-left: -1px; }
+.titlebar > headerbar:first-child:dir(ltr) { margin-right: 1px; }
+.titlebar > separator:dir(rtl) { margin-right: -1px; }
+.titlebar > headerbar:first-child:dir(rtl) { margin-left: 1px; }
.polari-user-list-button {
padding: 0px 4px;
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index 78a38b5..9a6fbdf 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -25,8 +25,6 @@
<property name="visible">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
- <property name="margin-start">5</property>
- <property name="margin-end">5</property>
<property name="action_name">app.show-join-dialog</property>
<style>
<class name="image-button"/>
@@ -49,17 +47,12 @@
<property name="pack-type">start</property>
</packing>
</child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <style>
- <class name="polari-titlebar-separator"/>
- </style>
- </object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
- </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparator">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]