mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
add found tag
This commit is contained in:
parent
b56b36cb41
commit
1ce46c680b
@ -1,3 +1,4 @@
|
|||||||
|
mod found;
|
||||||
mod h1;
|
mod h1;
|
||||||
mod h2;
|
mod h2;
|
||||||
mod h3;
|
mod h3;
|
||||||
@ -5,6 +6,7 @@ mod list;
|
|||||||
mod quote;
|
mod quote;
|
||||||
mod title;
|
mod title;
|
||||||
|
|
||||||
|
use found::Found;
|
||||||
use h1::H1;
|
use h1::H1;
|
||||||
use h2::H2;
|
use h2::H2;
|
||||||
use h3::H3;
|
use h3::H3;
|
||||||
@ -23,6 +25,7 @@ pub struct Tag {
|
|||||||
pub list: List,
|
pub list: List,
|
||||||
pub quote: Quote,
|
pub quote: Quote,
|
||||||
pub title: Title,
|
pub title: Title,
|
||||||
|
pub found: Found,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Tag {
|
impl Tag {
|
||||||
@ -35,6 +38,7 @@ impl Tag {
|
|||||||
let list = List::new();
|
let list = List::new();
|
||||||
let quote = Quote::new();
|
let quote = Quote::new();
|
||||||
let title = Title::new();
|
let title = Title::new();
|
||||||
|
let found = Found::new();
|
||||||
|
|
||||||
// Init tag table
|
// Init tag table
|
||||||
let text_tag_table = TextTagTable::new();
|
let text_tag_table = TextTagTable::new();
|
||||||
@ -45,6 +49,7 @@ impl Tag {
|
|||||||
text_tag_table.add(&title.text_tag);
|
text_tag_table.add(&title.text_tag);
|
||||||
text_tag_table.add(&list.text_tag);
|
text_tag_table.add(&list.text_tag);
|
||||||
text_tag_table.add("e.text_tag);
|
text_tag_table.add("e.text_tag);
|
||||||
|
text_tag_table.add(&found.text_tag);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
text_tag_table,
|
text_tag_table,
|
||||||
@ -55,6 +60,7 @@ impl Tag {
|
|||||||
list,
|
list,
|
||||||
quote,
|
quote,
|
||||||
title,
|
title,
|
||||||
|
found,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
use gtk::{gdk::RGBA, TextTag, WrapMode};
|
||||||
|
|
||||||
|
pub struct Found {
|
||||||
|
pub text_tag: TextTag,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Found {
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
/// Create new `Self`
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self {
|
||||||
|
text_tag: TextTag::builder()
|
||||||
|
.background_rgba(&RGBA::new(0.502, 0.502, 0.502, 0.5)) // @TODO
|
||||||
|
.wrap_mode(WrapMode::Word)
|
||||||
|
.build(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user