Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0e409ed1
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0e409ed1
编写于
3月 07, 2019
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - simplify part layout
上级
1924c391
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
57 addition
and
113 deletion
+57
-113
src/vs/workbench/browser/legacyLayout.ts
src/vs/workbench/browser/legacyLayout.ts
+5
-5
src/vs/workbench/browser/part.ts
src/vs/workbench/browser/part.ts
+11
-12
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+6
-19
src/vs/workbench/browser/parts/compositePart.ts
src/vs/workbench/browser/parts/compositePart.ts
+4
-11
src/vs/workbench/browser/parts/editor/editorPart.ts
src/vs/workbench/browser/parts/editor/editorPart.ts
+7
-10
src/vs/workbench/browser/parts/panel/panelPart.ts
src/vs/workbench/browser/parts/panel/panelPart.ts
+7
-16
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
+6
-15
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
+6
-11
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
+5
-14
未找到文件。
src/vs/workbench/browser/legacyLayout.ts
浏览文件 @
0e409ed1
...
...
@@ -631,11 +631,11 @@ export class WorkbenchLegacyLayout extends Disposable implements IVerticalSashLa
}
// Propagate to Part Layouts
this
.
parts
.
titlebar
.
layout
(
new
Dimension
(
this
.
workbenchSize
.
width
,
this
.
titlebarHeight
)
);
this
.
parts
.
editor
.
layout
(
new
Dimension
(
editorSize
.
width
,
editorSize
.
height
)
);
this
.
parts
.
sidebar
.
layout
(
sidebarSize
);
this
.
parts
.
panel
.
layout
(
panelDimension
);
this
.
parts
.
activitybar
.
layout
(
activityBarSize
);
this
.
parts
.
titlebar
.
layout
(
this
.
workbenchSize
.
width
,
this
.
titlebarHeight
);
this
.
parts
.
editor
.
layout
(
editorSize
.
width
,
editorSize
.
height
);
this
.
parts
.
sidebar
.
layout
(
sidebarSize
.
width
,
sidebarSize
.
height
);
this
.
parts
.
panel
.
layout
(
panelDimension
.
width
,
panelDimension
.
height
);
this
.
parts
.
activitybar
.
layout
(
activityBarSize
.
width
,
activityBarSize
.
height
);
// Propagate to Context View
this
.
contextViewService
.
layout
();
...
...
src/vs/workbench/browser/part.ts
浏览文件 @
0e409ed1
...
...
@@ -8,12 +8,18 @@ import { Component } from 'vs/workbench/common/component';
import
{
IThemeService
,
ITheme
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
Dimension
,
size
}
from
'
vs/base/browser/dom
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IDimension
}
from
'
vs/platform/layout/browser/layoutService
'
;
export
interface
IPartOptions
{
hasTitle
?:
boolean
;
borderWidth
?:
()
=>
number
;
}
export
interface
ILayoutContentResult
{
titleSize
:
IDimension
;
contentSize
:
IDimension
;
}
/**
* Parts are layed out in the workbench and have their own layout that
* arranges an optional title and mandatory content area to show content.
...
...
@@ -95,22 +101,18 @@ export abstract class Part extends Component {
/**
* Layout title and content area in the given dimension.
*/
layout
(
dimension
:
Dimension
):
Dimension
[]
{
return
this
.
partLayout
.
layout
(
dimension
);
protected
layoutContents
(
width
:
number
,
height
:
number
):
ILayoutContentResult
{
return
this
.
partLayout
.
layout
(
width
,
height
);
}
}
export
class
PartLayout
{
class
PartLayout
{
private
static
readonly
TITLE_HEIGHT
=
35
;
constructor
(
container
:
HTMLElement
,
private
options
:
IPartOptions
,
titleArea
:
HTMLElement
|
null
,
private
contentArea
:
HTMLElement
|
null
)
{
}
layout
(
dimension
:
Dimension
):
Dimension
[]
{
const
{
width
,
height
}
=
dimension
;
// Return the applied sizes to title and content
const
sizes
:
Dimension
[]
=
[];
layout
(
width
:
number
,
height
:
number
):
ILayoutContentResult
{
// Title Size: Width (Fill), Height (Variable)
let
titleSize
:
Dimension
;
...
...
@@ -127,14 +129,11 @@ export class PartLayout {
contentSize
.
width
-=
this
.
options
.
borderWidth
();
// adjust for border size
}
sizes
.
push
(
titleSize
);
sizes
.
push
(
contentSize
);
// Content
if
(
this
.
contentArea
)
{
size
(
this
.
contentArea
,
contentSize
.
width
,
contentSize
.
height
);
}
return
sizes
;
return
{
titleSize
,
contentSize
}
;
}
}
\ No newline at end of file
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
0e409ed1
...
...
@@ -60,8 +60,6 @@ export class ActivitybarPart extends Part implements ISerializableView {
private
_onDidChange
=
this
.
_register
(
new
Emitter
<
{
width
:
number
;
height
:
number
;
}
>
());
get
onDidChange
():
Event
<
{
width
:
number
,
height
:
number
}
>
{
return
this
.
_onDidChange
.
event
;
}
private
dimension
:
Dimension
;
private
globalActionBar
:
ActionBar
;
private
globalActivityIdToActions
:
{
[
globalActivityId
:
string
]:
GlobalActivityAction
;
}
=
Object
.
create
(
null
);
...
...
@@ -364,31 +362,20 @@ export class ActivitybarPart extends Part implements ISerializableView {
.
map
(
v
=>
v
.
id
);
}
layout
(
dimension
:
Dimension
):
Dimension
[];
layout
(
width
:
number
,
height
:
number
):
void
;
layout
(
dim1
:
Dimension
|
number
,
dim2
?:
number
):
Dimension
[]
|
void
{
layout
(
width
:
number
,
height
:
number
):
void
{
if
(
!
this
.
layoutService
.
isVisible
(
Parts
.
ACTIVITYBAR_PART
))
{
if
(
dim1
instanceof
Dimension
)
{
return
[
dim1
];
}
return
;
}
//
Pass to super
const
sizes
=
super
.
layout
(
dim1
instanceof
Dimension
?
dim1
:
new
Dimension
(
dim1
,
dim2
!
))
;
//
Layout contents
const
contentAreaSize
=
super
.
layoutContents
(
width
,
height
).
contentSize
;
this
.
dimension
=
sizes
[
1
];
let
availableHeight
=
this
.
dimension
.
height
;
// Layout composite bar
let
availableHeight
=
contentAreaSize
.
height
;
if
(
this
.
globalActionBar
)
{
availableHeight
-=
(
this
.
globalActionBar
.
items
.
length
*
ActivitybarPart
.
ACTION_HEIGHT
);
// adjust height for global actions showing
}
this
.
compositeBar
.
layout
(
new
Dimension
(
dim1
instanceof
Dimension
?
dim1
.
width
:
dim1
,
availableHeight
));
if
(
dim1
instanceof
Dimension
)
{
return
sizes
;
}
this
.
compositeBar
.
layout
(
new
Dimension
(
width
,
availableHeight
));
}
private
onDidStorageChange
(
e
:
IWorkspaceStorageChangeEvent
):
void
{
...
...
src/vs/workbench/browser/parts/compositePart.ts
浏览文件 @
0e409ed1
...
...
@@ -466,22 +466,15 @@ export abstract class CompositePart<T extends Composite> extends Part {
return
AnchorAlignment
.
RIGHT
;
}
layout
(
dimension
:
Dimension
):
Dimension
[];
layout
(
width
:
number
,
height
:
number
):
void
;
layout
(
dim1
:
Dimension
|
number
,
dim2
?:
number
):
Dimension
[]
|
void
{
layout
(
width
:
number
,
height
:
number
):
void
{
//
Pass to super
const
sizes
=
super
.
layout
(
dim1
instanceof
Dimension
?
dim1
:
new
Dimension
(
dim1
,
dim2
!
))
;
//
Layout contents
this
.
contentAreaSize
=
super
.
layoutContents
(
width
,
height
).
contentSize
;
// Pass Contentsize to composite
this
.
contentAreaSize
=
sizes
[
1
];
// Layout composite
if
(
this
.
activeComposite
)
{
this
.
activeComposite
.
layout
(
this
.
contentAreaSize
);
}
if
(
dim1
instanceof
Dimension
)
{
return
sizes
;
}
}
protected
removeComposite
(
compositeId
:
string
):
boolean
{
...
...
src/vs/workbench/browser/parts/editor/editorPart.ts
浏览文件 @
0e409ed1
...
...
@@ -10,7 +10,7 @@ import { Dimension, isAncestor, toggleClass, addClass, $ } from 'vs/base/browser
import
{
Event
,
Emitter
,
Relay
}
from
'
vs/base/common/event
'
;
import
{
contrastBorder
,
editorBackground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
GroupDirection
,
IAddGroupOptions
,
GroupsArrangement
,
GroupOrientation
,
IMergeGroupOptions
,
MergeGroupMode
,
ICopyEditorOptions
,
GroupsOrder
,
GroupChangeKind
,
GroupLocation
,
IFindGroupScope
,
EditorGroupLayout
,
GroupLayoutArgument
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
Direction
,
SerializableGrid
,
Sizing
,
ISerializedGrid
,
Orientation
,
GridBranchNode
,
isGridBranchNode
,
GridNode
,
createSerializedGrid
,
Grid
,
ISerializableView
}
from
'
vs/base/browser/ui/grid/grid
'
;
import
{
GroupIdentifier
,
IWorkbenchEditorConfiguration
}
from
'
vs/workbench/common/editor
'
;
import
{
values
}
from
'
vs/base/common/map
'
;
...
...
@@ -81,7 +81,7 @@ class GridWidgetView<T extends IView> implements IView {
export
class
EditorPart
extends
Part
implements
EditorGroupsServiceImpl
,
IEditorGroupsAccessor
,
ISerializableView
{
_serviceBrand
:
any
;
_serviceBrand
:
ServiceIdentifier
<
any
>
;
private
static
readonly
EDITOR_PART_UI_STATE_STORAGE_KEY
=
'
editorpart.state
'
;
private
static
readonly
EDITOR_PART_CENTERED_VIEW_STORAGE_KEY
=
'
editorpart.centeredview
'
;
...
...
@@ -958,16 +958,13 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
return
this
.
groupViews
.
size
===
1
&&
this
.
_activeGroup
.
isEmpty
();
}
layout
(
dimension
:
Dimension
):
Dimension
[];
layout
(
width
:
number
,
height
:
number
):
void
;
layout
(
dim1
:
Dimension
|
number
,
dim2
?:
number
):
Dimension
[]
|
void
{
const
sizes
=
super
.
layout
(
dim1
instanceof
Dimension
?
dim1
:
new
Dimension
(
dim1
,
dim2
));
layout
(
width
:
number
,
height
:
number
):
void
{
this
.
doLayout
(
sizes
[
1
]);
// Layout contents
const
contentAreaSize
=
super
.
layoutContents
(
width
,
height
).
contentSize
;
if
(
dim1
instanceof
Dimension
)
{
return
sizes
;
}
// Layout editor container
this
.
doLayout
(
contentAreaSize
);
}
private
doLayout
(
dimension
:
Dimension
):
void
{
...
...
src/vs/workbench/browser/parts/panel/panelPart.ts
浏览文件 @
0e409ed1
...
...
@@ -17,7 +17,7 @@ import { IStorageService, StorageScope, IWorkspaceStorageChangeEvent } from 'vs/
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ClosePanelAction
,
TogglePanelPositionAction
,
PanelActivityAction
,
ToggleMaximizedPanelAction
,
TogglePanelAction
}
from
'
vs/workbench/browser/parts/panel/panelActions
'
;
import
{
IThemeService
,
registerThemingParticipant
,
ITheme
,
ICssStyleCollector
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
PANEL_BACKGROUND
,
PANEL_BORDER
,
PANEL_ACTIVE_TITLE_FOREGROUND
,
PANEL_INACTIVE_TITLE_FOREGROUND
,
PANEL_ACTIVE_TITLE_BORDER
,
PANEL_DRAG_AND_DROP_BACKGROUND
}
from
'
vs/workbench/common/theme
'
;
...
...
@@ -49,7 +49,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService, IS
private
static
readonly
PINNED_PANELS
=
'
workbench.panel.pinnedPanels
'
;
private
static
readonly
MIN_COMPOSITE_BAR_WIDTH
=
50
;
_serviceBrand
:
any
;
_serviceBrand
:
ServiceIdentifier
<
any
>
;
element
:
HTMLElement
;
...
...
@@ -282,31 +282,22 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService, IS
};
}
layout
(
dimension
:
Dimension
):
Dimension
[];
layout
(
width
:
number
,
height
:
number
):
void
;
layout
(
dim1
:
Dimension
|
number
,
dim2
?:
number
):
Dimension
[]
|
void
{
layout
(
width
:
number
,
height
:
number
):
void
{
if
(
!
this
.
layoutService
.
isVisible
(
Parts
.
PANEL_PART
))
{
if
(
dim1
instanceof
Dimension
)
{
return
[
dim1
];
}
return
;
}
const
{
width
,
height
}
=
dim1
instanceof
Dimension
?
dim1
:
{
width
:
dim1
,
height
:
dim2
};
if
(
this
.
layoutService
.
getPanelPosition
()
===
Position
.
RIGHT
)
{
this
.
dimension
=
new
Dimension
(
width
-
1
,
height
!
);
// Take into account the 1px border when layouting
}
else
{
this
.
dimension
=
new
Dimension
(
width
,
height
!
);
}
const
sizes
=
super
.
layout
(
this
.
dimension
.
width
,
this
.
dimension
.
height
);
this
.
layoutCompositeBar
(
);
// Layout contents
super
.
layout
(
this
.
dimension
.
width
,
this
.
dimension
.
height
);
if
(
dim1
instanceof
Dimension
)
{
return
sizes
;
}
// Layout composite bar
this
.
layoutCompositeBar
();
}
private
layoutCompositeBar
():
void
{
...
...
src/vs/workbench/browser/parts/sidebar/sidebarPart.ts
浏览文件 @
0e409ed1
...
...
@@ -19,13 +19,13 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
KeyMod
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
SIDE_BAR_TITLE_FOREGROUND
,
SIDE_BAR_BACKGROUND
,
SIDE_BAR_FOREGROUND
,
SIDE_BAR_BORDER
}
from
'
vs/workbench/common/theme
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
EventType
,
addDisposableListener
,
trackFocus
,
Dimension
}
from
'
vs/base/browser/dom
'
;
import
{
EventType
,
addDisposableListener
,
trackFocus
}
from
'
vs/base/browser/dom
'
;
import
{
StandardMouseEvent
}
from
'
vs/base/browser/mouseEvent
'
;
import
{
IContextKey
,
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
AnchorAlignment
}
from
'
vs/base/browser/ui/contextview/contextview
'
;
...
...
@@ -34,7 +34,8 @@ import { ISerializableView } from 'vs/base/browser/ui/grid/grid';
import
{
LayoutPriority
}
from
'
vs/base/browser/ui/grid/gridview
'
;
export
class
SidebarPart
extends
CompositePart
<
Viewlet
>
implements
ISerializableView
,
IViewletService
{
_serviceBrand
:
any
;
_serviceBrand
:
ServiceIdentifier
<
any
>
;
static
readonly
activeViewletSettingsKey
=
'
workbench.sidebar.activeviewletid
'
;
...
...
@@ -167,22 +168,12 @@ export class SidebarPart extends CompositePart<Viewlet> implements ISerializable
container
.
style
.
borderLeftColor
=
!
isPositionLeft
?
borderColor
:
null
;
}
layout
(
dimension
:
Dimension
):
Dimension
[];
layout
(
width
:
number
,
height
:
number
):
void
;
layout
(
dim1
:
Dimension
|
number
,
dim2
?:
number
):
Dimension
[]
|
void
{
layout
(
width
:
number
,
height
:
number
):
void
{
if
(
!
this
.
layoutService
.
isVisible
(
Parts
.
SIDEBAR_PART
))
{
if
(
dim1
instanceof
Dimension
)
{
return
[
dim1
];
}
return
;
}
if
(
dim1
instanceof
Dimension
)
{
return
super
.
layout
(
dim1
);
}
super
.
layout
(
dim1
,
dim2
!
);
super
.
layout
(
width
,
height
);
}
// Viewlet service
...
...
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
浏览文件 @
0e409ed1
...
...
@@ -13,7 +13,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
import
{
IEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
Part
}
from
'
vs/workbench/browser/part
'
;
import
{
IStatusbarRegistry
,
Extensions
,
IStatusbarItem
}
from
'
vs/workbench/browser/parts/statusbar/statusbar
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
StatusbarAlignment
,
IStatusbarService
,
IStatusbarEntry
}
from
'
vs/platform/statusbar/common/statusbar
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
...
...
@@ -24,7 +24,7 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/
import
{
contrastBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
isThemeColor
}
from
'
vs/editor/common/editorCommon
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
addClass
,
EventHelper
,
createStyleSheet
,
addDisposableListener
,
Dimension
}
from
'
vs/base/browser/dom
'
;
import
{
addClass
,
EventHelper
,
createStyleSheet
,
addDisposableListener
}
from
'
vs/base/browser/dom
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IStorageService
}
from
'
vs/platform/storage/common/storage
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
...
...
@@ -32,7 +32,8 @@ import { ISerializableView } from 'vs/base/browser/ui/grid/grid';
import
{
Parts
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
export
class
StatusbarPart
extends
Part
implements
IStatusbarService
,
ISerializableView
{
_serviceBrand
:
any
;
_serviceBrand
:
ServiceIdentifier
<
any
>
;
private
static
readonly
PRIORITY_PROP
=
'
statusbar-entry-priority
'
;
private
static
readonly
ALIGNMENT_PROP
=
'
statusbar-entry-alignment
'
;
...
...
@@ -231,14 +232,8 @@ export class StatusbarPart extends Part implements IStatusbarService, ISerializa
return
dispose
;
}
layout
(
dimension
:
Dimension
):
Dimension
[];
layout
(
width
:
number
,
height
:
number
):
void
;
layout
(
dim1
:
Dimension
|
number
,
dim2
?:
number
):
Dimension
[]
|
void
{
if
(
dim1
instanceof
Dimension
)
{
return
super
.
layout
(
dim1
);
}
else
{
super
.
layout
(
new
Dimension
(
dim1
,
dim2
!
));
}
layout
(
width
:
number
,
height
:
number
):
void
{
super
.
layoutContents
(
width
,
height
);
}
toJSON
():
object
{
...
...
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
浏览文件 @
0e409ed1
...
...
@@ -28,7 +28,7 @@ import { Color } from 'vs/base/common/color';
import
{
trim
}
from
'
vs/base/common/strings
'
;
import
{
EventType
,
EventHelper
,
Dimension
,
isAncestor
,
hide
,
show
,
removeClass
,
addClass
,
append
,
$
,
addDisposableListener
,
runAtThisOrScheduleAtNextAnimationFrame
}
from
'
vs/base/browser/dom
'
;
import
{
MenubarControl
}
from
'
vs/workbench/browser/parts/titlebar/menubarControl
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
,
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
template
,
getBaseLabel
}
from
'
vs/base/common/labels
'
;
import
{
ILabelService
}
from
'
vs/platform/label/common/label
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
...
...
@@ -58,7 +58,7 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
private
_onMenubarVisibilityChange
=
this
.
_register
(
new
Emitter
<
boolean
>
());
get
onMenubarVisibilityChange
():
Event
<
boolean
>
{
return
this
.
_onMenubarVisibilityChange
.
event
;
}
_serviceBrand
:
any
;
_serviceBrand
:
ServiceIdentifier
<
any
>
;
private
title
:
HTMLElement
;
private
dragRegion
:
HTMLElement
;
...
...
@@ -588,19 +588,10 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
}
}
layout
(
dimension
:
Dimension
):
Dimension
[];
layout
(
width
:
number
,
height
:
number
):
void
;
layout
(
dim1
:
Dimension
|
number
,
dim2
?:
number
):
Dimension
[]
|
void
{
if
(
dim1
instanceof
Dimension
)
{
this
.
updateLayout
(
dim1
);
layout
(
width
:
number
,
height
:
number
):
void
{
this
.
updateLayout
(
new
Dimension
(
width
,
height
));
return
super
.
layout
(
dim1
);
}
const
dimensions
=
new
Dimension
(
dim1
,
dim2
!
);
this
.
updateLayout
(
dimensions
);
super
.
layout
(
dimensions
);
super
.
layoutContents
(
width
,
height
);
}
toJSON
():
object
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录