mirror of
https://github.com/swaywm/sway.git
synced 2026-05-03 06:46:26 -04:00
fix case where drawing border gets off by 1 pixel
This commit is contained in:
parent
767640aa06
commit
d97d662984
1 changed files with 4 additions and 4 deletions
|
|
@ -439,7 +439,7 @@ static void render_container_top_tabbed_border_normal(struct sway_output *output
|
|||
wlr_backend_get_renderer(output->wlr_output->backend);
|
||||
struct wlr_box box;
|
||||
float color[4];
|
||||
size_t num_tabs = con->parent->children->length;
|
||||
float num_tabs = con->parent->children->length;
|
||||
float tab_width = con->width / num_tabs;
|
||||
|
||||
// Single pixel bar above title
|
||||
|
|
@ -447,7 +447,7 @@ static void render_container_top_tabbed_border_normal(struct sway_output *output
|
|||
color[3] *= con->alpha;
|
||||
box.x = con->x + depth * tab_width;
|
||||
box.y = con->y;
|
||||
box.width = con->width / num_tabs;
|
||||
box.width = con->width / num_tabs + 1;
|
||||
box.height = 1;
|
||||
scale_box(&box, output->wlr_output->scale);
|
||||
wlr_render_rect(renderer, &box, color,
|
||||
|
|
@ -456,7 +456,7 @@ static void render_container_top_tabbed_border_normal(struct sway_output *output
|
|||
// Single pixel bar below title
|
||||
box.x = con->x + depth*tab_width;
|
||||
box.y = con->sway_view->y - 1;
|
||||
box.width = con->width / num_tabs;
|
||||
box.width = con->width / num_tabs + 1;
|
||||
box.height = 1;
|
||||
scale_box(&box, output->wlr_output->scale);
|
||||
wlr_render_rect(renderer, &box, color,
|
||||
|
|
@ -485,7 +485,7 @@ static void render_container_top_tabbed_border_normal(struct sway_output *output
|
|||
color[3] *= con->alpha;
|
||||
box.x = con->x + con->sway_view->border_thickness + depth * tab_width;
|
||||
box.y = con->y + 1;
|
||||
box.width = con->width / num_tabs - con->sway_view->border_thickness * 2;
|
||||
box.width = con->width / num_tabs - con->sway_view->border_thickness * 2 + 1;
|
||||
box.height = con->sway_view->y - con->y - 2;
|
||||
scale_box(&box, output->wlr_output->scale);
|
||||
wlr_render_rect(renderer, &box, color,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue