Use libcomsic-applet in status-area, network, graphics
This commit is contained in:
parent
aac43de65d
commit
765e3af815
13 changed files with 154 additions and 330 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use cascade::cascade;
|
||||
use gtk4::{glib, prelude::*};
|
||||
|
||||
mod dbus_service;
|
||||
|
|
@ -14,24 +15,12 @@ fn main() {
|
|||
// XXX Implement DBus service somewhere other than applet?
|
||||
glib::MainContext::default().spawn_local(status_notifier_watcher::start());
|
||||
|
||||
let provider = gtk4::CssProvider::new();
|
||||
provider.load_from_data(include_bytes!("style.css"));
|
||||
gtk4::StyleContext::add_provider_for_display(
|
||||
>k4::gdk::Display::default().expect("Could not connect to a display."),
|
||||
&provider,
|
||||
gtk4::STYLE_PROVIDER_PRIORITY_APPLICATION,
|
||||
);
|
||||
|
||||
let status_area = StatusArea::new();
|
||||
gtk4::Window::builder()
|
||||
.decorated(false)
|
||||
.child(&status_area)
|
||||
.resizable(false)
|
||||
.width_request(1)
|
||||
.height_request(1)
|
||||
.css_classes(vec!["root_window".to_string()])
|
||||
.build()
|
||||
.show();
|
||||
cascade! {
|
||||
libcosmic_applet::AppletWindow::new();
|
||||
..set_child(Some(&status_area));
|
||||
..show();
|
||||
};
|
||||
|
||||
let main_loop = glib::MainLoop::new(None, false);
|
||||
main_loop.run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue