Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toot/Post/Status & Profile bio content #14

Closed
GeopJr opened this issue Nov 22, 2022 · 3 comments
Closed

Toot/Post/Status & Profile bio content #14

GeopJr opened this issue Nov 22, 2022 · 3 comments

Comments

@GeopJr
Copy link
Owner

GeopJr commented Nov 22, 2022

Gtk labels cannot have images in them, making custom emoji support difficult.
At the same time we need to connect to signals that textview doesn't support (at least not as conveniently).

The current workaround I use for titles is to create a GtkButton with a box of GtkLabels and GtkImages from the title name (by splitting on :, checking for custom emojis etc).

While that kind-of works for titles, it doesn't for bios or toots because they require markup support.

My current plan is to use a webview to render them. Using a webview will also allow Tooth to support non-mastodon instances or future mastodon features like text formatting, markdown, latex, code blocks & more.

@chuangzhu
Copy link

chuangzhu commented Jan 31, 2023

How about using a non-editable text view? The Text View > Multiple Views in gtk4-demo has demonstrated having images in a TextView. And the Text View > Markup demo has shown how to make text views non-editable.

@GeopJr
Copy link
Owner Author

GeopJr commented Jan 31, 2023

Thanks for your input!

We had a small discussion over this on #46 with 3 available options:

Textviews and Webviews will probably have a performance impact or other issues since each post will need at least 2.
Label with widgets is a custom widget from Fractal that, as the name implies, is a label with children (Fractal uses it for a similar reason as us, emojis in labels). Label with widgets is probably the ideal solution but it's a bit complex and nobody else seems to have ever rewritten it in vala so that's going to take a while.

@GeopJr
Copy link
Owner Author

GeopJr commented Feb 8, 2023

Closing as duplicate of #1

@GeopJr GeopJr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants