fix: resizebar texture relief and indicator brightness on Wayland
Two issues: (1) Texture was rendered with WREL_RAISED which added a thick bevel border, making the 8px-tall resizebar appear too small. Changed to WREL_FLAT to match X11 behavior. (2) Corner indicator light color used +40 per channel but X11 uses +80 (ROperateLine RAddOperation with cdelta=80). Changed light delta from +40 to +80 so indicators are as visible as X11.
This commit is contained in:
parent
ae080d948c
commit
97d5f51e58
|
|
@ -4957,7 +4957,7 @@ wl_frame_paint(struct WFrameWindow *fwin)
|
||||||
int rb_h = fwin->bottom_width;
|
int rb_h = fwin->bottom_width;
|
||||||
WTexture *tex = fwin->resizebar_texture[0];
|
WTexture *tex = fwin->resizebar_texture[0];
|
||||||
|
|
||||||
RImage *img = wTextureRenderImage(tex, rb_w, rb_h, WREL_RAISED);
|
RImage *img = wTextureRenderImage(tex, rb_w, rb_h, WREL_FLAT);
|
||||||
if (img) {
|
if (img) {
|
||||||
uint32_t *dst = pixman_image_get_data(fb->image);
|
uint32_t *dst = pixman_image_get_data(fb->image);
|
||||||
int dst_stride = pixman_image_get_stride(fb->image) / 4;
|
int dst_stride = pixman_image_get_stride(fb->image) / 4;
|
||||||
|
|
@ -5006,9 +5006,9 @@ wl_frame_paint(struct WFrameWindow *fwin)
|
||||||
(((unsigned)((bg > 40) ? (bg - 40) : 0) << 8)) |
|
(((unsigned)((bg > 40) ? (bg - 40) : 0) << 8)) |
|
||||||
((unsigned)((bb > 40) ? (bb - 40) : 0));
|
((unsigned)((bb > 40) ? (bb - 40) : 0));
|
||||||
uint32_t light_px = 0xFF000000U |
|
uint32_t light_px = 0xFF000000U |
|
||||||
(((unsigned)((br < 215) ? (br + 40) : 255) << 16)) |
|
(((unsigned)((br < 175) ? (br + 80) : 255) << 16)) |
|
||||||
(((unsigned)((bg < 215) ? (bg + 40) : 255) << 8)) |
|
(((unsigned)((bg < 175) ? (bg + 80) : 255) << 8)) |
|
||||||
((unsigned)((bb < 215) ? (bb + 40) : 255));
|
((unsigned)((bb < 175) ? (bb + 80) : 255));
|
||||||
|
|
||||||
/* Top bevel: dim at y=0, light at y=1 */
|
/* Top bevel: dim at y=0, light at y=1 */
|
||||||
for (int x = 0; x < rb_w; x++) {
|
for (int x = 0; x < rb_w; x++) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue