mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
display theme version in inspector.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27454 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0a18652108
commit
6df9e3a617
2 changed files with 18 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
* Source/GSInfoPanel.m:
|
||||
Update name of current theme when it changes.
|
||||
* Source/GSThemeInspector.m:
|
||||
Display theme version number.
|
||||
|
||||
2008-12-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -96,6 +96,7 @@ static GSThemeInspector *sharedInspector = nil;
|
|||
- (void) update: (id)sender
|
||||
{
|
||||
GSTheme *theme = [GSTheme theme];
|
||||
NSString *version;
|
||||
NSString *details;
|
||||
NSArray *authors;
|
||||
NSView *content = [self contentView];
|
||||
|
@ -125,6 +126,21 @@ static GSThemeInspector *sharedInspector = nil;
|
|||
[tf setFrame: nameFrame];
|
||||
[content addSubview: tf];
|
||||
|
||||
version = [[theme infoDictionary] objectForKey: @"GSThemeVersion"];
|
||||
if ([version length] > 0)
|
||||
{
|
||||
version = [NSString stringWithFormat: @"Version: %@", version];
|
||||
tf = new_label(version);
|
||||
[tf setFont: [NSFont systemFontOfSize: 12]];
|
||||
[tf sizeToFit];
|
||||
frame = [tf frame];
|
||||
frame.origin.x = (cFrame.size.width - frame.size.width) / 2;
|
||||
frame.origin.y = nameFrame.origin.y - frame.size.height - 25;
|
||||
[tf setFrame: frame];
|
||||
[content addSubview: tf];
|
||||
nameFrame = [tf frame];
|
||||
}
|
||||
|
||||
authors = [[theme infoDictionary] objectForKey: @"GSThemeAuthors"];
|
||||
if ([authors count] > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue