Skip to content

Commit

Permalink
Update to makepad version that preserves whitespace in HTML (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinaboos authored Apr 15, 2024
1 parent 91be1c5 commit cd4270d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
60 changes: 30 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/shared/html_or_plaintext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ live_design! {
padding: 0.0,
line_spacing: (HTML_LINE_SPACING),
width: Fill, height: Fit, // see comment in `HtmlOrPlaintext`
keep_whitespace: true,
font_size: (MESSAGE_FONT_SIZE),
draw_normal: { color: (MESSAGE_TEXT_COLOR), text_style: { height_factor: (HTML_TEXT_HEIGHT_FACTOR), line_spacing: (HTML_LINE_SPACING) } }
draw_italic: { color: (MESSAGE_TEXT_COLOR), text_style: { height_factor: (HTML_TEXT_HEIGHT_FACTOR), line_spacing: (HTML_LINE_SPACING) } }
Expand Down Expand Up @@ -155,8 +156,9 @@ impl LiveHook for MatrixHtmlSpan {
if let Some(fg_color) = self.fg_color {
self.ll.apply_over(cx, live!{ draw_text: { color: (fg_color) } });
};
if let Some(bg_color) = self.bg_color {
self.ll.apply_over(cx, live!{ draw_bg: { color: (bg_color) } });
if let Some(_bg_color) = self.bg_color {
log!("TODO: Html span/font background color is not yet implemented.")
// self.apply_over(cx, live!{ draw_bg: { color: (bg_color) } });
};

// TODO: need to handle label events to handle the spoiler, so we can toggle it upon click.
Expand Down

0 comments on commit cd4270d

Please sign in to comment.