mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 20:49:13 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28885 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f43122287f
commit
54fad95e5b
1 changed files with 12 additions and 5 deletions
|
@ -106,6 +106,8 @@ static GSThemeInspector *sharedInspector = nil;
|
|||
NSTextField *tf;
|
||||
NSRect nameFrame;
|
||||
NSRect frame;
|
||||
int width;
|
||||
int fsize = 32;
|
||||
|
||||
while ((view = [[content subviews] lastObject]) != nil)
|
||||
{
|
||||
|
@ -116,12 +118,17 @@ static GSThemeInspector *sharedInspector = nil;
|
|||
[iv setImage: [[GSTheme theme] icon]];
|
||||
[content addSubview: iv];
|
||||
|
||||
width = cFrame.size.width - 58;
|
||||
tf = new_label([theme name]);
|
||||
[tf setFont: [NSFont boldSystemFontOfSize: 32]];
|
||||
[tf sizeToFit];
|
||||
nameFrame = [tf frame];
|
||||
nameFrame.origin.x
|
||||
= (cFrame.size.width - frame.size.width - nameFrame.size.width) / 2;
|
||||
do
|
||||
{
|
||||
[tf setFont: [NSFont boldSystemFontOfSize: fsize]];
|
||||
fsize -= 2;
|
||||
[tf sizeToFit];
|
||||
nameFrame = [tf frame];
|
||||
}
|
||||
while (nameFrame.size.width > width && fsize > 8);
|
||||
nameFrame.origin.x = (width - nameFrame.size.width) / 2;
|
||||
nameFrame.origin.y = cFrame.size.height - nameFrame.size.height - 25;
|
||||
[tf setFrame: nameFrame];
|
||||
[content addSubview: tf];
|
||||
|
|
Loading…
Reference in a new issue