mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
replace features with adw 1.5 (support ubuntu 24.04 lts)
This commit is contained in:
parent
51431ca635
commit
297e54b2c1
@ -13,7 +13,7 @@ repository = "https://github.com/YGGverse/Yoda"
|
||||
[dependencies.adw]
|
||||
package = "libadwaita"
|
||||
version = "0.7.0"
|
||||
features = ["v1_6"]
|
||||
features = ["v1_5"]
|
||||
|
||||
[dependencies.gemini]
|
||||
package = "ggemini"
|
||||
|
@ -118,7 +118,7 @@ GTK 4 / Libadwaita client written in Rust
|
||||
* Gio `2.82`
|
||||
* Glib `2.56`
|
||||
* GTK `4.16`
|
||||
* Libadwaita `1.6` (Ubuntu 24.10+)
|
||||
* Libadwaita `1.5` (Ubuntu 24.04+)
|
||||
|
||||
Use [rustup](https://rustup.rs) installer to setup latest Rust compiler and Cargo package manager:
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
use adw::{Spinner, StatusPage};
|
||||
use adw::StatusPage;
|
||||
use gtk::{
|
||||
glib::{timeout_add_local, ControlFlow},
|
||||
prelude::WidgetExt,
|
||||
Spinner, // use adw::Spinner; @TODO adw 1.6 / ubuntu 24.10+
|
||||
};
|
||||
use std::time::Duration;
|
||||
|
||||
|
@ -11,7 +11,6 @@ use widget::Widget;
|
||||
use crate::app::browser::window::{
|
||||
action::Position, tab::item::Action as TabAction, Action as WindowAction,
|
||||
};
|
||||
use adw::StyleManager;
|
||||
use gemtext::line::{
|
||||
code::{Inline, Multiline},
|
||||
header::{Header, Level},
|
||||
@ -224,7 +223,8 @@ impl Reader {
|
||||
|
||||
// Create new tag for new link
|
||||
let a = TextTag::builder()
|
||||
.foreground_rgba(&StyleManager::default().accent_color_rgba()) // @TODO
|
||||
.foreground("#3584e4")
|
||||
// .foreground_rgba(&adw::StyleManager::default().accent_color_rgba()) @TODO adw 1.6 / ubuntu 24.10+
|
||||
.sentence(true)
|
||||
.wrap_mode(WrapMode::Word)
|
||||
.build();
|
||||
|
@ -14,7 +14,7 @@ pub struct Widget {
|
||||
|
||||
impl Widget {
|
||||
// Construct
|
||||
pub fn new(action_send: SimpleAction, title: Option<&str>, max_length: Option<i32>) -> Self {
|
||||
pub fn new(action_send: SimpleAction, title: Option<&str>, _max_length: Option<i32>) -> Self {
|
||||
// Init gobject
|
||||
let gobject = PasswordEntryRow::builder().show_apply_button(true).build();
|
||||
|
||||
@ -22,9 +22,10 @@ impl Widget {
|
||||
gobject.set_title(value);
|
||||
}
|
||||
|
||||
/* @TODO adw 1.6 / ubuntu 24.10+
|
||||
if let Some(value) = max_length {
|
||||
gobject.set_max_length(value);
|
||||
}
|
||||
} */
|
||||
|
||||
// Init events
|
||||
gobject.connect_apply(move |_| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user