titlebarpart.css 4.1 KB
Newer Older
B
Benjamin Pasero 已提交
1 2 3 4 5
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

6
.monaco-workbench .part.titlebar {
B
Benjamin Pasero 已提交
7 8 9
	box-sizing: border-box;
	width: 100%;
	padding: 0 70px;
10
	overflow: hidden;
B
Benjamin Pasero 已提交
11 12 13
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
14
	user-select: none;
15
	-webkit-user-select: none;
B
Benjamin Pasero 已提交
16
	zoom: 1; /* prevent zooming */
17
	line-height: 22px;
18
	height: 22px;
B
Benjamin Pasero 已提交
19 20 21
	display: flex;
}

22
.monaco-workbench .part.titlebar > .titlebar-drag-region {
23 24 25 26 27 28 29 30 31
	top: 0;
	left: 0;
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	-webkit-app-region: drag;
}

32
.monaco-workbench .part.titlebar > .window-title {
B
Benjamin Pasero 已提交
33
	flex: 0 1 auto;
S
SteVen Batten 已提交
34
	font-size: 12px;
B
Benjamin Pasero 已提交
35 36 37
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
S
SteVen Batten 已提交
38 39
	margin-left: auto;
	margin-right: auto;
40
	zoom: 1; /* prevent zooming */
R
Ryan Adolf 已提交
41 42
}

B
Benjamin Pasero 已提交
43
/* Windows/Linux: Rules for custom title (icon, window controls)  */
44
.monaco-workbench.web .part.titlebar,
45 46
.monaco-workbench.windows .part.titlebar,
.monaco-workbench.linux .part.titlebar {
S
SteVen Batten 已提交
47
	padding: 0;
48 49
	height: 30px;
	line-height: 30px;
S
SteVen Batten 已提交
50 51
	justify-content: left;
	overflow: visible;
R
Ryan Adolf 已提交
52 53
}

54
.monaco-workbench.web .part.titlebar > .window-title,
55 56
.monaco-workbench.windows .part.titlebar > .window-title,
.monaco-workbench.linux .part.titlebar > .window-title {
S
SteVen Batten 已提交
57 58 59
	cursor: default;
}

60 61
.monaco-workbench .part.titlebar > .menubar {
	/* move menubar above drag region as negative z-index on drag region cause greyscale AA */
62
	z-index: 2500;
63 64
}

65
.monaco-workbench.linux .part.titlebar > .window-title {
S
SteVen Batten 已提交
66 67 68
	font-size: inherit;
}

69 70
.monaco-workbench.windows .part.titlebar > .resizer,
.monaco-workbench.linux .part.titlebar > .resizer {
71
	-webkit-app-region: no-drag;
72
	position: absolute;
73
	top: 0;
74
	width: 100%;
75
	height: 4px;
76 77
}

78 79
.monaco-workbench.windows.fullscreen .part.titlebar > .resizer,
.monaco-workbench.linux.fullscreen .part.titlebar > .resizer {
S
SteVen Batten 已提交
80
	display: none;
R
Ryan Adolf 已提交
81 82
}

83
.monaco-workbench .part.titlebar > .window-appicon {
84
	width: 35px;
S
SteVen Batten 已提交
85
	height: 100%;
S
SteVen Batten 已提交
86
	position: relative;
87
	z-index: 3000;
88 89 90 91
	flex-shrink: 0;
}

.monaco-workbench .part.titlebar > .window-appicon:not(.codicon) {
92
	background-image: url('../../../media/code-icon.svg');
93 94 95
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 16px;
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
}

.monaco-workbench .part.titlebar .window-appicon > .home-bar-icon-badge {
	position: absolute;
	right: 9px;
	bottom: 6px;
	width: 8px;
	height: 8px;
	z-index: 1; /* on top of home indicator */
	background-image: url('../../../media/code-icon.svg');
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 8px;
	pointer-events: none;
	border-top: 1px solid transparent;
	border-left: 1px solid transparent;
}

.monaco-workbench .part.titlebar > .window-appicon.codicon {
	line-height: 30px;
S
SteVen Batten 已提交
116 117
}

118
.monaco-workbench.fullscreen .part.titlebar > .window-appicon {
S
SteVen Batten 已提交
119
	display: none;
R
Ryan Adolf 已提交
120 121
}

122
.monaco-workbench .part.titlebar > .window-controls-container {
S
SteVen Batten 已提交
123
	display: flex;
S
SteVen Batten 已提交
124 125 126 127
	flex-grow: 0;
	flex-shrink: 0;
	text-align: center;
	position: relative;
128
	z-index: 3000;
S
SteVen Batten 已提交
129
	-webkit-app-region: no-drag;
130
	height: 100%;
131
	width: 138px;
132
	margin-left: auto;
S
SteVen Batten 已提交
133 134
}

135
.monaco-workbench.fullscreen .part.titlebar > .window-controls-container {
S
SteVen Batten 已提交
136
	display: none;
137
	background-color: transparent;
S
SteVen Batten 已提交
138 139
}

140
.monaco-workbench .part.titlebar > .window-controls-container > .window-icon {
141
	display: inline-block;
142
	line-height: 30px;
S
SteVen Batten 已提交
143
	height: 100%;
144 145
	width: 46px;
	font-size: 16px;
S
SteVen Batten 已提交
146 147
}

148
.monaco-workbench .part.titlebar > .window-controls-container > .window-icon:hover {
R
Ryan Adolf 已提交
149 150 151
	background-color: rgba(255, 255, 255, 0.1);
}

152
.monaco-workbench .part.titlebar.light > .window-controls-container > .window-icon:hover {
153
	background-color: rgba(0, 0, 0, 0.1);
R
Ryan Adolf 已提交
154 155
}

156
.monaco-workbench .part.titlebar > .window-controls-container > .window-icon.window-close:hover {
R
Ryan Adolf 已提交
157
	background-color: rgba(232, 17, 35, 0.9);
S
SteVen Batten 已提交
158 159
}

160
.monaco-workbench .part.titlebar > .window-controls-container .window-icon.window-close:hover {
161
	color: white;
162
}