[macos] ASCCommonViewController: small refactor

This commit is contained in:
SimplestStudio
2025-12-30 16:00:35 +01:00
parent 9a64bce4f6
commit 80389df353

View File

@ -2002,12 +2002,8 @@
NSCefView * cefView = [[NSCefView alloc] initWithFrame:CGRectZero];
ASCTabActionType action = (ASCTabActionType)[tab.params[@"action"] intValue];
if (action == ASCTabActionOpenPortal) {
[cefView create:appManager withType:cvwtSimple];
} else {
[cefView create:appManager withType:cvwtEditor];
}
CefViewWrapperType type = (action == ASCTabActionOpenPortal) ? cvwtSimple : cvwtEditor;
[cefView create:appManager withType:type];
[cefView setBackgroundColor:[ASCThemesController currentThemeColor:windowBackgroundColor]];
[self.view.window makeKeyAndOrderFront:nil];