mirror of
https://github.com/MeexReay/bRAC.git
synced 2025-09-13 23:47:39 +03:00
refactor: replace gtk4 about dialog with libadwaita's one
This commit is contained in:
parent
46778bc646
commit
88f02f2e11
@ -10,7 +10,7 @@ lazy_static = "1.5.0"
|
|||||||
serde_yml = "0.0.12"
|
serde_yml = "0.0.12"
|
||||||
homedir = "0.3.4"
|
homedir = "0.3.4"
|
||||||
native-tls = "0.2.14"
|
native-tls = "0.2.14"
|
||||||
clap = { version = "4.5.36", features = ["derive"] }
|
clap = { version = "4.5.36", features = ["derive", "cargo"] }
|
||||||
serde = { version = "1.0.219", features = ["serde_derive"] }
|
serde = { version = "1.0.219", features = ["serde_derive"] }
|
||||||
# gtk4 = { version = "0.9.6", optional = true }
|
# gtk4 = { version = "0.9.6", optional = true }
|
||||||
chrono = "0.4.40"
|
chrono = "0.4.40"
|
||||||
@ -22,7 +22,7 @@ gdk-pixbuf = { version = "0.3.0", optional = true } # DO NOT UPDATE
|
|||||||
winapi = { version = "0.3.9", optional = true, features = ["wincon", "winuser"] }
|
winapi = { version = "0.3.9", optional = true, features = ["wincon", "winuser"] }
|
||||||
tungstenite = "0.27.0"
|
tungstenite = "0.27.0"
|
||||||
reqwest = { version = "0.12.20", features = ["blocking"] }
|
reqwest = { version = "0.12.20", features = ["blocking"] }
|
||||||
libadwaita = { version = "0.8.0", optional = true }
|
libadwaita = { version = "0.8.0", optional = true, features = ["v1_5"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
winresource = { version = "0.1.20", optional = true }
|
winresource = { version = "0.1.20", optional = true }
|
||||||
|
@ -11,6 +11,7 @@ use std::thread;
|
|||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
|
|
||||||
use chrono::Local;
|
use chrono::Local;
|
||||||
|
use clap::crate_version;
|
||||||
|
|
||||||
use libadwaita as adw;
|
use libadwaita as adw;
|
||||||
use adw::gdk::{Cursor, Display, Texture};
|
use adw::gdk::{Cursor, Display, Texture};
|
||||||
@ -400,6 +401,7 @@ fn open_settings(ctx: Arc<Context>, app: &Application) {
|
|||||||
.resizable(true)
|
.resizable(true)
|
||||||
.decorated(true)
|
.decorated(true)
|
||||||
.content(&vbox)
|
.content(&vbox)
|
||||||
|
.modal(true)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let controller = gtk::EventControllerKey::new();
|
let controller = gtk::EventControllerKey::new();
|
||||||
@ -456,18 +458,16 @@ fn build_menu(ctx: Arc<Context>, app: &Application) {
|
|||||||
#[weak]
|
#[weak]
|
||||||
app,
|
app,
|
||||||
move |_, _, _| {
|
move |_, _, _| {
|
||||||
AboutDialog::builder()
|
let dialog = adw::AboutDialog::builder()
|
||||||
.application(&app)
|
.developer_name("MeexReay")
|
||||||
.authors(["MeexReay"])
|
.license(glib::markup_escape_text(include_str!("../../LICENSE")))
|
||||||
.license(include_str!("../../LICENSE"))
|
|
||||||
.comments("better RAC client")
|
.comments("better RAC client")
|
||||||
.website("https://github.com/MeexReay/bRAC")
|
.website("https://github.com/MeexReay/bRAC")
|
||||||
.website_label("source code")
|
.application_name("bRAC")
|
||||||
.logo(&Texture::for_pixbuf(
|
.application_icon("ru.themixray.bRAC")
|
||||||
&load_pixbuf(include_bytes!("images/icon.png")).unwrap(),
|
.version(crate_version!())
|
||||||
))
|
.build();
|
||||||
.build()
|
dialog.present(app.active_window().as_ref());
|
||||||
.present();
|
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
.build(),
|
.build(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user