[metacity] libmetacity: correctly center button vertically
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] libmetacity: correctly center button vertically
- Date: Sun, 7 Feb 2016 20:37:35 +0000 (UTC)
commit c6b586dc2906a2d5e8ed1962ba5a654921670395
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Feb 7 22:03:26 2016 +0200
libmetacity: correctly center button vertically
libmetacity/meta-theme-gtk.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libmetacity/meta-theme-gtk.c b/libmetacity/meta-theme-gtk.c
index e1b9ee5..8546335 100644
--- a/libmetacity/meta-theme-gtk.c
+++ b/libmetacity/meta-theme-gtk.c
@@ -557,7 +557,7 @@ meta_theme_gtk_calc_geometry (MetaThemeImpl *impl,
content_width = width -
(fgeom->content_border.left + borders.invisible.left) -
(fgeom->content_border.right + borders.invisible.right);
- content_height = borders.visible.top - fgeom->content_border.top - fgeom->content_border.bottom;
+ content_height = borders.visible.top - layout->gtk.frame_border.top;
button_width = MAX ((gint) layout->gtk.icon_size, layout->gtk.button_min_size.width) +
layout->button_border.left + layout->button_border.right;
@@ -695,7 +695,7 @@ meta_theme_gtk_calc_geometry (MetaThemeImpl *impl,
/* center buttons vertically */
button_y = fgeom->content_border.top + borders.invisible.top +
- MAX(content_height - button_height, 0) / 2;
+ (content_height - button_height) / 2;
/* right edge of farthest-right button */
x = width - fgeom->content_border.right - borders.invisible.right;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]