-
8000
-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Custom border width in Image()
#8131
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
Conversation
Hello, thanks for the PR. I might need to put this one on hold for a bit. |
Thanks, I fully agree. In the current implementation the border size gets set via the alpha channel of the border color. I think this logic is somewhat inappropriate, because the total image size depends on the alpha channel. E.g., I have a window with several image previews and I want to highlight the active one by drawing an image border, however, this leads to different sizes that can only be fixed by setting a small non-zero alpha channel. Thus, I would prefer two new styles (border color and border width). What do you think? |
Also linking to #8238 which mention the same issue. |
I have pushed a slightly larger refactor 494ea57 with solves this. Image: removed 'tint_col' and 'border_col' parameter from Image() function.
TL;DR: 'border_col' had misleading side-effect on layout, 'bg_col' was missing, parameter order couldn't be consistent with
|
This PR introduces the possibility to specify a custom border width in
Image()
by adding an additional parameterborder_width
. There is currently no way to adjust the width of a drawn image border as it is hard-coded to 1 pixel, which may be insufficient for high DPI displays.