borders: disable frame line controls when border geometry prevents it - #22108
Merged
Conversation
masterpiga
force-pushed
the
borders_ui
branch
2 times, most recently
from
September 1, 2026 15:34
6f7ce00 to
52bf239
Compare
Member
Collaborator
Author
The frame line width is proportional to the minimum border width across all four sides. When border size is 0 or when horizontal/vertical offsets are set to extreme values (0.0 or 1.0), the minimum border width collapses to 0, making the frame line invisible. Disable frame line width, offset, and color controls when geometry prevents the frame line from rendering, and update their tooltips to explain the required adjustment.
masterpiga
force-pushed
the
borders_ui
branch
from
September 1, 2026 17:46
904dd3a to
d12655e
Compare
Frame line boundary coordinates previously subtracted 1 to represent inclusive pixel indices, but were assigned directly to half-open interval endpoints (fl_right, border_right, fl_bot, border_bot). This caused the inner border on the right and bottom sides to be 1 pixel narrower and the outer border 1 pixel wider, noticeably shifting the frame line off-center at smaller border sizes and downscaled preview resolutions. Define the bottom-right frame coordinates as exclusive upper bounds, matching CPU slice lengths and OpenCL bounding box expectations, and use roundf() on fractional offset and size products.
masterpiga
force-pushed
the
borders_ui
branch
from
September 1, 2026 17:49
d12655e to
da289dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



A small but significant UX improvement in the
bordersmodule.The frame line width is proportional to the minimum border width across all four sides (
MIN(border_size_l, border_size_r, border_size_t, border_size_b)). When border size is 0 or when horizontal/vertical offset is set to an extreme value (0.0or1.0), one or more side borders are absent, collapsing the minimum border width to 0 and preventing the frame line from rendering.This PR:
Tested:
Co-authored with Gemini.
Note that this is stacked on top of #22107, which has a fix for a borders-related crash.
EDIT: also fixed centering of the frame line, as requested by @TurboGit in the comments.