This commit is contained in:
parent
d94572201a
commit
891ad2587e
1 changed files with 27 additions and 26 deletions
|
@ -4,6 +4,7 @@ use std::{fs::File, io::BufReader, path::PathBuf, sync::Arc};
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::{
|
iced::{
|
||||||
alignment::Horizontal,
|
alignment::Horizontal,
|
||||||
|
border,
|
||||||
font::{Family, Stretch, Style, Weight},
|
font::{Family, Stretch, Style, Weight},
|
||||||
Background, Border, Color, ContentFit, Font, Length, Shadow,
|
Background, Border, Color, ContentFit, Font, Length, Shadow,
|
||||||
Vector,
|
Vector,
|
||||||
|
@ -546,34 +547,34 @@ pub(crate) fn slide_view(
|
||||||
let slide_text = slide.text();
|
let slide_text = slide.text();
|
||||||
|
|
||||||
// SVG based
|
// SVG based
|
||||||
let font = SvgFont::from(font).size(font_size.floor() as u8);
|
// let font = SvgFont::from(font).size(font_size.floor() as u8);
|
||||||
let text = text_svg::TextSvg::new()
|
// let text = text_svg::TextSvg::new()
|
||||||
.text(&slide_text)
|
// .text(&slide_text)
|
||||||
.fill("#fff")
|
// .fill("#fff")
|
||||||
.shadow(text_svg::shadow(2, 2, 5, "#000000"))
|
// .shadow(text_svg::shadow(2, 2, 5, "#000000"))
|
||||||
.stroke(text_svg::stroke(3, "#000"))
|
// .stroke(text_svg::stroke(3, "#000"))
|
||||||
.font(font)
|
// .font(font)
|
||||||
.view()
|
// .view()
|
||||||
.map(|m| Message::None);
|
// .map(|m| Message::None);
|
||||||
|
|
||||||
// let text = text!("{}", &slide_text);
|
|
||||||
// text widget based
|
// text widget based
|
||||||
// let lines = slide_text.lines();
|
let lines = slide_text.lines();
|
||||||
// let text: Vec<Element<Message>> = lines
|
let text: Vec<Element<Message>> = lines
|
||||||
// .map(|t| {
|
.map(|t| {
|
||||||
// rich_text([span(format!("{}\n", t))
|
rich_text([span(format!("{}\n", t))
|
||||||
// .background(
|
.background(
|
||||||
// Background::Color(Color::BLACK)
|
Background::Color(Color::BLACK)
|
||||||
// .scale_alpha(0.4),
|
.scale_alpha(0.4),
|
||||||
// )
|
)
|
||||||
// .padding(1)])
|
.border(border::rounded(10))
|
||||||
// .size(font_size)
|
.padding(10)])
|
||||||
// .font(font)
|
.size(font_size)
|
||||||
// .center()
|
.font(font)
|
||||||
// .into()
|
.center()
|
||||||
// })
|
.into()
|
||||||
// .collect();
|
})
|
||||||
// let text = Column::with_children(text).spacing(6);
|
.collect();
|
||||||
|
let text = Column::with_children(text).spacing(26);
|
||||||
|
|
||||||
//Next
|
//Next
|
||||||
let text_container = Container::new(text)
|
let text_container = Container::new(text)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue