[geary/wip/geary-inspector: 2/10] Make generic account editor ListBoxRow style reusable elsewhere
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/geary-inspector: 2/10] Make generic account editor ListBoxRow style reusable elsewhere
- Date: Sun, 7 Apr 2019 01:30:39 +0000 (UTC)
commit cf33d88931bf5645d06ca006085a0b0800a9fb22
Author: Michael Gratton <mike vee net>
Date: Fri Apr 5 23:34:08 2019 +1100
Make generic account editor ListBoxRow style reusable elsewhere
src/client/accounts/accounts-editor-row.vala | 1 +
ui/geary.css | 76 ++++++++++++++--------------
2 files changed, 40 insertions(+), 37 deletions(-)
---
diff --git a/src/client/accounts/accounts-editor-row.vala b/src/client/accounts/accounts-editor-row.vala
index 0906bbbd..211ce277 100644
--- a/src/client/accounts/accounts-editor-row.vala
+++ b/src/client/accounts/accounts-editor-row.vala
@@ -27,6 +27,7 @@ internal class Accounts.EditorRow<PaneType> : Gtk.ListBoxRow {
public EditorRow() {
get_style_context().add_class("geary-settings");
+ get_style_context().add_class("geary-labelled-row");
this.layout.orientation = Gtk.Orientation.HORIZONTAL;
this.layout.show();
diff --git a/ui/geary.css b/ui/geary.css
index b1bd0031..6057afd1 100644
--- a/ui/geary.css
+++ b/ui/geary.css
@@ -191,6 +191,45 @@ grid.geary-message-summary {
font-weight: bold;
}
+/* GtkListboxRows with padded labels */
+
+row.geary-labelled-row {
+ padding: 0px;
+}
+
+row.geary-labelled-row > grid > * {
+ margin: 18px 6px;
+}
+
+row.geary-labelled-row > grid > *:first-child:dir(ltr),
+row.geary-labelled-row > grid > *:last-child:dir(rtl) {
+ margin-left: 18px;
+}
+
+row.geary-labelled-row > grid > *:last-child:dir(ltr),
+row.geary-labelled-row > grid > *:first-child:dir(rtl) {
+ margin-right: 18px;
+}
+
+/* Images should have some padding to offset them from adjacent
+widgets, but care ust be taken since images are also used as children
+of other widgets like entries, comboboxes and switches, and these
+shouldn't be be touched. */
+row.geary-labelled-row widget > image,
+row.geary-labelled-row grid > image {
+ padding: 0px 6px;
+}
+
+row.geary-labelled-row > grid > combobox,
+row.geary-labelled-row > grid > entry,
+row.geary-labelled-row:not(.geary-add-row) > grid > image,
+row.geary-labelled-row > grid > switch {
+ /* These use more space than labels, so set their valign to center
+ when adding them and free up some space around them here to keep a
+ consistent row height. */
+ margin: 0 12px;
+}
+
/* Accounts.Editor */
grid.geary-accounts-editor-pane-content {
@@ -214,10 +253,6 @@ label.geary-settings-heading {
margin-bottom: 12px;
}
-row.geary-settings {
- padding: 0px;
-}
-
row.geary-settings entry {
border-width: 0px;
background-color: transparent;
@@ -233,20 +268,6 @@ row.geary-settings.geary-drag-icon {
border: 1px solid @borders;
}
-row.geary-settings > grid > * {
- margin: 18px 6px;
-}
-
-row.geary-settings > grid > *:first-child:dir(ltr),
-row.geary-settings > grid > *:last-child:dir(rtl) {
- margin-left: 18px;
-}
-
-row.geary-settings > grid > *:last-child:dir(ltr),
-row.geary-settings > grid > *:first-child:dir(rtl) {
- margin-right: 18px;
-}
-
/* dir pseudo-class used here for required additional specificity */
row.geary-settings > grid > grid.geary-drag-handle:dir(ltr),
row.geary-settings > grid > grid.geary-drag-handle:dir(rtl) {
@@ -267,25 +288,6 @@ frame.geary-settings.geary-signature {
min-height: 5em;
}
-/* Images should have some padding to offset them from adjacent
-widgets, but care ust be taken since images are also used as children
-of other widgets like entries, comboboxes and switches, and these
-shouldn't be be touched. */
-row.geary-settings widget > image,
-row.geary-settings grid > image {
- padding: 0px 6px;
-}
-
-row.geary-settings > grid > combobox,
-row.geary-settings > grid > entry,
-row.geary-settings:not(.geary-add-row) > grid > image,
-row.geary-settings > grid > switch {
- /* These use more space than labels, so set their valign to center
- when adding them and free up some space around them here to keep a
- consistent row height. */
- margin: 0 12px;
-}
-
buttonbox.geary-settings {
margin-top: 36px;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]