mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Fix pixel bar below title
This commit changes how the left and right indents are calculated for the title bottom pixel bar, so that it is displayed properly in case the left or right border is hidden.
This commit is contained in:
parent
90ca0c8b2f
commit
fcc11f9771
1 changed files with 10 additions and 10 deletions
|
@ -383,21 +383,21 @@ static void render_container_simple_border_normal(struct sway_output *output,
|
||||||
scale_box(&box, output_scale);
|
scale_box(&box, output_scale);
|
||||||
render_rect(output->wlr_output, output_damage, &box, color);
|
render_rect(output->wlr_output, output_damage, &box, color);
|
||||||
|
|
||||||
// Single pixel bar below title
|
|
||||||
memcpy(&color, colors->border, sizeof(float) * 4);
|
|
||||||
color[3] *= con->alpha;
|
|
||||||
box.x = con->x + view->border_thickness;
|
|
||||||
box.y = view->y - 1;
|
|
||||||
box.width = con->width - view->border_thickness * 2;
|
|
||||||
box.height = 1;
|
|
||||||
scale_box(&box, output_scale);
|
|
||||||
render_rect(output->wlr_output, output_damage, &box, color);
|
|
||||||
|
|
||||||
// Setting these makes marks and title easier
|
// Setting these makes marks and title easier
|
||||||
size_t inner_x = con->x + view->border_thickness * view->border_left;
|
size_t inner_x = con->x + view->border_thickness * view->border_left;
|
||||||
size_t inner_width = con->width - view->border_thickness * view->border_left
|
size_t inner_width = con->width - view->border_thickness * view->border_left
|
||||||
- view->border_thickness * view->border_right;
|
- view->border_thickness * view->border_right;
|
||||||
|
|
||||||
|
// Single pixel bar below title
|
||||||
|
memcpy(&color, colors->border, sizeof(float) * 4);
|
||||||
|
color[3] *= con->alpha;
|
||||||
|
box.x = inner_x;
|
||||||
|
box.y = view->y - 1;
|
||||||
|
box.width = inner_width;
|
||||||
|
box.height = 1;
|
||||||
|
scale_box(&box, output_scale);
|
||||||
|
render_rect(output->wlr_output, output_damage, &box, color);
|
||||||
|
|
||||||
// Marks
|
// Marks
|
||||||
size_t marks_width = 0;
|
size_t marks_width = 0;
|
||||||
if (config->show_marks && marks_texture) {
|
if (config->show_marks && marks_texture) {
|
||||||
|
|
Loading…
Reference in a new issue