Skip to content

Commit

Permalink
Use rich HTML, fix avatar text, centralize style definitions (#62)
Browse files Browse the repository at this point in the history
The HTML widget in makepad is mostly complete, so we can now use it
to display rich text formatting in messages.
* HTML works for almost everything (underline/strikethrough not working)
* avatars work properly now
* images work but don't shrink to fit the window properly
* caching of widget content works again
* centralized styles for text in room timeline
* Make avatar impl more canonical, and support `set_text()`
* update to latest makepad that includes our changes
  • Loading branch information
kevinaboos authored Apr 8, 2024
1 parent 6ffa119 commit 311862c
Show file tree
Hide file tree
Showing 15 changed files with 348 additions and 159 deletions.
72 changes: 44 additions & 28 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ metadata.makepad-auto-version = "zqpv-Yj-K7WNVK2I8h5Okhho46Q="
[dependencies]
makepad-widgets = { git = "https://github.com/makepad/makepad", branch = "rik" }


anyhow = "1.0"
chrono = "0.4"
clap = { version = "4.0.16", features = ["derive"] }
Expand Down
1 change: 1 addition & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ impl LiveRegister for App {
crate::shared::clickable_view::live_design(cx);
crate::shared::avatar::live_design(cx);
crate::shared::text_or_image::live_design(cx);
crate::shared::html_or_plaintext::live_design(cx);

// home - chats
crate::home::home_screen::live_design(cx);
Expand Down
1 change: 0 additions & 1 deletion src/discover/discover_screen.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::shared::clickable_view::*;
use makepad_widgets::widget::WidgetCache;
use makepad_widgets::*;

live_design! {
Expand Down
Loading

0 comments on commit 311862c

Please sign in to comment.