Skip to content

Commit fe4cf05

Browse files
authored
Merge pull request #186 from kkeybbs/main
fixed issue #185
2 parents 4da0b3d + f26cbe8 commit fe4cf05

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

virtualization_view.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ - (void)hideOverlay
328328
static NSString *const PlayToolbarIdentifier = @"Play";
329329
static NSString *const PowerToolbarIdentifier = @"Power";
330330
static NSString *const SpaceToolbarIdentifier = @"Space";
331+
static NSString *const Space2ToolbarIdentifier = @"Space2";
331332

332333
- (NSArray<NSToolbarItemIdentifier> *)setupToolbarItemIdentifiers
333334
{
@@ -341,7 +342,7 @@ - (void)hideOverlay
341342
[toolbarItems addObject:PlayToolbarIdentifier];
342343
}
343344
if ([self canStopVirtualMachine] || [self canStartVirtualMachine]) {
344-
[toolbarItems addObject:SpaceToolbarIdentifier];
345+
[toolbarItems addObject:Space2ToolbarIdentifier];
345346
[toolbarItems addObject:PowerToolbarIdentifier];
346347
}
347348
}
@@ -495,6 +496,7 @@ - (NSWindow *)createMainWindowWithTitle:(NSString *)title
495496
PlayToolbarIdentifier,
496497
PauseToolbarIdentifier,
497498
SpaceToolbarIdentifier,
499+
Space2ToolbarIdentifier,
498500
PowerToolbarIdentifier,
499501
NSToolbarSpaceItemIdentifier,
500502
NSToolbarFlexibleSpaceItemIdentifier
@@ -536,7 +538,7 @@ - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSToolbar
536538
[item setView:zoomButton];
537539
[item setLabel:@"Zoom"];
538540
[item setToolTip:@"Toggle Zoom"];
539-
} else if ([itemIdentifier isEqualToString:SpaceToolbarIdentifier]) {
541+
} else if ([itemIdentifier isEqualToString:SpaceToolbarIdentifier] || [itemIdentifier isEqualToString:Space2ToolbarIdentifier]) {
540542
NSView *spaceView = [[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 2, 10)] autorelease];
541543
item.view = spaceView;
542544
item.minSize = NSMakeSize(1, 10);

0 commit comments

Comments
 (0)