[dconf-editor] Add large-pathbar.css.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Add large-pathbar.css.
- Date: Wed, 14 Nov 2018 13:47:47 +0000 (UTC)
commit e7ec18b52f62b1eaaa0eb57e7d0a7a46852c333f
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Oct 18 14:04:11 2018 +0200
Add large-pathbar.css.
editor/dconf-editor.css | 141 ++-----------------------------
editor/dconf-editor.gresource.xml | 1 +
editor/large-pathbar.css | 173 ++++++++++++++++++++++++++++++++++++++
editor/meson.build | 1 +
4 files changed, 182 insertions(+), 134 deletions(-)
---
diff --git a/editor/dconf-editor.css b/editor/dconf-editor.css
index c0cd214..2e57d50 100644
--- a/editor/dconf-editor.css
+++ b/editor/dconf-editor.css
@@ -20,6 +20,8 @@
the things could not be solved generically. But don't hesitate to file a bug.
*/
+@import url("large-pathbar.css");
+
/*\
* * bookmarks
\*/
@@ -235,137 +237,6 @@ window:not(.extra-small-window) .keys-list:dir(rtl) > row > .key > grid >
.keys-list > row > .erase.dconf-key.key.delayed label.key-name,
.keys-list > row > .edited.gsettings-key.key label.key-name { font-weight:bold; }
-/*\
-* * pathbar
-\*/
-
-/* evolutions on large window */
- .pathbar {
- /* nautilus/src/resources/css/Adwaita.css:71 .path-bar-box uses 200ms */
- transition: border-color 0.3s,
- background-color 0.3s;
- border-color:transparent;
-
- border-width:1px;
- border-style:solid;
- border-radius:3px;
-
- padding:0;
- margin:6px 0;
-}
-
-.large-window .pathbar {
- /* like in nautilus/src/resources/css/Adwaita.css:75
- .path-bar-box.width-maximized */
- border-color:@borders;
-}
-
-.large-window .pathbar:not(:backdrop) {
- /* like in nautilus/src/resources/css/Adwaita.css:79
- .path-bar-box.width-maximized:not(:backdrop) */
- background-color:@theme_bg_color;
-}
-
-/* root button */
- .pathbar:dir(ltr) > button.root-button { padding-left :0; margin-left :0; }
- .pathbar:dir(rtl) > button.root-button { padding-right:0; margin-right:0; }
-
- .pathbar > button.root-button > label {
- padding-left:3px;
- transition:border-width 0 ease, padding 0 ease;
- background-position:50% center;
- margin-left:0;
- margin-right:0;
- background-image:-gtk-icontheme("ca.desrt.dconf-editor-symbolic");
- background-size:1.1rem;
- background-repeat:no-repeat;
- min-width:1.1rem;
-}
-.large-window .pathbar > button.root-button > label {
- padding-left:5px;
- border-left-width:0;
- background-position:60% center;
-}
-
-/* pathbar internals */
-.pathbar > label {
- opacity:0.55;
-}
-.pathbar:backdrop > label {
- opacity:0.8;
-}
-
-.pathbar > button {
- padding:0 0.1em;
- margin:0 0.1em;
-
- outline-offset:-4px;
-
- border-radius:0;
-
- border:none;
- border-color:transparent;
- box-shadow:none;
- background:none;
- background-color:transparent;
- color:currentColor;
-}
-
-/* underline selected label */
-.pathbar > button > .item {
- border-width:3px 2px;
- border-radius:0;
- padding:2px 4px;
- border-style:solid;
- border-color:transparent;
- transition:border-bottom-color 0.3s,
- padding 0.2s; /* needs to be a bit faster */
-}
-
-.small-window.startup .pathbar > button > .item { /* class remove after 0.3s */
- transition:padding 0;
-}
-
-.small-window .pathbar > button > .item {
- padding:2px 1px;
-}
-
-.pathbar > button:hover > .item {
- border-bottom-color:@borders;
-}
-
-.pathbar > button.active > .item,
-.pathbar > button.active:hover > .item,
-.pathbar > button.active.inexistent > .item,
-.pathbar > button.active.inexistent:hover > .item {
- border-bottom-color:@theme_selected_bg_color;
-}
-
-.pathbar:backdrop > button.active > .item,
-.pathbar:backdrop > button.active:hover > .item,
-.pathbar:backdrop > button.active.inexistent > .item,
-.pathbar:backdrop > button.active.inexistent:hover > .item {
- border-bottom-color:@borders;
-}
-
-/* dashed in config */
-
-.pathbar.config > button.active > .item {
- border-bottom-style:dashed;
-}
-
-/* inexistent items */
-.pathbar > button.inexistent:not(.active) > label.item {
- opacity:0.7;
-}
-.pathbar:backdrop > button.inexistent:not(.active) > label.item {
- opacity:1.0;
-}
-
-.pathbar > button.inexistent:not(.active):hover > label.item {
- border-bottom-color:transparent;
-}
-
/*\
* * lists headers
\*/
@@ -374,9 +245,7 @@ window:not(.extra-small-window) .keys-list:dir(rtl) > row > .key > grid >
.bookmarks > grid > overlay > scrolledwindow > viewport > list > row > grid > label,
.delayed-settings-popover list > row > grid > label,
.delayed-settings-popover list > row > grid > grid > label,
-.modifications-revealer button,
-.titlebar > box > stack > box.pathbar > button,
-.titlebar > box > stack > box.pathbar > label {
+.modifications-revealer button {
transition:all 0 ease;
}
@@ -520,3 +389,7 @@ window:not(.extra-small-window) .keys-list:dir(rtl) > row > .key > grid >
.big-popover {
font-size:144%;
}
+
+/*\
+* * the end
+\*/
diff --git a/editor/dconf-editor.gresource.xml b/editor/dconf-editor.gresource.xml
index a1e0567..66fb826 100644
--- a/editor/dconf-editor.gresource.xml
+++ b/editor/dconf-editor.gresource.xml
@@ -14,6 +14,7 @@
<file preprocess="xml-stripblanks">delayed-setting-view.ui</file>
<file preprocess="xml-stripblanks">folder-list-box-row.ui</file>
<file preprocess="xml-stripblanks">key-list-box-row.ui</file>
+ <file>large-pathbar.css</file>
<file preprocess="xml-stripblanks">large-pathbar.ui</file>
<file preprocess="xml-stripblanks">large-pathbar-item.ui</file>
<file preprocess="xml-stripblanks">modifications-revealer.ui</file>
diff --git a/editor/large-pathbar.css b/editor/large-pathbar.css
new file mode 100644
index 0000000..dfbbd62
--- /dev/null
+++ b/editor/large-pathbar.css
@@ -0,0 +1,173 @@
+/*
+ This file is part of Dconf Editor
+
+ Dconf Editor is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Dconf Editor is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Dconf Editor. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+/*\
+* * main large-window stuff
+\*/
+
+ .pathbar {
+ /* nautilus/src/resources/css/Adwaita.css:71 .path-bar-box uses 200ms */
+ transition: border-color 0.3s,
+ background-color 0.3s;
+ border-color:transparent;
+
+ border-width:1px;
+ border-style:solid;
+ border-radius:3px;
+
+ padding:0;
+ margin:6px 0;
+}
+
+.large-window .pathbar {
+ /* like in nautilus/src/resources/css/Adwaita.css:75
+ .path-bar-box.width-maximized */
+ border-color:@borders;
+}
+
+.large-window .pathbar:not(:backdrop) {
+ /* like in nautilus/src/resources/css/Adwaita.css:79
+ .path-bar-box.width-maximized:not(:backdrop) */
+ background-color:@theme_bg_color;
+}
+
+/*\
+* * items generic init and hacks
+\*/
+
+/* transition hacks */
+box.pathbar > button,
+box.pathbar > label {
+ transition:all 0 ease;
+}
+
+/* button config */
+.pathbar > button {
+ padding:0 0.1em;
+ margin :0 0.1em;
+
+ outline-offset:-4px;
+
+ border-radius:0;
+
+ border:none;
+ border-color:transparent;
+ box-shadow:none;
+ background:none;
+ background-color:transparent;
+ color:currentColor;
+}
+
+/* items hacks */
+.small-window.startup .pathbar > button > label.item { /* class remove after 0.3s */
+ transition:padding 0s;
+}
+
+.small-window .pathbar > button > label.item {
+ padding:2px 1px;
+}
+
+/*\
+* * border bottom
+\*/
+
+.pathbar > button > label.item {
+ border-width:3px 2px;
+ border-radius:0;
+ padding:2px 4px;
+ border-style:solid;
+ border-color:transparent;
+ transition:border-bottom-color 0.3s,
+ padding 0.2s; /* needs to be a bit faster */
+}
+
+.pathbar > button:hover > label.item {
+ border-bottom-color:@borders;
+}
+
+.pathbar > button.active > label.item,
+.pathbar > button.active:hover > label.item,
+.pathbar > button.active.inexistent > label.item,
+.pathbar > button.active.inexistent:hover > label.item {
+ border-bottom-color:@theme_selected_bg_color;
+}
+
+.pathbar:backdrop > button.active > label.item,
+.pathbar:backdrop > button.active:hover > label.item,
+.pathbar:backdrop > button.active.inexistent > label.item,
+.pathbar:backdrop > button.active.inexistent:hover > label.item {
+ border-bottom-color:@borders;
+}
+
+.pathbar > button.inexistent:not(.active):hover > label.item {
+ border-bottom-color:transparent;
+}
+
+.pathbar.config > button.active > label.item {
+ border-bottom-style:dashed;
+}
+
+/*\
+* * root button
+\*/
+
+/* general stuff */
+ .pathbar > button.root-button > label.item {
+ padding-left:3px;
+ transition:border-width 0 ease, padding 0 ease;
+ background-position:50% center;
+ margin-left:0;
+ margin-right:0;
+ background-image:-gtk-icontheme("ca.desrt.dconf-editor-symbolic");
+ background-size:1.1rem;
+ background-repeat:no-repeat;
+ min-width:1.1rem;
+}
+
+.large-window .pathbar > button.root-button > label.item {
+ padding-left:5px;
+ border-left-width:0;
+ background-position:60% center;
+}
+
+/* rtl/ltr specificities */
+.pathbar:dir(ltr) > button.root-button { padding-left :0; margin-left :0; }
+.pathbar:dir(rtl) > button.root-button { padding-right:0; margin-right:0; }
+
+/*\
+* * special texts "colors"
+\*/
+
+/* slash */
+.pathbar > label {
+ opacity:0.55;
+}
+.pathbar:backdrop > label {
+ opacity:0.8;
+}
+
+/* removed paths */
+.pathbar > button.inexistent:not(.active) > label.item {
+ opacity:0.7;
+}
+.pathbar:backdrop > button.inexistent:not(.active) > label.item {
+ opacity:1.0;
+}
+
+/*\
+* * the end
+\*/
diff --git a/editor/meson.build b/editor/meson.build
index 566ce54..d6d81d6 100644
--- a/editor/meson.build
+++ b/editor/meson.build
@@ -112,6 +112,7 @@ resource_data = files(
'help-overlay.ui',
'key-list-box-row.ui',
'large-pathbar-item.ui',
+ 'large-pathbar.css',
'large-pathbar.ui',
'modifications-revealer.ui',
'pathentry.ui',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]