styling
This commit is contained in:
parent
26cdc8f0cc
commit
594b085c83
4 changed files with 25 additions and 20 deletions
|
|
@ -34,8 +34,11 @@ impl DockItem {
|
||||||
let self_: DockItem = glib::Object::new(&[]).expect("Failed to create DockItem");
|
let self_: DockItem = glib::Object::new(&[]).expect("Failed to create DockItem");
|
||||||
|
|
||||||
let item_box = Box::new(Orientation::Vertical, 0);
|
let item_box = Box::new(Orientation::Vertical, 0);
|
||||||
self_.set_child(Some(&item_box));
|
cascade! {
|
||||||
self_.add_css_class("dock_item");
|
&self_;
|
||||||
|
..set_child(Some(&item_box));
|
||||||
|
..add_css_class("dock_item");
|
||||||
|
};
|
||||||
|
|
||||||
let image = cascade! {
|
let image = cascade! {
|
||||||
Image::new();
|
Image::new();
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,12 @@ impl DockPopover {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_layout(&self) {
|
pub fn update_layout(&self) {
|
||||||
|
self.reset_menu();
|
||||||
|
|
||||||
|
// build menu
|
||||||
let imp = imp::DockPopover::from_instance(&self);
|
let imp = imp::DockPopover::from_instance(&self);
|
||||||
let dock_object = imp.dock_object.borrow();
|
let dock_object = imp.dock_object.borrow();
|
||||||
let menu_handle = imp.menu_handle.borrow();
|
let menu_handle = imp.menu_handle.borrow();
|
||||||
// build menu
|
|
||||||
if let Some(dock_object) = dock_object.as_ref() {
|
if let Some(dock_object) = dock_object.as_ref() {
|
||||||
cascade! {
|
cascade! {
|
||||||
&self;
|
&self;
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,39 @@
|
||||||
listview.docklist {
|
listview.docklist {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: #333333;
|
background: transparent;
|
||||||
|
transition: 100ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
listview.docklist row:hover {
|
listview.docklist row:hover {
|
||||||
transition: 100ms;
|
background: #888888CC;
|
||||||
background: #888888;
|
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
listview.docklist row {
|
listview.docklist row {
|
||||||
background: #333333;
|
transition: 100ms;
|
||||||
|
background: transparent;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.dock_item:hover {
|
button:hover {
|
||||||
transition: 300ms;
|
transition: 300ms;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
background: #888888;
|
background: #888888CC;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.dock_item {
|
button {
|
||||||
transition: 300ms;
|
transition: 300ms;
|
||||||
background: #333333;
|
background: transparent;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
list {
|
list {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: #333333;
|
background: #333333CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
label.window_title {
|
label.window_title {
|
||||||
|
|
@ -41,20 +42,17 @@ label.window_title {
|
||||||
}
|
}
|
||||||
|
|
||||||
popover contents {
|
popover contents {
|
||||||
border-radius: 12px;
|
border-width: 0px;
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
popover contents {
|
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
background: #333333CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
box.dock {
|
box.dock {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: #333333;
|
background: #333333CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.root_window {
|
window.root_window {
|
||||||
background: rgba(50, 50, 50, 0.0);
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
use cascade::cascade;
|
use cascade::cascade;
|
||||||
use gdk4::Rectangle;
|
use gdk4::Rectangle;
|
||||||
|
use gdk4::Snapshot;
|
||||||
use gdk4_x11::X11Display;
|
use gdk4_x11::X11Display;
|
||||||
use gdk4_x11::X11Surface;
|
use gdk4_x11::X11Surface;
|
||||||
use glib::Object;
|
use glib::Object;
|
||||||
use glib::Type;
|
use glib::Type;
|
||||||
|
use gsk::BlurNode;
|
||||||
use gtk4::prelude::*;
|
use gtk4::prelude::*;
|
||||||
use gtk4::subclass::prelude::*;
|
use gtk4::subclass::prelude::*;
|
||||||
use gtk4::Align;
|
use gtk4::Align;
|
||||||
|
|
@ -15,7 +17,7 @@ use gtk4::Orientation;
|
||||||
use gtk4::Revealer;
|
use gtk4::Revealer;
|
||||||
use gtk4::RevealerTransitionType;
|
use gtk4::RevealerTransitionType;
|
||||||
use gtk4::Separator;
|
use gtk4::Separator;
|
||||||
use gtk4::{gio, glib};
|
use gtk4::{gio, glib, gsk};
|
||||||
use x11rb::connection::Connection;
|
use x11rb::connection::Connection;
|
||||||
use x11rb::protocol::xproto;
|
use x11rb::protocol::xproto;
|
||||||
use x11rb::protocol::xproto::ConnectionExt;
|
use x11rb::protocol::xproto::ConnectionExt;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue