mirror of
https://github.com/swaywm/sway.git
synced 2024-11-27 02:11:28 +00:00
fix tabbed titlebar widths
This commit is contained in:
parent
60bba5a961
commit
89c25dd149
|
@ -599,7 +599,8 @@ static void render_container_tabbed(struct sway_output *output,
|
||||||
struct border_colors *current_colors = &config->border_colors.unfocused;
|
struct border_colors *current_colors = &config->border_colors.unfocused;
|
||||||
struct sway_container_state *pstate = &con->current;
|
struct sway_container_state *pstate = &con->current;
|
||||||
|
|
||||||
int tab_width = pstate->swayc_width / pstate->children->length;
|
double width_gap_adjustment = 2 * pstate->current_gaps;
|
||||||
|
int tab_width = (pstate->swayc_width - width_gap_adjustment) / pstate->children->length;
|
||||||
|
|
||||||
// Render tabs
|
// Render tabs
|
||||||
for (int i = 0; i < pstate->children->length; ++i) {
|
for (int i = 0; i < pstate->children->length; ++i) {
|
||||||
|
@ -628,7 +629,7 @@ static void render_container_tabbed(struct sway_output *output,
|
||||||
|
|
||||||
// Make last tab use the remaining width of the parent
|
// Make last tab use the remaining width of the parent
|
||||||
if (i == pstate->children->length - 1) {
|
if (i == pstate->children->length - 1) {
|
||||||
tab_width = pstate->swayc_width - tab_width * i;
|
tab_width = (pstate->swayc_width - width_gap_adjustment) - tab_width * i;
|
||||||
}
|
}
|
||||||
|
|
||||||
render_titlebar(output, damage, child, x, cstate->swayc_y, tab_width,
|
render_titlebar(output, damage, child, x, cstate->swayc_y, tab_width,
|
||||||
|
|
Loading…
Reference in a new issue