@@ -161,9 +161,13 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
161
161
get offset ( ) {
162
162
let top = 0 ;
163
163
let quickPickTop = 0 ;
164
+ if ( this . isVisible ( Parts . BANNER_PART ) ) {
165
+ top = this . getPart ( Parts . BANNER_PART ) . maximumHeight ;
166
+ quickPickTop = top ;
167
+ }
164
168
if ( this . isVisible ( Parts . TITLEBAR_PART ) ) {
165
- top = this . getPart ( Parts . TITLEBAR_PART ) . maximumHeight ;
166
- quickPickTop = this . titleService . isCommandCenterVisible ? 0 : top ;
169
+ top + = this . getPart ( Parts . TITLEBAR_PART ) . maximumHeight ;
170
+ quickPickTop = this . titleService . isCommandCenterVisible ? quickPickTop : top ;
167
171
}
168
172
return { top, quickPickTop } ;
169
173
}
@@ -1019,6 +1023,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
1019
1023
return ! this . stateModel . getRuntimeValue ( LayoutStateKeys . ACTIVITYBAR_HIDDEN ) ;
1020
1024
case Parts . EDITOR_PART :
1021
1025
return ! this . stateModel . getRuntimeValue ( LayoutStateKeys . EDITOR_HIDDEN ) ;
1026
+ case Parts . BANNER_PART :
1027
+ return this . workbenchGrid . isViewVisible ( this . bannerPartView ) ;
1022
1028
default :
1023
1029
return false ; // any other part cannot be hidden
1024
1030
}
@@ -1301,7 +1307,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
1301
1307
this . workbenchGrid = workbenchGrid ;
1302
1308
this . workbenchGrid . edgeSnapping = this . state . runtime . fullscreen ;
1303
1309
1304
- for ( const part of [ titleBar , editorPart , activityBar , panelPart , sideBar , statusBar , auxiliaryBarPart ] ) {
1310
+ for ( const part of [ titleBar , editorPart , activityBar , panelPart , sideBar , statusBar , auxiliaryBarPart , bannerPart ] ) {
1305
1311
this . _register ( part . onDidVisibilityChange ( ( visible ) => {
1306
1312
if ( part === sideBar ) {
1307
1313
this . setSideBarHidden ( ! visible , true ) ;
@@ -2096,6 +2102,21 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
2096
2102
const activityBarWidth = this . activityBarPartView . minimumWidth ;
2097
2103
const middleSectionHeight = height - titleBarHeight - statusBarHeight ;
2098
2104
2105
+ const titleAndBanner : ISerializedNode [ ] = [
2106
+ {
2107
+ type : 'leaf' ,
2108
+ data : { type : Parts . TITLEBAR_PART } ,
2109
+ size : titleBarHeight ,
2110
+ visible : this . isVisible ( Parts . TITLEBAR_PART )
2111
+ } ,
2112
+ {
2113
+ type : 'leaf' ,
2114
+ data : { type : Parts . BANNER_PART } ,
2115
+ size : bannerHeight ,
2116
+ visible : false
2117
+ }
2118
+ ] ;
2119
+
2099
2120
const activityBarNode : ISerializedLeafNode = {
2100
2121
type : 'leaf' ,
2101
2122
data : { type : Parts . ACTIVITYBAR_PART } ,
@@ -2145,18 +2166,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
2145
2166
type : 'branch' ,
2146
2167
size : width ,
2147
2168
data : [
2148
- {
2149
- type : 'leaf' ,
2150
- data : { type : Parts . TITLEBAR_PART } ,
2151
- size : titleBarHeight ,
2152
- visible : this . isVisible ( Parts . TITLEBAR_PART )
2153
- } ,
2154
- {
2155
- type : 'leaf' ,
2156
- data : { type : Parts . BANNER_PART } ,
2157
- size : bannerHeight ,
2158
- visible : false
2159
- } ,
2169
+ ...( isWeb ? titleAndBanner . reverse ( ) : titleAndBanner ) ,
2160
2170
{
2161
2171
type : 'branch' ,
2162
2172
data : middleSection ,
0 commit comments