mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Use a button rather than a textfield to select theme panel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25783 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
93b0fa80e9
commit
aa79c640dc
1 changed files with 7 additions and 4 deletions
|
@ -185,7 +185,7 @@ new_label (NSString *value)
|
|||
NSTextField *urlLabel = nil;
|
||||
NSTextField *copyrightLabel;
|
||||
NSTextField *copyrightDescriptionLabel = nil;
|
||||
NSTextField *themeLabel = nil;
|
||||
NSButton *themeLabel = nil;
|
||||
NSFont *smallFont;
|
||||
|
||||
/* Minimum size we use for the panel */
|
||||
|
@ -407,8 +407,13 @@ new_label (NSString *value)
|
|||
|
||||
theme = [NSString stringWithFormat: @"%@: %@",
|
||||
_(@"Current theme"), [[GSTheme theme] name]];
|
||||
themeLabel = new_label (theme);
|
||||
themeLabel = AUTORELEASE([NSButton new]);
|
||||
[themeLabel setStringValue: theme];
|
||||
[themeLabel setBordered: NO];
|
||||
[themeLabel setAlignment: NSLeftTextAlignment];
|
||||
[themeLabel setFont: smallFont];
|
||||
[themeLabel setButtonType: NSMomentaryLightButton];
|
||||
[themeLabel setFocusRingType: NSFocusRingTypeNone];
|
||||
[themeLabel sizeToFit];
|
||||
|
||||
/*
|
||||
|
@ -615,11 +620,9 @@ new_label (NSString *value)
|
|||
f.origin.y = tmp_b - 25 - f.size.height;
|
||||
tmp_b = f.origin.y;
|
||||
[cv addSubview: themeLabel];
|
||||
[themeLabel setEnabled: YES];
|
||||
[themeLabel setFrame: f];
|
||||
[themeLabel setTarget: [GSTheme class]];
|
||||
[themeLabel setAction: @selector(orderFrontSharedThemePanel:)];
|
||||
[themeLabel sendActionOn: NSLeftMouseUpMask];
|
||||
|
||||
[self center];
|
||||
return self;
|
||||
|
|
Loading…
Reference in a new issue