Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles: make dock more subtle #220

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
@@ -3,6 +3,20 @@
* SPDX-FileCopyrightText: 2023 elementary, Inc. (https://elementary.io)
*/

dock {
background: alpha(@bg_color, 0.6);
border-radius: 9px;
box-shadow:
inset 0 -1px 0 0 alpha(@highlight_color, 0.1),
inset 0 1px 0 0 alpha(@highlight_color, 0.15),
inset 1px 0 0 0 alpha(@highlight_color, 0.035),
inset -1px 0 0 0 alpha(@highlight_color, 0.035),
0 0 0 1px alpha(@borders, 0.4),
0 1px 3px alpha(black, 0.10),
0 3px 9px alpha(black, 0.15);
margin: 0 12px 12px 12px;
}

launcher {
padding: 6px;
}
17 changes: 0 additions & 17 deletions data/MainWindow.css

This file was deleted.

1 change: 0 additions & 1 deletion data/dock.gresource.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
<gresources>
<gresource prefix="/io/elementary/dock">
<file compressed="true">Application.css</file>
<file compressed="true">MainWindow.css</file>
<file compressed="true">poof.svg</file>
</gresource>
</gresources>
17 changes: 2 additions & 15 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
@@ -4,30 +4,17 @@
*/

public class Dock.MainWindow : Gtk.ApplicationWindow {
private static Gtk.CssProvider css_provider;

class construct {
set_css_name ("dock");
}

static construct {
css_provider = new Gtk.CssProvider ();
css_provider.load_from_resource ("/io/elementary/dock/MainWindow.css");
}

construct {
get_style_context ().add_provider (css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);

var launcher_manager = LauncherManager.get_default ();

var empty_title = new Gtk.Label ("") {
visible = false
};

child = launcher_manager;
overflow = Gtk.Overflow.VISIBLE;
overflow = VISIBLE;
resizable = false;
set_titlebar (empty_title);
titlebar = new Gtk.Label ("") { visible = false };

// Fixes DnD reordering of launchers failing on a very small line between two launchers
var drop_target_launcher = new Gtk.DropTarget (typeof (Launcher), MOVE);