Skip to content

HTMLBoxWidget: add setRawContent()#14480

Merged
Frenzie merged 5 commits into
koreader:masterfrom
Frenzie:htmlboxwidget-svgcontent
Oct 19, 2025
Merged

HTMLBoxWidget: add setRawContent()#14480
Frenzie merged 5 commits into
koreader:masterfrom
Frenzie:htmlboxwidget-svgcontent

Conversation

@Frenzie

@Frenzie Frenzie commented Oct 19, 2025

Copy link
Copy Markdown
Member

The functionality I'm looking for is really just a way to pass through the pure string without any of the current manipulation in setContent (which would sometimes be good for HTML too) and maybe a custom "magic", but I'm not quite seeing an elegant way to do that right now.


This change is Reviewable

@poire-z

poire-z commented Oct 19, 2025

Copy link
Copy Markdown
Contributor

setRawContent() ?

@Frenzie

Frenzie commented Oct 19, 2025

Copy link
Copy Markdown
Member Author

Perhaps just naming it better does indeed make it seem less redundant to offer it as a separate method.

@Frenzie Frenzie changed the title HTMLBoxWidget: add setSVGContent() HTMLBoxWidget: add setRawContent() Oct 19, 2025
@Frenzie Frenzie added this to the 2025.10 milestone Oct 19, 2025
@Frenzie Frenzie marked this pull request as ready for review October 19, 2025 16:19
Comment thread frontend/ui/widget/htmlboxwidget.lua Outdated
@Frenzie Frenzie merged commit b28a6e5 into koreader:master Oct 19, 2025
3 checks passed
@Frenzie Frenzie deleted the htmlboxwidget-svgcontent branch October 19, 2025 17:16
@Frenzie

Frenzie commented Oct 19, 2025

Copy link
Copy Markdown
Member Author

For context, I'm playing around auto-generating a little weather SVG (obviously very work in progress, not intended for inclusion here but I intend to share it on contrib once it's a bit less of an ugly POC). I briefly experimented with doing it in KOReader UI, but ultimately it seems simpler to combine all of the parts within SVG itself. On the right is crengine for comparison. It seems to maintain some kind of margins despite setting them to 0.
Screenshot_20251019_191748 Screenshot_20251019_192450

0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
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

Successfully merging this pull request may close these issues.

2 participants