fix: use actual FlexibleSpace toolbar item
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>14807</string>
|
<string>14811</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.news</string>
|
<string>public.app-category.news</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|||||||
@@ -16,15 +16,10 @@
|
|||||||
if (self) {
|
if (self) {
|
||||||
self.tabStyle = NSTabViewControllerTabStyleToolbar;
|
self.tabStyle = NSTabViewControllerTabStyleToolbar;
|
||||||
self.transitionOptions = NSViewControllerTransitionNone;
|
self.transitionOptions = NSViewControllerTransitionNone;
|
||||||
|
|
||||||
NSTabViewItem *flexibleWidth = [[NSTabViewItem alloc] initWithIdentifier:NSToolbarFlexibleSpaceItemIdentifier];
|
|
||||||
flexibleWidth.viewController = [NSViewController new];
|
|
||||||
|
|
||||||
self.tabViewItems = @[
|
self.tabViewItems = @[
|
||||||
TabItem(NSImageNamePreferencesGeneral, NSLocalizedString(@"General", nil), [SettingsGeneral class]),
|
TabItem(NSImageNamePreferencesGeneral, NSLocalizedString(@"General", nil), [SettingsGeneral class]),
|
||||||
TabItem(NSImageNameUserAccounts, NSLocalizedString(@"Feeds", nil), [SettingsFeeds class]),
|
TabItem(NSImageNameUserAccounts, NSLocalizedString(@"Feeds", nil), [SettingsFeeds class]),
|
||||||
TabItem(NSImageNameFontPanel, NSLocalizedString(@"Appearance", nil), [SettingsAppearance class]),
|
TabItem(NSImageNameFontPanel, NSLocalizedString(@"Appearance", nil), [SettingsAppearance class]),
|
||||||
flexibleWidth,
|
|
||||||
TabItem(NSImageNameInfo, NSLocalizedString(@"About", nil), [SettingsAbout class]),
|
TabItem(NSImageNameInfo, NSLocalizedString(@"About", nil), [SettingsAbout class]),
|
||||||
];
|
];
|
||||||
[self switchToTab: UserPrefsUInt(Pref_prefSelectedTab)];
|
[self switchToTab: UserPrefsUInt(Pref_prefSelectedTab)];
|
||||||
@@ -71,6 +66,8 @@ static inline NSTabViewItem* TabItem(NSImageName imageName, NSString *text, Clas
|
|||||||
w.windowController.shouldCascadeWindows = YES;
|
w.windowController.shouldCascadeWindows = YES;
|
||||||
w.title = [NSString stringWithFormat:NSLocalizedString(@"%@ Preferences", nil), NSProcessInfo.processInfo.processName];
|
w.title = [NSString stringWithFormat:NSLocalizedString(@"%@ Preferences", nil), NSProcessInfo.processInfo.processName];
|
||||||
w.contentViewController = [PrefTabs new];
|
w.contentViewController = [PrefTabs new];
|
||||||
|
[w.toolbar insertItemWithItemIdentifier:NSToolbarSpaceItemIdentifier atIndex:3];
|
||||||
|
[w.toolbar insertItemWithItemIdentifier:NSToolbarFlexibleSpaceItemIdentifier atIndex:4];
|
||||||
w.delegate = w;
|
w.delegate = w;
|
||||||
NSWindowPersistableFrameDescriptor prevFrame = UserPrefsString(Pref_prefWindowFrame);
|
NSWindowPersistableFrameDescriptor prevFrame = UserPrefsString(Pref_prefWindowFrame);
|
||||||
if (!prevFrame) {
|
if (!prevFrame) {
|
||||||
|
|||||||
Reference in New Issue
Block a user