Skip to content

Commit 888f51c

Browse files
committed
Appearance: update dock style
1 parent cf4213c commit 888f51c

6 files changed

Lines changed: 40 additions & 286 deletions

File tree

data/dock-dark.svg

Lines changed: 0 additions & 154 deletions
This file was deleted.

data/dock.svg

Lines changed: 0 additions & 121 deletions
This file was deleted.

data/icons.gresource.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<gresources>
33
<gresource prefix="/io/elementary/settings/desktop">
4-
<file compressed="true">dock.svg</file>
5-
<file compressed="true">dock-dark.svg</file>
64
<file compressed="true">notify-center.svg</file>
75
<file compressed="true">notify-center-dark.svg</file>
86
<file compressed="true">plug.css</file>

data/plug.css

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,53 @@ settingspage.wallpaper actionbar box.start {
9595
}
9696

9797
.appearance-view desktop-preview .shell {
98-
background-image:
99-
url("resource:///io/elementary/settings/desktop/notify-center.svg"),
100-
url("resource:///io/elementary/settings/desktop/dock.svg");
98+
background-image: url("resource:///io/elementary/settings/desktop/notify-center.svg");
10199
background-repeat: no-repeat;
102-
background-size: 40px 55px, 54px 12px;
103-
background-position: calc(100% - 3px) 3px, calc(50% + 0.5px) bottom;
100+
background-size: 40px 55px;
101+
background-position: calc(100% - 3px) 3px;
104102
transition: all 300ms ease-in-out;
105103
}
106104

107105
.appearance-view desktop-preview box:dir(rtl) {
108-
background-position: 3px 3px, calc(50% + 0.5px) bottom;
106+
background-position: 3px 3px;
109107
}
110108

111109
.appearance-view desktop-preview.dark .shell {
112-
background-image:
113-
url("resource:///io/elementary/settings/desktop/notify-center-dark.svg"),
114-
url("resource:///io/elementary/settings/desktop/dock-dark.svg");
110+
background-image: url("resource:///io/elementary/settings/desktop/notify-center-dark.svg");
115111
}
116112

117113
.appearance-view desktop-preview.dim .shell {
118114
background-color: alpha(black, 0.3);
119115
}
120116

117+
.appearance-view desktop-preview .dock {
118+
border-radius: 2px;
119+
min-height: 0.6em;
120+
min-width: 5em;
121+
background: alpha(#fafafa, 0.6);
122+
box-shadow:
123+
inset 0 -1px 0 0 alpha(white, 0.1),
124+
inset 0 1px 0 0 alpha(white, 0.15),
125+
inset 1px 0 0 0 alpha(white, 0.035),
126+
inset -1px 0 0 0 alpha(white, 0.035),
127+
0 0 0 1px alpha(black, 0.1),
128+
0 1px 3px alpha(black, 0.10),
129+
0 3px 9px alpha(black, 0.15);
130+
margin: 0.25em;
131+
}
132+
133+
.appearance-view desktop-preview.dark .dock {
134+
background: alpha(#444, 0.6);
135+
box-shadow:
136+
inset 0 -1px 0 0 alpha(white, 0.05),
137+
inset 0 1px 0 0 alpha(white, 0.07),
138+
inset 1px 0 0 0 alpha(white, 0.0175),
139+
inset -1px 0 0 0 alpha(white, 0.0175),
140+
0 0 0 1px alpha(black, 0.7),
141+
0 1px 2px alpha(black, 0.1),
142+
0 2px 4px alpha(black, 0.3);
143+
}
144+
121145
.appearance-view desktop-preview .window {
122146
border-radius: 0.25em;
123147
min-height: 32px;

data/screenshot-appearance.png

-10.1 KB
Loading

src/Views/Appearance.vala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,12 @@ public class PantheonShell.Appearance : Switchboard.SettingsPage {
412412
content_fit = COVER
413413
};
414414

415+
var dock = new Gtk.Box (HORIZONTAL, 0) {
416+
halign = CENTER,
417+
valign = END
418+
};
419+
dock.add_css_class ("dock");
420+
415421
var window_back = new Gtk.Box (HORIZONTAL, 0) {
416422
halign = CENTER,
417423
valign = CENTER
@@ -434,6 +440,7 @@ public class PantheonShell.Appearance : Switchboard.SettingsPage {
434440
overflow = HIDDEN
435441
};
436442
overlay.add_overlay (shell);
443+
overlay.add_overlay (dock);
437444
overlay.add_overlay (window_back);
438445
overlay.add_overlay (window_front);
439446
overlay.add_css_class (Granite.STYLE_CLASS_CARD);

0 commit comments

Comments
 (0)