mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 07:10:37 +00:00
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:
parent
8031e43fbc
commit
0ff0a07742
4 changed files with 47 additions and 4 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue