diff options
author | Thomas Thurman <tthurman@gnome.org> | 2009-10-23 21:47:09 -0400 |
---|---|---|
committer | Thomas Thurman <tthurman@gnome.org> | 2009-10-23 21:47:09 -0400 |
commit | 52c81d64fde2f6e46675854c10b8278abb4a438b (patch) | |
tree | 54b326e527041f25d5ff485f554174b335329532 | |
parent | e11d66da7b09804efacbc7c9ee13e5a4c845b73c (diff) | |
download | metacity-52c81d64fde2f6e46675854c10b8278abb4a438b.tar.gz |
title shrinks as buttons are added
-rw-r--r-- | src/ui/theme.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c index 176cdb41..71e494dd 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -833,13 +833,19 @@ meta_theme_calc_geometry (MetaTheme *theme, for (i=0; i<MAX_BUTTONS_PER_CORNER; i++) { int button = button_layout->left_buttons[i]; + CopperClasses cc; if (button == META_BUTTON_FUNCTION_LAST) break; + cc = copper_class_for_button(button); + /* so allocate it */ - fgeom->areas[copper_class_for_button(button)].x = x; - x += fgeom->areas[copper_class_for_button(button)].width; + fgeom->areas[cc].x = x; + x += fgeom->areas[cc].width; + + fgeom->areas[CC_TITLE].x += fgeom->areas[cc].width; + fgeom->areas[CC_TITLE].width -= fgeom->areas[cc].width; } /* The right-hand side */ @@ -852,13 +858,18 @@ meta_theme_calc_geometry (MetaTheme *theme, for (i=0; i<MAX_BUTTONS_PER_CORNER; i++) { int button = button_layout->right_buttons[i]; + CopperClasses cc; if (button == META_BUTTON_FUNCTION_LAST) break; + cc = copper_class_for_button(button); + /* so allocate it */ x -= fgeom->areas[copper_class_for_button(button)].width; fgeom->areas[copper_class_for_button(button)].x = x; + + fgeom->areas[CC_TITLE].width -= fgeom->areas[cc].width; } /* Now find the ones we didn't use, and zero them out */ |