提交 e7c13723 编写于 作者: B Benjamin Pasero 提交者: SteVen Batten

lcd - revert layer promotion for now (#86396)

* lcd - revert layer promotion for now

* Revert "Fix #86347. Fixed overflow widget only for extension viewlet"

This reverts commit beb8a0c7.

* Revert "Re #85313. Fix suggest widget position for extension editor."

This reverts commit 9d471918.

* repatch titlebar for AA fix
上级 1beea2f8
...@@ -8,11 +8,6 @@ ...@@ -8,11 +8,6 @@
overflow: hidden; overflow: hidden;
} }
.monaco-workbench.windows.chromium .part:focus-within,
.monaco-workbench.linux.chromium .part:focus-within {
z-index: 500;
}
.monaco-workbench .part > .title { .monaco-workbench .part > .title {
display: none; /* Parts have to opt in to show title area */ display: none; /* Parts have to opt in to show title area */
} }
......
...@@ -7,22 +7,6 @@ ...@@ -7,22 +7,6 @@
width: 48px; width: 48px;
} }
.monaco-workbench.windows.chromium .part.activitybar,
.monaco-workbench.linux.chromium .part.activitybar {
/*
* Explicitly put the part onto its own layer to help Chrome to
* render the content with LCD-anti-aliasing. By partioning the
* workbench into multiple layers, we can ensure that a bad
* behaving part is not making another part fallback to greyscale
* rendering.
*
* macOS: does not render LCD-anti-aliased.
*/
transform: translate3d(0px, 0px, 0px);
overflow: visible; /* when a new layer is created, we need to set overflow visible to avoid clipping the menubar */
position: relative;
}
.monaco-workbench .activitybar > .content { .monaco-workbench .activitybar > .content {
height: 100%; height: 100%;
display: flex; display: flex;
......
...@@ -48,20 +48,6 @@ ...@@ -48,20 +48,6 @@
overflow: hidden; overflow: hidden;
} }
.monaco-workbench.windows.chromium .part.editor > .content .editor-group-container > .title,
.monaco-workbench.linux.chromium .part.editor > .content .editor-group-container > .title {
/*
* Explicitly put the part onto its own layer to help Chrome to
* render the content with LCD-anti-aliasing. By partioning the
* workbench into multiple layers, we can ensure that a bad
* behaving part is not making another part fallback to greyscale
* rendering.
*
* macOS: does not render LCD-anti-aliased.
*/
transform: translate3d(0px, 0px, 0px);
}
.monaco-workbench .part.editor > .content .editor-group-container > .title:not(.tabs) { .monaco-workbench .part.editor > .content .editor-group-container > .title:not(.tabs) {
display: flex; /* when tabs are not shown, use flex layout */ display: flex; /* when tabs are not shown, use flex layout */
flex-wrap: nowrap; flex-wrap: nowrap;
......
...@@ -12,20 +12,6 @@ ...@@ -12,20 +12,6 @@
z-index: initial; z-index: initial;
} }
.monaco-workbench.windows.chromium .part.panel,
.monaco-workbench.linux.chromium .part.panel {
/*
* Explicitly put the part onto its own layer to help Chrome to
* render the content with LCD-anti-aliasing. By partioning the
* workbench into multiple layers, we can ensure that a bad
* behaving part is not making another part fallback to greyscale
* rendering.
*
* macOS: does not render LCD-anti-aliased.
*/
transform: translate3d(0px, 0px, 0px);
}
.monaco-workbench .part.panel .title { .monaco-workbench .part.panel .title {
height: 35px; height: 35px;
display: flex; display: flex;
...@@ -114,7 +100,7 @@ ...@@ -114,7 +100,7 @@
text-align: center; text-align: center;
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
} }
/** Actions */ /** Actions */
......
...@@ -3,20 +3,8 @@ ...@@ -3,20 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
.monaco-workbench.windows.chromium .part.sidebar, .monaco-workbench .sidebar > .content {
.monaco-workbench.linux.chromium .part.sidebar { overflow: hidden;
/*
* Explicitly put the part onto its own layer to help Chrome to
* render the content with LCD-anti-aliasing. By partioning the
* workbench into multiple layers, we can ensure that a bad
* behaving part is not making another part fallback to greyscale
* rendering.
*
* macOS: does not render LCD-anti-aliased.
*/
transform: translate3d(0px, 0px, 0px);
overflow: visible;
position: relative;
} }
.monaco-workbench.nosidebar > .part.sidebar { .monaco-workbench.nosidebar > .part.sidebar {
......
...@@ -13,20 +13,6 @@ ...@@ -13,20 +13,6 @@
overflow: visible; overflow: visible;
} }
.monaco-workbench.windows.chromium .part.statusbar,
.monaco-workbench.linux.chromium .part.statusbar {
/*
* Explicitly put the part onto its own layer to help Chrome to
* render the content with LCD-anti-aliasing. By partioning the
* workbench into multiple layers, we can ensure that a bad
* behaving part is not making another part fallback to greyscale
* rendering.
*
* macOS: does not render LCD-anti-aliased.
*/
transform: translate3d(0px, 0px, 0px);
}
.monaco-workbench .part.statusbar.status-border-top::after { .monaco-workbench .part.statusbar.status-border-top::after {
content: ''; content: '';
position: absolute; position: absolute;
......
...@@ -19,22 +19,6 @@ ...@@ -19,22 +19,6 @@
display: flex; display: flex;
} }
.monaco-workbench.windows .part.titlebar,
.monaco-workbench.linux .part.titlebar {
/*
* Explicitly put the part onto its own layer to help Chrome to
* render the content with LCD-anti-aliasing. By partioning the
* workbench into multiple layers, we can ensure that a bad
* behaving part is not making another part fallback to greyscale
* rendering.
*
* macOS: does not render LCD-anti-aliased.
*/
transform: translate3d(0px, 0px, 0px);
position: relative;
z-index: 1500 !important; /* move the entire titlebar above the workbench, except modals/dialogs */
}
.monaco-workbench .part.titlebar > .titlebar-drag-region { .monaco-workbench .part.titlebar > .titlebar-drag-region {
top: 0; top: 0;
left: 0; left: 0;
...@@ -45,11 +29,6 @@ ...@@ -45,11 +29,6 @@
-webkit-app-region: drag; -webkit-app-region: drag;
} }
.monaco-workbench .part.titlebar > .menubar {
/* Move above drag region since negative z-index on that element causes AA issues */
z-index: 1;
}
.monaco-workbench .part.titlebar > .window-title { .monaco-workbench .part.titlebar > .window-title {
flex: 0 1 auto; flex: 0 1 auto;
font-size: 12px; font-size: 12px;
...@@ -78,6 +57,11 @@ ...@@ -78,6 +57,11 @@
cursor: default; cursor: default;
} }
.monaco-workbench .part.titlebar > .menubar {
/* move menubar above drag region as negative z-index on drag region cause greyscale AA */
z-index: 2000;
}
.monaco-workbench.linux .part.titlebar > .window-title { .monaco-workbench.linux .part.titlebar > .window-title {
font-size: inherit; font-size: inherit;
} }
...@@ -100,7 +84,7 @@ ...@@ -100,7 +84,7 @@
width: 35px; width: 35px;
height: 100%; height: 100%;
position: relative; position: relative;
z-index: 2; /* highest level of titlebar */ z-index: 3000;
background-image: url('code-icon.svg'); background-image: url('code-icon.svg');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;
...@@ -118,12 +102,11 @@ ...@@ -118,12 +102,11 @@
flex-shrink: 0; flex-shrink: 0;
text-align: center; text-align: center;
position: relative; position: relative;
z-index: 2; /* highest level of titlebar */ z-index: 3000;
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
height: 100%; height: 100%;
width: 138px; width: 138px;
margin-left: auto; margin-left: auto;
transform: translate3d(0px, 0px, 0px);
} }
.monaco-workbench.fullscreen .part.titlebar > .window-controls-container { .monaco-workbench.fullscreen .part.titlebar > .window-controls-container {
......
...@@ -13,7 +13,7 @@ import { SelectionClipboardContributionID } from 'vs/workbench/contrib/codeEdito ...@@ -13,7 +13,7 @@ import { SelectionClipboardContributionID } from 'vs/workbench/contrib/codeEdito
import { TabCompletionController } from 'vs/workbench/contrib/snippets/browser/tabCompletion'; import { TabCompletionController } from 'vs/workbench/contrib/snippets/browser/tabCompletion';
import { EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions'; import { EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions';
export function getSimpleEditorOptions(fixedOverflowWidgets: boolean = true): IEditorOptions { export function getSimpleEditorOptions(): IEditorOptions {
return { return {
wordWrap: 'on', wordWrap: 'on',
overviewRulerLanes: 0, overviewRulerLanes: 0,
...@@ -30,7 +30,7 @@ export function getSimpleEditorOptions(fixedOverflowWidgets: boolean = true): IE ...@@ -30,7 +30,7 @@ export function getSimpleEditorOptions(fixedOverflowWidgets: boolean = true): IE
overviewRulerBorder: false, overviewRulerBorder: false,
scrollBeyondLastLine: false, scrollBeyondLastLine: false,
renderLineHighlight: 'none', renderLineHighlight: 'none',
fixedOverflowWidgets: fixedOverflowWidgets, fixedOverflowWidgets: true,
acceptSuggestionOnEnter: 'smart', acceptSuggestionOnEnter: 'smart',
minimap: { minimap: {
enabled: false enabled: false
......
...@@ -72,7 +72,6 @@ interface SuggestEnabledInputOptions { ...@@ -72,7 +72,6 @@ interface SuggestEnabledInputOptions {
* Context key tracking the focus state of this element * Context key tracking the focus state of this element
*/ */
focusContextKey?: IContextKey<boolean>; focusContextKey?: IContextKey<boolean>;
fixedOverflowWidgets?: boolean;
} }
export interface ISuggestEnabledInputStyleOverrides extends IStyleOverrides { export interface ISuggestEnabledInputStyleOverrides extends IStyleOverrides {
...@@ -127,7 +126,7 @@ export class SuggestEnabledInput extends Widget implements IThemable { ...@@ -127,7 +126,7 @@ export class SuggestEnabledInput extends Widget implements IThemable {
this.placeholderText = append(this.stylingContainer, $('.suggest-input-placeholder', undefined, options.placeholderText || '')); this.placeholderText = append(this.stylingContainer, $('.suggest-input-placeholder', undefined, options.placeholderText || ''));
const editorOptions: IEditorOptions = mixin( const editorOptions: IEditorOptions = mixin(
getSimpleEditorOptions(!!options.fixedOverflowWidgets), getSimpleEditorOptions(),
getSuggestEnabledInputOptions(ariaLabel)); getSuggestEnabledInputOptions(ariaLabel));
this.inputWidget = instantiationService.createInstance(CodeEditorWidget, this.stylingContainer, this.inputWidget = instantiationService.createInstance(CodeEditorWidget, this.stylingContainer,
......
...@@ -405,7 +405,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio ...@@ -405,7 +405,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio
else { return 'd'; } else { return 'd'; }
}, },
provideResults: (query: string) => Query.suggestions(query) provideResults: (query: string) => Query.suggestions(query)
}, placeholder, 'extensions:searchinput', { placeholderText: placeholder, value: searchValue, fixedOverflowWidgets: false })); }, placeholder, 'extensions:searchinput', { placeholderText: placeholder, value: searchValue }));
if (this.searchBox.getValue()) { if (this.searchBox.getValue()) {
this.triggerSearch(); this.triggerSearch();
......
...@@ -406,7 +406,6 @@ export class SettingsEditor2 extends BaseEditor { ...@@ -406,7 +406,6 @@ export class SettingsEditor2 extends BaseEditor {
}, searchBoxLabel, 'settingseditor:searchinput' + SettingsEditor2.NUM_INSTANCES++, { }, searchBoxLabel, 'settingseditor:searchinput' + SettingsEditor2.NUM_INSTANCES++, {
placeholderText: searchBoxLabel, placeholderText: searchBoxLabel,
focusContextKey: this.searchFocusContextKey, focusContextKey: this.searchFocusContextKey,
fixedOverflowWidgets: true
// TODO: Aria-live // TODO: Aria-live
}) })
); );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册