-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adopt WCO for Windows #147947
Merged
Merged
Adopt WCO for Windows #147947
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3aab8b1
add api to native host service
sbatten 624bcf3
get working on windows
sbatten 575775c
Merge branch 'main' into sbatten/wco
sbatten 0630086
switching machines
sbatten 46ed0a8
working on windows+web
sbatten 23fda1d
fix for macos
sbatten 2f958b5
fix initial window control colors
sbatten 6f1bbb6
address comments
sbatten d9430a2
add windows check for calling over to main process
sbatten 30adcaa
Merge branch 'main' into sbatten/wco
sbatten b42403b
:lipstick:
bpasero 1b1c7f1
merge conflict resolution
sbatten cbed29b
💄
sbatten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,27 +3,51 @@ | |
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container { | ||
/* Part Element */ | ||
.monaco-workbench .part.titlebar { | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.monaco-workbench.mac .part.titlebar { | ||
flex-direction: row-reverse; | ||
} | ||
|
||
/* Root Container */ | ||
.monaco-workbench .part.titlebar>.titlebar-container { | ||
box-sizing: border-box; | ||
width: 100%; | ||
padding: 0 70px; | ||
overflow: hidden; | ||
flex-shrink: 0; | ||
flex-shrink: 1; | ||
flex-grow: 1; | ||
align-items: center; | ||
justify-content: center; | ||
user-select: none; | ||
-webkit-user-select: none; | ||
zoom: 1; /* prevent zooming */ | ||
line-height: 22px; | ||
height: 22px; | ||
display: flex; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
/* Account for zooming */ | ||
.monaco-workbench .part.titlebar>.titlebar-container.counter-zoom { | ||
zoom: calc(1.0 / var(--zoom-factor)); | ||
} | ||
|
||
/* Platform specific root element */ | ||
.monaco-workbench.mac .part.titlebar>.titlebar-container { | ||
line-height: 22px; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container { | ||
transform-origin: 0 0; | ||
.monaco-workbench.web .part.titlebar>.titlebar-container, | ||
.monaco-workbench.windows .part.titlebar>.titlebar-container, | ||
.monaco-workbench.linux .part.titlebar>.titlebar-container { | ||
height: 30px; | ||
line-height: 30px; | ||
justify-content: left; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-drag-region { | ||
/* Draggable region */ | ||
.monaco-workbench .part.titlebar>.titlebar-container>.titlebar-drag-region { | ||
top: 0; | ||
left: 0; | ||
display: block; | ||
|
@@ -33,6 +57,7 @@ | |
-webkit-app-region: drag; | ||
} | ||
|
||
/* Command Center */ | ||
.monaco-workbench .part.titlebar>.titlebar-container>.title-menu .action-item.quickopen { | ||
color: var(--vscode-input-foreground); | ||
border: 1px solid var(--vscode-dropdown-border); | ||
|
@@ -67,83 +92,97 @@ | |
margin-left: auto; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-title { | ||
/* Window title text */ | ||
.monaco-workbench .part.titlebar>.titlebar-container>.window-title { | ||
flex: 0 1 auto; | ||
font-size: 12px; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
margin-left: auto; | ||
margin-right: auto; | ||
zoom: 1; /* prevent zooming */ | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container.enable-title-menu > .window-title { | ||
display: none; | ||
} | ||
|
||
/* Windows/Linux: Rules for custom title (icon, window controls) */ | ||
.monaco-workbench.web .part.titlebar > .titlebar-container, | ||
.monaco-workbench.windows .part.titlebar > .titlebar-container, | ||
.monaco-workbench.linux .part.titlebar > .titlebar-container { | ||
.monaco-workbench.web .part.titlebar>.titlebar-container, | ||
.monaco-workbench.windows .part.titlebar>.titlebar-container, | ||
.monaco-workbench.linux .part.titlebar>.titlebar-container { | ||
padding: 0; | ||
height: 30px; | ||
line-height: 30px; | ||
justify-content: left; | ||
overflow: visible; | ||
} | ||
|
||
.monaco-workbench.web .part.titlebar > .titlebar-container > .window-title, | ||
.monaco-workbench.windows .part.titlebar > .titlebar-container > .window-title, | ||
.monaco-workbench.linux .part.titlebar > .titlebar-container > .window-title { | ||
.monaco-workbench.web .part.titlebar>.titlebar-container>.window-title, | ||
.monaco-workbench.windows .part.titlebar>.titlebar-container>.window-title, | ||
.monaco-workbench.linux .part.titlebar>.titlebar-container>.window-title { | ||
cursor: default; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .menubar { | ||
/* move menubar above drag region as negative z-index on drag region cause greyscale AA */ | ||
z-index: 2500; | ||
.monaco-workbench .part.titlebar>.titlebar-container.enable-title-menu>.window-title { | ||
display: none; | ||
} | ||
|
||
.monaco-workbench.linux .part.titlebar > .titlebar-container > .window-title { | ||
.monaco-workbench.linux .part.titlebar>.titlebar-container>.window-title { | ||
font-size: inherit; | ||
/* see #55435 */ | ||
} | ||
|
||
/* Menubar */ | ||
.monaco-workbench .part.titlebar>.titlebar-container>.menubar { | ||
/* move menubar above drag region as negative z-index on drag region cause greyscale AA */ | ||
z-index: 2500; | ||
min-width: 36px; | ||
} | ||
|
||
.monaco-workbench.windows .part.titlebar > .titlebar-container > .resizer, | ||
.monaco-workbench.linux .part.titlebar > .titlebar-container > .resizer { | ||
/* Resizer */ | ||
.monaco-workbench.windows .part.titlebar>.titlebar-container>.resizer, | ||
.monaco-workbench.linux .part.titlebar>.titlebar-container>.resizer { | ||
-webkit-app-region: no-drag; | ||
position: absolute; | ||
top: 0; | ||
width: 100%; | ||
height: 4px; | ||
} | ||
|
||
.monaco-workbench.windows.fullscreen .part.titlebar > .titlebar-container > .resizer, | ||
.monaco-workbench.linux.fullscreen .part.titlebar > .titlebar-container > .resizer { | ||
.monaco-workbench.windows.fullscreen .part.titlebar>.titlebar-container>.resizer, | ||
.monaco-workbench.linux.fullscreen .part.titlebar>.titlebar-container>.resizer { | ||
display: none; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-appicon { | ||
/* App Icon */ | ||
.monaco-workbench .part.titlebar>.titlebar-container>.window-appicon { | ||
width: 35px; | ||
height: 100%; | ||
position: relative; | ||
z-index: 3000; | ||
flex-shrink: 0; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-appicon:not(.codicon) { | ||
.monaco-workbench .part.titlebar>.titlebar-container>.window-appicon:not(.codicon) { | ||
background-image: url('../../../media/code-icon.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center center; | ||
background-size: 16px; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container .window-appicon > .home-bar-icon-badge { | ||
.monaco-workbench .part.titlebar>.titlebar-container>.window-appicon.codicon { | ||
line-height: 30px; | ||
} | ||
|
||
.monaco-workbench.fullscreen .part.titlebar>.titlebar-container>.window-appicon { | ||
display: none; | ||
} | ||
|
||
.monaco-workbench .part.titlebar>.titlebar-container .window-appicon>.home-bar-icon-badge { | ||
position: absolute; | ||
right: 9px; | ||
bottom: 6px; | ||
width: 8px; | ||
height: 8px; | ||
z-index: 1; /* on top of home indicator */ | ||
z-index: 1; | ||
/* on top of home indicator */ | ||
background-image: url('../../../media/code-icon.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center center; | ||
|
@@ -153,90 +192,80 @@ | |
border-left: 1px solid transparent; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-appicon.codicon { | ||
line-height: 30px; | ||
} | ||
|
||
.monaco-workbench.fullscreen .part.titlebar > .titlebar-container > .window-appicon { | ||
display: none; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container { | ||
/* Window Controls (Minimize, Max/Restore, Close) */ | ||
.monaco-workbench .part.titlebar>.window-controls-container { | ||
display: flex; | ||
flex-grow: 0; | ||
flex-shrink: 0; | ||
text-align: center; | ||
position: relative; | ||
z-index: 3000; | ||
-webkit-app-region: no-drag; | ||
height: 100%; | ||
min-width: 138px; | ||
margin-left: auto; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container.show-layout-control { | ||
min-width: 160px; | ||
} | ||
|
||
.monaco-workbench.web .part.titlebar > .titlebar-container > .window-controls-container.show-layout-control { | ||
min-width: 28px; | ||
padding-right: 8px; | ||
} | ||
|
||
.monaco-workbench.mac:not(.web) .part.titlebar > .titlebar-container > .window-controls-container { | ||
position: absolute; | ||
right: 8px; | ||
min-width: 28px; | ||
display: none; | ||
height: 30px; | ||
width: 138px; | ||
zoom: calc(1 / var(--zoom-factor)); | ||
} | ||
|
||
.monaco-workbench.mac:not(.web) .part.titlebar > .titlebar-container > .window-controls-container.show-layout-control { | ||
display: flex; | ||
.monaco-workbench.mac .part.titlebar>.window-controls-container { | ||
width: 70px; | ||
height: env(titlebar-area-width, 28px); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder why this was added? Are we using WCO on macOS? |
||
} | ||
|
||
.monaco-workbench.fullscreen .part.titlebar > .titlebar-container > .window-controls-container { | ||
.monaco-workbench.web .part.titlebar>.window-controls-container, | ||
.monaco-workbench.fullscreen .part.titlebar>.window-controls-container { | ||
display: none; | ||
background-color: transparent; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container > .layout-dropdown-container { | ||
padding-right: 2px; | ||
display: none; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container.show-layout-control > .layout-dropdown-container { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.monaco-workbench:not(.mac):not(.web) .part.titlebar > .titlebar-container > .window-controls-container.show-layout-control > .layout-dropdown-container { | ||
min-width: 46px; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container.show-layout-control > .layout-dropdown-container .codicon { | ||
color: inherit; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container > .window-icon { | ||
/* Window Control Icons */ | ||
.monaco-workbench .part.titlebar>.window-controls-container>.window-icon { | ||
display: inline-block; | ||
line-height: 30px; | ||
height: 100%; | ||
width: 46px; | ||
font-size: 16px; | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container > .window-icon:hover { | ||
.monaco-workbench .part.titlebar>.window-controls-container>.window-icon:hover { | ||
background-color: rgba(255, 255, 255, 0.1); | ||
} | ||
|
||
.monaco-workbench .part.titlebar.light > .titlebar-container > .window-controls-container > .window-icon:hover { | ||
.monaco-workbench .part.titlebar.light>.window-controls-container>.window-icon:hover { | ||
background-color: rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container > .window-icon.window-close:hover { | ||
.monaco-workbench .part.titlebar>.window-controls-container>.window-icon.window-close:hover { | ||
background-color: rgba(232, 17, 35, 0.9); | ||
} | ||
|
||
.monaco-workbench .part.titlebar > .titlebar-container > .window-controls-container .window-icon.window-close:hover { | ||
.monaco-workbench .part.titlebar>.window-controls-container .window-icon.window-close:hover { | ||
color: white; | ||
} | ||
|
||
/* Layout Controls */ | ||
.monaco-workbench .part.titlebar>.titlebar-container>.layout-controls-container { | ||
display: none; | ||
padding-right: 2px; | ||
flex-grow: 0; | ||
flex-shrink: 0; | ||
text-align: center; | ||
position: relative; | ||
z-index: 3000; | ||
-webkit-app-region: no-drag; | ||
height: 100%; | ||
margin-left: auto; | ||
min-width: 28px; | ||
} | ||
|
||
.monaco-workbench.mac:not(.web) .part.titlebar>.layout-controls-container { | ||
position: absolute; | ||
right: 8px; | ||
} | ||
|
||
.monaco-workbench .part.titlebar>.titlebar-container>.layout-controls-container.show-layout-control { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.monaco-workbench .part.titlebar>.titlebar-container>.layout-controls-container .codicon { | ||
color: inherit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you changed the style here? We typically have whitespace around
>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some formatter I have has been doing this on occasion. and I just recently found that I had the setting which only applies this to changed regions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we revert that as part of
sbatten/outdoor-mosquito
maybe? I prefer the old style.