feat: use libcosmic::init
This commit is contained in:
parent
a96decd24b
commit
98813824d4
37 changed files with 396 additions and 295 deletions
|
|
@ -8,6 +8,7 @@ edition = "2021"
|
|||
[dependencies]
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs", features = ["v4_2"] }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false }
|
||||
libcosmic-applet = { path = "../../libcosmic-applet" }
|
||||
once_cell = "1.9.0"
|
||||
relm4-macros = { git = "https://github.com/Relm4/Relm4.git", branch = "next" }
|
||||
|
|
|
|||
|
|
@ -41,9 +41,8 @@ fn row_clicked(_: &ListBox, row: &ListBoxRow) {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
let _ = libcosmic::init();
|
||||
|
||||
let provider = gtk4::CssProvider::new();
|
||||
provider.load_from_data(include_bytes!("style.css"));
|
||||
gtk4::StyleContext::add_provider_for_display(
|
||||
|
|
@ -63,7 +62,7 @@ fn main() {
|
|||
set_title: Some("COSMIC Graphics Applet"),
|
||||
#[wrap(Some)]
|
||||
set_child = &libcosmic_applet::AppletButton {
|
||||
set_button_icon_name: "input-gaming",
|
||||
set_button_icon_name: "input-gaming-symbolic",
|
||||
#[wrap(Some)]
|
||||
set_popover_child: main_overlay = &Overlay {
|
||||
add_overlay: loading_box = >k4::Box {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue