feat: init adwaita
This commit is contained in:
parent
d03966ae42
commit
d9212b2285
23 changed files with 85 additions and 10 deletions
42
Cargo.lock
generated
42
Cargo.lock
generated
|
|
@ -288,6 +288,7 @@ dependencies = [
|
|||
"gtk4",
|
||||
"i18n-embed",
|
||||
"i18n-embed-fl",
|
||||
"libadwaita",
|
||||
"libcosmic",
|
||||
"log",
|
||||
"nix 0.24.2",
|
||||
|
|
@ -312,6 +313,7 @@ dependencies = [
|
|||
"futures",
|
||||
"futures-util",
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"libcosmic-widgets",
|
||||
"libpulse-binding",
|
||||
|
|
@ -331,6 +333,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"futures",
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"relm4",
|
||||
"zbus",
|
||||
|
|
@ -341,6 +344,7 @@ name = "cosmic-applet-graphics"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"once_cell",
|
||||
"relm4-macros",
|
||||
|
|
@ -356,6 +360,7 @@ dependencies = [
|
|||
"futures-util",
|
||||
"gtk4",
|
||||
"itertools",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"libcosmic-widgets",
|
||||
"once_cell",
|
||||
|
|
@ -372,6 +377,7 @@ dependencies = [
|
|||
"cascade",
|
||||
"futures",
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"once_cell",
|
||||
"relm4-macros",
|
||||
|
|
@ -387,6 +393,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"futures-util",
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"logind-zbus",
|
||||
"nix 0.24.2",
|
||||
|
|
@ -403,6 +410,7 @@ dependencies = [
|
|||
"cascade",
|
||||
"futures",
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"once_cell",
|
||||
"serde",
|
||||
|
|
@ -419,6 +427,7 @@ dependencies = [
|
|||
"chrono",
|
||||
"futures",
|
||||
"gtk4",
|
||||
"libadwaita",
|
||||
"libcosmic-applet",
|
||||
"once_cell",
|
||||
"serde",
|
||||
|
|
@ -440,6 +449,7 @@ dependencies = [
|
|||
"gtk4",
|
||||
"i18n-embed",
|
||||
"i18n-embed-fl",
|
||||
"libadwaita",
|
||||
"log",
|
||||
"nix 0.24.2",
|
||||
"once_cell",
|
||||
|
|
@ -473,6 +483,7 @@ dependencies = [
|
|||
"gtk4",
|
||||
"i18n-embed",
|
||||
"i18n-embed-fl",
|
||||
"libadwaita",
|
||||
"once_cell",
|
||||
"pretty_env_logger",
|
||||
"rust-embed",
|
||||
|
|
@ -1490,6 +1501,37 @@ version = "1.4.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libadwaita"
|
||||
version = "0.2.0"
|
||||
source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs#01881b0c9f67ed5a351b78fcd9b172fee246fdd4"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"gdk-pixbuf",
|
||||
"gdk4",
|
||||
"gio 0.16.0",
|
||||
"glib 0.16.0",
|
||||
"gtk4",
|
||||
"libadwaita-sys",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"pango",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libadwaita-sys"
|
||||
version = "0.2.0"
|
||||
source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs#01881b0c9f67ed5a351b78fcd9b172fee246fdd4"
|
||||
dependencies = [
|
||||
"gdk4-sys",
|
||||
"gio-sys 0.16.0",
|
||||
"glib-sys 0.16.0",
|
||||
"gobject-sys 0.16.0",
|
||||
"gtk4-sys",
|
||||
"libc",
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.126"
|
||||
|
|
|
|||
|
|
@ -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