mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 03:51:04 +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;
|
NSTextField *tf;
|
||||||
NSRect nameFrame;
|
NSRect nameFrame;
|
||||||
NSRect frame;
|
NSRect frame;
|
||||||
|
int width;
|
||||||
|
int fsize = 32;
|
||||||
|
|
||||||
while ((view = [[content subviews] lastObject]) != nil)
|
while ((view = [[content subviews] lastObject]) != nil)
|
||||||
{
|
{
|
||||||
|
@ -116,12 +118,17 @@ static GSThemeInspector *sharedInspector = nil;
|
||||||
[iv setImage: [[GSTheme theme] icon]];
|
[iv setImage: [[GSTheme theme] icon]];
|
||||||
[content addSubview: iv];
|
[content addSubview: iv];
|
||||||
|
|
||||||
|
width = cFrame.size.width - 58;
|
||||||
tf = new_label([theme name]);
|
tf = new_label([theme name]);
|
||||||
[tf setFont: [NSFont boldSystemFontOfSize: 32]];
|
do
|
||||||
[tf sizeToFit];
|
{
|
||||||
nameFrame = [tf frame];
|
[tf setFont: [NSFont boldSystemFontOfSize: fsize]];
|
||||||
nameFrame.origin.x
|
fsize -= 2;
|
||||||
= (cFrame.size.width - frame.size.width - nameFrame.size.width) / 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;
|
nameFrame.origin.y = cFrame.size.height - nameFrame.size.height - 25;
|
||||||
[tf setFrame: nameFrame];
|
[tf setFrame: nameFrame];
|
||||||
[content addSubview: tf];
|
[content addSubview: tf];
|
||||||
|
|
Loading…
Reference in a new issue