diff options
author | 2018-09-08 09:19:47 -0400 | |
---|---|---|
committer | 2018-09-08 09:19:47 -0400 | |
commit | 3600b3db577298bc553c394a4b09e71163f76561 (patch) | |
tree | a1defcadae4b1d07388fd9e6bfe2a09051aec777 /swaynag/render.c | |
parent | Merge pull request #2603 from emersion/fix-dnd (diff) | |
parent | Align titles to baseline (diff) | |
download | sway-3600b3db577298bc553c394a4b09e71163f76561.tar.gz sway-3600b3db577298bc553c394a4b09e71163f76561.tar.zst sway-3600b3db577298bc553c394a4b09e71163f76561.zip |
Merge pull request #2602 from RyanDwyer/fix-title-textures
Fix gaps in title textures and vertically center them
Diffstat (limited to 'swaynag/render.c')
-rw-r--r-- | swaynag/render.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/swaynag/render.c b/swaynag/render.c index 766409e4..7db9fe60 100644 --- a/swaynag/render.c +++ b/swaynag/render.c | |||
@@ -12,7 +12,7 @@ static uint32_t render_message(cairo_t *cairo, struct swaynag *swaynag) { | |||
12 | height -= swaynag->type->bar_border_thickness * swaynag->scale; | 12 | height -= swaynag->type->bar_border_thickness * swaynag->scale; |
13 | 13 | ||
14 | int text_width, text_height; | 14 | int text_width, text_height; |
15 | get_text_size(cairo, swaynag->type->font, &text_width, &text_height, | 15 | get_text_size(cairo, swaynag->type->font, &text_width, &text_height, NULL, |
16 | swaynag->scale, true, "%s", swaynag->message); | 16 | swaynag->scale, true, "%s", swaynag->message); |
17 | 17 | ||
18 | int padding = swaynag->type->message_padding * swaynag->scale; | 18 | int padding = swaynag->type->message_padding * swaynag->scale; |
@@ -34,7 +34,7 @@ static uint32_t render_message(cairo_t *cairo, struct swaynag *swaynag) { | |||
34 | static void render_details_scroll_button(cairo_t *cairo, | 34 | static void render_details_scroll_button(cairo_t *cairo, |
35 | struct swaynag *swaynag, struct swaynag_button *button) { | 35 | struct swaynag *swaynag, struct swaynag_button *button) { |
36 | int text_width, text_height; | 36 | int text_width, text_height; |
37 | get_text_size(cairo, swaynag->type->font, &text_width, &text_height, | 37 | get_text_size(cairo, swaynag->type->font, &text_width, &text_height, NULL, |
38 | swaynag->scale, true, "%s", button->text); | 38 | swaynag->scale, true, "%s", button->text); |
39 | 39 | ||
40 | int border = swaynag->type->button_border_thickness * swaynag->scale; | 40 | int border = swaynag->type->button_border_thickness * swaynag->scale; |
@@ -60,10 +60,10 @@ static void render_details_scroll_button(cairo_t *cairo, | |||
60 | static int get_detailed_scroll_button_width(cairo_t *cairo, | 60 | static int get_detailed_scroll_button_width(cairo_t *cairo, |
61 | struct swaynag *swaynag) { | 61 | struct swaynag *swaynag) { |
62 | int up_width, down_width, temp_height; | 62 | int up_width, down_width, temp_height; |
63 | get_text_size(cairo, swaynag->type->font, &up_width, &temp_height, | 63 | get_text_size(cairo, swaynag->type->font, &up_width, &temp_height, NULL, |
64 | swaynag->scale, true, | 64 | swaynag->scale, true, |
65 | "%s", swaynag->details.button_up.text); | 65 | "%s", swaynag->details.button_up.text); |
66 | get_text_size(cairo, swaynag->type->font, &down_width, &temp_height, | 66 | get_text_size(cairo, swaynag->type->font, &down_width, &temp_height, NULL, |
67 | swaynag->scale, true, | 67 | swaynag->scale, true, |
68 | "%s", swaynag->details.button_down.text); | 68 | "%s", swaynag->details.button_down.text); |
69 | 69 | ||
@@ -179,7 +179,7 @@ static uint32_t render_button(cairo_t *cairo, struct swaynag *swaynag, | |||
179 | struct swaynag_button *button = swaynag->buttons->items[button_index]; | 179 | struct swaynag_button *button = swaynag->buttons->items[button_index]; |
180 | 180 | ||
181 | int text_width, text_height; | 181 | int text_width, text_height; |
182 | get_text_size(cairo, swaynag->type->font, &text_width, &text_height, | 182 | get_text_size(cairo, swaynag->type->font, &text_width, &text_height, NULL, |
183 | swaynag->scale, true, "%s", button->text); | 183 | swaynag->scale, true, "%s", button->text); |
184 | 184 | ||
185 | int border = swaynag->type->button_border_thickness * swaynag->scale; | 185 | int border = swaynag->type->button_border_thickness * swaynag->scale; |