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]
|
[dependencies.adw]
|
||||||
package = "libadwaita"
|
package = "libadwaita"
|
||||||
version = "0.7.0"
|
version = "0.7.0"
|
||||||
features = ["v1_6"]
|
features = ["v1_5"]
|
||||||
|
|
||||||
[dependencies.gemini]
|
[dependencies.gemini]
|
||||||
package = "ggemini"
|
package = "ggemini"
|
||||||
|
@ -118,7 +118,7 @@ GTK 4 / Libadwaita client written in Rust
|
|||||||
* Gio `2.82`
|
* Gio `2.82`
|
||||||
* Glib `2.56`
|
* Glib `2.56`
|
||||||
* GTK `4.16`
|
* 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:
|
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::{
|
use gtk::{
|
||||||
glib::{timeout_add_local, ControlFlow},
|
glib::{timeout_add_local, ControlFlow},
|
||||||
prelude::WidgetExt,
|
prelude::WidgetExt,
|
||||||
|
Spinner, // use adw::Spinner; @TODO adw 1.6 / ubuntu 24.10+
|
||||||
};
|
};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ use widget::Widget;
|
|||||||
use crate::app::browser::window::{
|
use crate::app::browser::window::{
|
||||||
action::Position, tab::item::Action as TabAction, Action as WindowAction,
|
action::Position, tab::item::Action as TabAction, Action as WindowAction,
|
||||||
};
|
};
|
||||||
use adw::StyleManager;
|
|
||||||
use gemtext::line::{
|
use gemtext::line::{
|
||||||
code::{Inline, Multiline},
|
code::{Inline, Multiline},
|
||||||
header::{Header, Level},
|
header::{Header, Level},
|
||||||
@ -224,7 +223,8 @@ impl Reader {
|
|||||||
|
|
||||||
// Create new tag for new link
|
// Create new tag for new link
|
||||||
let a = TextTag::builder()
|
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)
|
.sentence(true)
|
||||||
.wrap_mode(WrapMode::Word)
|
.wrap_mode(WrapMode::Word)
|
||||||
.build();
|
.build();
|
||||||
|
@ -14,7 +14,7 @@ pub struct Widget {
|
|||||||
|
|
||||||
impl Widget {
|
impl Widget {
|
||||||
// Construct
|
// 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
|
// Init gobject
|
||||||
let gobject = PasswordEntryRow::builder().show_apply_button(true).build();
|
let gobject = PasswordEntryRow::builder().show_apply_button(true).build();
|
||||||
|
|
||||||
@ -22,9 +22,10 @@ impl Widget {
|
|||||||
gobject.set_title(value);
|
gobject.set_title(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* @TODO adw 1.6 / ubuntu 24.10+
|
||||||
if let Some(value) = max_length {
|
if let Some(value) = max_length {
|
||||||
gobject.set_max_length(value);
|
gobject.set_max_length(value);
|
||||||
}
|
} */
|
||||||
|
|
||||||
// Init events
|
// Init events
|
||||||
gobject.connect_apply(move |_| {
|
gobject.connect_apply(move |_| {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user