feat: init adwaita
This commit is contained in:
parent
d03966ae42
commit
d9212b2285
23 changed files with 85 additions and 10 deletions
|
|
@ -9,6 +9,7 @@ cosmic-panel-config = {git = "https://github.com/pop-os/cosmic-panel", features
|
|||
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", default-features = false, features = ["client"] }
|
||||
cascade = "1.0.0"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs", features = ["v4_4"] }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
gio = { git = "https://github.com/gtk-rs/gtk-rs-core" }
|
||||
libcosmic = { git = "https://github.com/pop-os/libcosmic", branch = "relm4-next" }
|
||||
relm4-macros = { git = "https://github.com/Relm4/Relm4.git", branch = "next" }
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ fn load_css() {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
// Initialize logger
|
||||
pretty_env_logger::init();
|
||||
glib::set_application_name("Cosmic Dock App List");
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ relm4 = { git = "https://github.com/relm4/relm4", branch = "next", features = ["
|
|||
relm4-macros = { git = "https://github.com/relm4/relm4", branch = "next" }
|
||||
once_cell = "1.10.0"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs", features = ["v4_2"] }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
async-io = "1.6.0"
|
||||
|
||||
[features]
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ use tokio::runtime::Runtime;
|
|||
static RT: Lazy<Runtime> = Lazy::new(|| Runtime::new().expect("failed to build tokio runtime"));
|
||||
|
||||
fn main() {
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
let application = Application::new(
|
||||
None,
|
||||
ApplicationFlags::default(),
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ edition = "2021"
|
|||
[dependencies]
|
||||
futures = "0.3"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs" }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
libcosmic-applet = { path = "../../libcosmic-applet" }
|
||||
relm4 = { git = "https://github.com/relm4/relm4", branch = "next", features = ["macros"] }
|
||||
zbus = { version = "2", no-default-features = true }
|
||||
|
|
|
|||
|
|
@ -357,6 +357,9 @@ impl SimpleComponent for AppModel {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
let app = RelmApp::with_app(Application::new(
|
||||
None,
|
||||
ApplicationFlags::default(),
|
||||
|
|
|
|||
|
|
@ -7,6 +7,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-applet = { path = "../../libcosmic-applet" }
|
||||
once_cell = "1.9.0"
|
||||
relm4-macros = { git = "https://github.com/Relm4/Relm4.git", branch = "next" }
|
||||
|
|
|
|||
|
|
@ -41,8 +41,9 @@ fn row_clicked(_: &ListBox, row: &ListBoxRow) {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
gtk4::init().unwrap();
|
||||
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
let provider = gtk4::CssProvider::new();
|
||||
provider.load_from_data(include_bytes!("style.css"));
|
||||
gtk4::StyleContext::add_provider_for_display(
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ license = "GPL-3.0-or-later"
|
|||
cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings" }
|
||||
futures-util = "0.3.21"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs" }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
itertools = "0.10.3"
|
||||
once_cell = "1.9.0"
|
||||
relm4-macros = { git = "https://github.com/Relm4/Relm4.git", branch = "next" }
|
||||
|
|
|
|||
|
|
@ -14,8 +14,9 @@ use tokio::runtime::Runtime;
|
|||
static RT: Lazy<Runtime> = Lazy::new(|| Runtime::new().expect("failed to build tokio runtime"));
|
||||
|
||||
fn main() {
|
||||
gtk4::init().unwrap();
|
||||
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
view! {
|
||||
window = libcosmic_applet::AppletWindow {
|
||||
set_title: Some("COSMIC Network Applet"),
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ license = "GPL-3.0-or-later"
|
|||
cascade = "1"
|
||||
futures = "0.3"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs" }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
libcosmic-applet = { path = "../../libcosmic-applet" }
|
||||
once_cell = "1.12"
|
||||
relm4-macros = { git = "https://github.com/Relm4/Relm4.git", branch = "next" }
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ mod notifications;
|
|||
use notifications::Notifications;
|
||||
|
||||
fn main() {
|
||||
gtk4::init().unwrap();
|
||||
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
// XXX Implement DBus service somewhere other than applet?
|
||||
let notifications = Notifications::new();
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ license = "GPL-3.0-or-later"
|
|||
[dependencies]
|
||||
futures-util = "0.3.21"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs" }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
libcosmic-applet = { path = "../../libcosmic-applet" }
|
||||
logind-zbus = "3.0.1"
|
||||
nix = "0.24.1"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ use tokio::runtime::Runtime;
|
|||
static RT: Lazy<Runtime> = Lazy::new(|| Runtime::new().expect("failed to build tokio runtime"));
|
||||
|
||||
fn main() {
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
let application = gtk4::Application::new(
|
||||
None,
|
||||
ApplicationFlags::default(),
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ license = "GPL-3.0-or-later"
|
|||
cascade = "1"
|
||||
futures = "0.3"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs" }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
libcosmic-applet = { path = "../../libcosmic-applet" }
|
||||
once_cell = "1.12"
|
||||
serde = "1"
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ mod status_notifier_watcher;
|
|||
use status_area::StatusArea;
|
||||
|
||||
fn main() {
|
||||
gtk4::init().unwrap();
|
||||
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
// XXX Implement DBus service somewhere other than applet?
|
||||
glib::MainContext::default().spawn_local(status_notifier_watcher::start());
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ cascade = "1"
|
|||
chrono = "0.4"
|
||||
futures = "0.3"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs", features = [ "v4_6" ] }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
libcosmic-applet = { path = "../../libcosmic-applet" }
|
||||
once_cell = "1.12"
|
||||
serde = "1"
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ mod time_button;
|
|||
use time_button::TimeButton;
|
||||
|
||||
fn main() {
|
||||
gtk4::init().unwrap();
|
||||
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
cascade! {
|
||||
libcosmic_applet::AppletWindow::new();
|
||||
..set_child(Some(&TimeButton::new()));
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", default
|
|||
cosmic-panel-config = { git = "https://github.com/pop-os/cosmic-panel", features = ["gtk4"] }
|
||||
cascade = "1.0.0"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs", features = ["v4_4"] }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
once_cell = "1.9.0"
|
||||
pretty_env_logger = "0.4"
|
||||
anyhow = "1.0.50"
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ fn load_css() {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
// Initialize logger
|
||||
pretty_env_logger::init();
|
||||
glib::set_application_name(ID);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ edition = "2021"
|
|||
cosmic-panel-config = {git = "https://github.com/pop-os/cosmic-panel", features = ["gtk4"] }
|
||||
cascade = "1.0.0"
|
||||
gtk4 = { git = "https://github.com/gtk-rs/gtk4-rs", features = ["v4_4"] }
|
||||
adw = { git = "https://gitlab.gnome.org/World/Rust/libadwaita-rs", package = "libadwaita"}
|
||||
once_cell = "1.9.0"
|
||||
pretty_env_logger = "0.4"
|
||||
anyhow = "1.0.50"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ fn load_css() {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let _ = gtk4::init();
|
||||
adw::init();
|
||||
|
||||
// Initialize logger
|
||||
pretty_env_logger::init();
|
||||
glib::set_application_name("Cosmic Panel App Button");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue