remove extra members

This commit is contained in:
yggverse 2024-12-17 04:03:38 +02:00
parent 5e41a1499b
commit 0d0eba83b9

View File

@ -33,10 +33,6 @@ pub const EXTERNAL_LINK_INDICATOR: &str = "⇖";
pub const LIST_ITEM: &str = ""; pub const LIST_ITEM: &str = "";
pub const NEW_LINE: &str = "\n"; pub const NEW_LINE: &str = "\n";
// @TODO use accent colors in adw 1.6 / ubuntu 24.10+
const LINK_COLOR: ((f32, f32, f32, f32), (f32, f32, f32, f32)) =
((0.2, 0.5, 0.9, 1.0), (0.2, 0.5, 0.9, 0.9));
pub struct Reader { pub struct Reader {
pub title: Option<String>, pub title: Option<String>,
pub widget: Rc<Widget>, pub widget: Rc<Widget>,
@ -63,7 +59,8 @@ impl Reader {
let mut multiline = None; let mut multiline = None;
// Init colors // Init colors
let link_color = (rgba(LINK_COLOR.0), rgba(LINK_COLOR.1)); // @TODO use accent colors in adw 1.6 / ubuntu 24.10+
let link_color = (RGBA::new(0.2, 0.5, 0.9, 1.0), RGBA::new(0.2, 0.5, 0.9, 0.9));
// Init syntect highlight features // Init syntect highlight features
let syntax = Syntax::new(); let syntax = Syntax::new();
@ -451,10 +448,3 @@ impl Reader {
Ok(Self { title, widget }) Ok(Self { title, widget })
} }
} }
// Private helpers
/// Create new [RGBA](https://docs.gtk.org/gdk4/struct.RGBA.html) from tuple
fn rgba((r, g, b, a): (f32, f32, f32, f32)) -> RGBA {
RGBA::new(r, g, b, a)
}