diff options
author | nokangaroo <[email protected]> | 2017-06-21 09:24:54 +0200 |
---|---|---|
committer | nokangaroo <[email protected]> | 2017-06-21 09:24:54 +0200 |
commit | bd441d4c61d6e4e6c8e4987d0d2b4b995c815b14 (patch) | |
tree | ce419accdaae734b493e2bc3aad34506cdb8c625 /src/caja-pathbar.c | |
parent | 733549d24b45ee7cd433bfa5e0cab9adf36012f2 (diff) | |
download | caja-bd441d4c61d6e4e6c8e4987d0d2b4b995c815b14.tar.bz2 caja-bd441d4c61d6e4e6c8e4987d0d2b4b995c815b14.tar.xz |
Fix off-by-one error in caja-pathbar.c
Diffstat (limited to 'src/caja-pathbar.c')
-rw-r--r-- | src/caja-pathbar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c index bafd8e66..444a0b1e 100644 --- a/src/caja-pathbar.c +++ b/src/caja-pathbar.c @@ -1426,7 +1426,9 @@ set_label_padding_size (ButtonData *button_data) pango_layout_get_pixel_size (layout, &bold_width, &bold_height); pad_left = (bold_width - width) / 2; - pad_right = (bold_width - width) / 2; + pad_right = (bold_width + 1 - width) / 2; /* this ensures rounding up - the + pixel size difference between bold and normal fonts is not always even and + will give an off-by-one error when dividing by 2 */ gtk_widget_set_margin_start (GTK_WIDGET (button_data->label), pad_left); gtk_widget_set_margin_end (GTK_WIDGET (button_data->label), pad_right); |