mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-16 01:29:57 +00:00
set accent color for link tags
This commit is contained in:
parent
800fded9c2
commit
28092a2eca
@ -5,6 +5,7 @@ use parser::header::Header;
|
|||||||
use parser::link::Link;
|
use parser::link::Link;
|
||||||
use widget::Widget;
|
use widget::Widget;
|
||||||
|
|
||||||
|
use adw::StyleManager;
|
||||||
use gtk::{
|
use gtk::{
|
||||||
gdk::{BUTTON_MIDDLE, BUTTON_PRIMARY},
|
gdk::{BUTTON_MIDDLE, BUTTON_PRIMARY},
|
||||||
gio::SimpleAction,
|
gio::SimpleAction,
|
||||||
@ -29,6 +30,9 @@ impl Reader {
|
|||||||
// Init HashMap storage for event controllers
|
// Init HashMap storage for event controllers
|
||||||
let mut links: HashMap<TextTag, Uri> = HashMap::new();
|
let mut links: HashMap<TextTag, Uri> = HashMap::new();
|
||||||
|
|
||||||
|
// Init system palette
|
||||||
|
let style = StyleManager::default();
|
||||||
|
|
||||||
// Init new text buffer
|
// Init new text buffer
|
||||||
let buffer = TextBuffer::new(None);
|
let buffer = TextBuffer::new(None);
|
||||||
|
|
||||||
@ -78,6 +82,7 @@ impl Reader {
|
|||||||
if let Some(link) = Link::from(line, Some(base), Some(&TimeZone::local())) {
|
if let Some(link) = Link::from(line, Some(base), Some(&TimeZone::local())) {
|
||||||
// Init new tag for link
|
// Init new tag for link
|
||||||
let tag = TextTag::builder()
|
let tag = TextTag::builder()
|
||||||
|
.foreground_rgba(&style.accent_color_rgba())
|
||||||
.sentence(true)
|
.sentence(true)
|
||||||
.wrap_mode(WrapMode::Word)
|
.wrap_mode(WrapMode::Word)
|
||||||
.build();
|
.build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user