mirror of
https://github.com/labwc/labwc.git
synced 2026-05-03 06:47:22 -04:00
labnag: separate details scroll button styling from regular buttons
Use details-specific border thickness and color config options instead of regular button options. Adjust padding for a more compact look on details scroll buttons.
This commit is contained in:
parent
91d89f71ce
commit
e209de3eb1
1 changed files with 5 additions and 5 deletions
|
|
@ -302,10 +302,10 @@ render_details_scroll_button(cairo_t *cairo, struct nag *nag,
|
|||
get_text_size(cairo, nag->conf->font_description, &text_width,
|
||||
&text_height, NULL, 1, true, "%s", button->text);
|
||||
|
||||
int border = nag->conf->button_border_thickness;
|
||||
int padding = nag->conf->button_padding;
|
||||
int border = nag->conf->details_border_thickness;
|
||||
int padding = (nag->conf->button_padding / 3) + 2;
|
||||
|
||||
cairo_set_source_u32(cairo, nag->conf->details_background);
|
||||
cairo_set_source_u32(cairo, nag->conf->details_border_color);
|
||||
cairo_rectangle(cairo, button->x, button->y,
|
||||
button->width, button->height);
|
||||
cairo_fill(cairo);
|
||||
|
|
@ -333,8 +333,8 @@ get_detailed_scroll_button_width(cairo_t *cairo, struct nag *nag)
|
|||
NULL, 1, true, "%s", nag->details.button_down.text);
|
||||
|
||||
int text_width = up_width > down_width ? up_width : down_width;
|
||||
int border = nag->conf->button_border_thickness;
|
||||
int padding = nag->conf->button_padding;
|
||||
int border = nag->conf->details_border_thickness;
|
||||
int padding = (nag->conf->button_padding / 3) + 2;
|
||||
|
||||
return text_width + border * 2 + padding * 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue