diff options
author | nokangaroo <[email protected]> | 2017-06-21 09:24:54 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-26 11:32:35 +0200 |
commit | d4b4d08300fe27dbb57ad10ba31a91c5cfd54781 (patch) | |
tree | 806ddb2bd2db03df6f4ce3dd3332683cb98d25a2 | |
parent | d3b66148f9b914fa0451508c6ddb075d0fab8fdb (diff) | |
download | caja-d4b4d08300fe27dbb57ad10ba31a91c5cfd54781.tar.bz2 caja-d4b4d08300fe27dbb57ad10ba31a91c5cfd54781.tar.xz |
Fix off-by-one error in 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); |