mirror of
https://github.com/labwc/labwc.git
synced 2026-05-03 06:47:22 -04:00
labnag: remove doubled border between scroll buttons and adjust text position
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Some checks failed
labwc.github.io / notify (push) Has been cancelled
Each scroll button draws its own full border, so placing the up and down buttons flush produced a divider twice the intended thickness. Shift button_down up by one border width and extend its height accordingly so its top border overlaps button_up's bottom border. Also drop a stray \`+ border\` offset from the scroll button text Y-position that was pushing the label below the button's center.
This commit is contained in:
parent
ccdef5e854
commit
7ec7a322d2
1 changed files with 3 additions and 3 deletions
|
|
@ -318,7 +318,7 @@ render_details_scroll_button(cairo_t *cairo, struct nag *nag,
|
||||||
|
|
||||||
cairo_set_source_u32(cairo, nag->conf->button_text);
|
cairo_set_source_u32(cairo, nag->conf->button_text);
|
||||||
cairo_move_to(cairo, button->x + border + padding,
|
cairo_move_to(cairo, button->x + border + padding,
|
||||||
button->y + border + (button->height - text_height) / 2);
|
button->y + (button->height - text_height) / 2);
|
||||||
render_text(cairo, nag->conf->font_description, 1, true,
|
render_text(cairo, nag->conf->font_description, 1, true,
|
||||||
"%s", button->text);
|
"%s", button->text);
|
||||||
}
|
}
|
||||||
|
|
@ -415,10 +415,10 @@ render_detailed(cairo_t *cairo, struct nag *nag, uint32_t y)
|
||||||
|
|
||||||
nag->details.button_down.x = nag->details.x + nag->details.width;
|
nag->details.button_down.x = nag->details.x + nag->details.width;
|
||||||
nag->details.button_down.y =
|
nag->details.button_down.y =
|
||||||
nag->details.button_up.y + nag->details.button_up.height;
|
nag->details.button_up.y + nag->details.button_up.height - border;
|
||||||
nag->details.button_down.width = button_width;
|
nag->details.button_down.width = button_width;
|
||||||
nag->details.button_down.height =
|
nag->details.button_down.height =
|
||||||
border_rect_height - nag->details.button_up.height;
|
border_rect_height - nag->details.button_up.height + border;
|
||||||
render_details_scroll_button(cairo, nag, &nag->details.button_down);
|
render_details_scroll_button(cairo, nag, &nag->details.button_down);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue