File tree 1 file changed +21
-5
lines changed
1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,31 @@ static void loadSymbols()
47
47
48
48
@implementation MMPreferenceController
49
49
50
+ - (void )windowDidLoad
51
+ {
52
+ #if DISABLE_SPARKLE
53
+ // If Sparkle is disabled in config, we don't want to show the preference pane
54
+ // which could be confusing as it won't do anything.
55
+ // After hiding the Sparkle subview, shorten the height of the General pane
56
+ // and move its other subviews down.
57
+ [sparkleUpdaterPane setHidden: YES ];
58
+ CGFloat sparkleHeight = NSHeight (sparkleUpdaterPane.frame );
59
+ NSRect frame = generalPreferences.frame ;
60
+ frame.size .height -= sparkleHeight;
61
+ generalPreferences.frame = frame;
62
+ for (NSView *subview in generalPreferences.subviews ) {
63
+ frame = subview.frame ;
64
+ frame.origin .y -= sparkleHeight;
65
+ subview.frame = frame;
66
+ }
67
+ #endif
68
+ [super windowDidLoad ];
69
+ }
70
+
50
71
- (IBAction )showWindow : (id )sender
51
72
{
52
73
[super setCrossFade: NO ];
53
74
[super showWindow: sender];
54
- #if DISABLE_SPARKLE
55
- // If Sparkle is disabled in config, we don't want to show the preference pane
56
- // which could be confusing as it won't do anything.
57
- [sparkleUpdaterPane setHidden: YES ];
58
- #endif
59
75
}
60
76
61
77
- (void )setupToolbar
You can’t perform that action at this time.
0 commit comments