Skip to content

Fix border background, list icons, background color of body not working#4

Merged
BigJk merged 1 commit intoBigJk:mainfrom
KaruroChori:fix-border-background
Mar 8, 2026
Merged

Fix border background, list icons, background color of body not working#4
BigJk merged 1 commit intoBigJk:mainfrom
KaruroChori:fix-border-background

Conversation

@KaruroChori
Copy link

@KaruroChori KaruroChori commented Feb 23, 2026

Closes #3 .
It also solves most of the comments left around as TODOs in code.

image

PS. Border calculations are (and were) a bit off because of the version of litehtml being used not supporting float pixel position but integers. So no 0.5px borders.
It was fixed litehtml/litehtml#415 but it is not yet in a full release.
Also, the public interface of the library has shifted a lot, so it would be a considerable rework to operate with that.

Aside from that, they are not pixel perfect still:

  • there are two paths in code, one for elements with all borders set equal, and one for split borders. They have half a pixel difference in rendering position which should be investigated further... if there was enough time :)
  • border radius currently only working for uniform borders.
  • in the diagonals between borders there are some light artifacts, they could be removed by overlapping a bit more those quads I guess..

Final disclosure, unlike my other two PRs this one was partially llm-assisted; while I manually tested and fixed some more things on my own, if you are against just feel free to reject it.

@BigJk
Copy link
Owner

BigJk commented Mar 6, 2026

Sorry for the late reply. It seems I missed the notifications for this repo! I will check this out as soon as I can. Thank you for your time! 😄

@BigJk
Copy link
Owner

BigJk commented Mar 8, 2026

I tested it. Works like a charm and is a nice improvement over my hacky code! Thanks for your time and I don't mind that it's LLM-Assisted.

The artifacts and shortcomings could be addressed in the future, but even with them there is already a lot of cool stuff that can be done with it that weren't easy todo in ImGui layout-wise before. At least for my use-cases this works well enough.

@BigJk BigJk merged commit 7cdcc32 into BigJk:main Mar 8, 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.

Background color for body results in program termination

2 participants