Added methods to retrieve dimensions for titlebar buttons and padding dimensions in a theme specific way rather than having them hard-coded.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38681 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2015-06-25 18:18:41 +00:00
parent 8031e43fbc
commit 0ff0a07742
4 changed files with 47 additions and 4 deletions

View file

@ -108,15 +108,18 @@
}
if (hasCloseButton)
{
closeButtonRect = NSMakeRect(
[self bounds].size.width - 15 - 4, [self bounds].size.height - 15 - 4, 15, 15);
closeButtonRect = NSMakeRect([self bounds].size.width - [theme titlebarButtonSize] -
[theme titlebarPaddingRight], [self bounds].size.height -
[theme titlebarButtonSize] - [theme titlebarPaddingTop],
[theme titlebarButtonSize], [theme titlebarButtonSize]);
[closeButton setFrame: closeButtonRect];
}
if (hasMiniaturizeButton)
{
miniaturizeButtonRect = NSMakeRect(
4, [self bounds].size.height - 15 - 4, 15, 15);
miniaturizeButtonRect = NSMakeRect([theme titlebarPaddingLeft], [self bounds].size.height -
[theme titlebarButtonSize] - [theme titlebarPaddingTop],
[theme titlebarButtonSize], [theme titlebarButtonSize]);
[miniaturizeButton setFrame: miniaturizeButtonRect];
}
}