mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[macos][rtl] fix touchbar 'new' items alignment
This commit is contained in:
@ -143,7 +143,7 @@ static NSTouchBarItemIdentifier const kNewItemsItemIdentifier = @"com.onlyoffice
|
||||
bar.customizationIdentifier = kScrubberCustomizationIdentifier;
|
||||
|
||||
// Set the default ordering of items.
|
||||
NSArray * items = !(_tabs.count > 0) ? @[kNewItemsItemIdentifier, NSTouchBarItemIdentifierOtherItemsProxy] :
|
||||
NSArray * items = !(_tabs.count > 0) ? @[kNewItemsItemIdentifier, NSTouchBarItemIdentifierOtherItemsProxy, NSTouchBarItemIdentifierFlexibleSpace] :
|
||||
@[kStartPageItemIdentifier, kScrubbedItemIdentifier, NSTouchBarItemIdentifierOtherItemsProxy];
|
||||
|
||||
if ([self.viewController.view userInterfaceLayoutDirection] == NSUserInterfaceLayoutDirectionRightToLeft) {
|
||||
@ -280,6 +280,8 @@ NSString *tabScrubberItemIdentifier = @"tabItem";
|
||||
customizationLabel:NSLocalizedStringWithDefaultValue(@"new-presentation", @"Localizable", [NSBundle mainBundle], @"New Presentation", nil)],
|
||||
];
|
||||
|
||||
if ([self.viewController.view userInterfaceLayoutDirection] == NSUserInterfaceLayoutDirectionRightToLeft)
|
||||
creationButtons = [[creationButtons reverseObjectEnumerator] allObjects];
|
||||
NSGroupTouchBarItem * createonGroup = [NSGroupTouchBarItem groupItemWithIdentifier:kNewItemsItemIdentifier items:creationButtons];
|
||||
return createonGroup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user