summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/window_frame.css
blob: 838d5c64c6f0b28d6405b573f6ae943eebb8d46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/* Copyright 2014 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

.window-body {
  position: relative;
}

html.apps-v2,
html.apps-v2 body {
  height: 100%;
  width: 100%;
}

html.apps-v2 body:not(.fullscreen) {
  border: 1px solid gray;  /* This is the window border. */
}

.title-bar {
  z-index: 100;
  width: 100%;
  background-color: #c4c4c4;
}

.window-controls-and-title {
  display: flex;
}

.window-title {
  line-height: 32px;
  font-size: 14px;
}

.title-bar .window-title {
  padding-__MSG_@@bidi_start_edge__: 12px;
  width: 100%;
  display: inline-block;
  -webkit-app-region: drag;
  flex: 1;
}

.window-control {
  width: 32px;
  height: 32px;
  padding-top: 9px;
  padding-right: 1px;
  text-align: center;
  display: inline-block;
}

.window-control > span.menu-button-activator {
  display: inline-block;
  width: 100%;
  height: 100%;
}

.window-control:hover {
  background-color: #d5d5d5;
}

.window-control:active {
  background-color: #a6a6a6;
}

.window-control img {
  margin-bottom: -2px;
}

.window-controls-stub {
  display: none;
  height: 8px;
  background: url("drag.webp");
  background-position: 2px 1px;
}

#scroller {
  height: 100%;
  width: 100%;
  overflow: auto;
  position: relative;
}

html.apps-v2 .window-body {
  height: calc(100% - 32px);  /* Allow space for the title-bar */
}

/* Add an etched border to the window controls, title bar and stub */
.window-title,
.window-control,
.window-controls-stub {
  position: relative;
}

.window-title::after,
.window-control::after,
.window-controls-stub::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);  /* darken bottom slightly */
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  box-sizing: border-box;
}

/* Remove dark borders for elements that are adjacent an existing border. */
.window-close::after {
  border-right: none;
}

.window-controls-stub::after {
  border-bottom: none;
  border-right: none;
}

/* The Disconnect, full-screen and options buttons are only displayed when
   connected. */
body:not(.connected) .window-disconnect,
body:not(.connected) .window-fullscreen,
body:not(.connected) .window-options {
  display: none;
}


/*
 * When in full-screen mode, significant changes are made:
 * - The scroll-bars are removed.
 * - The window controls have a border (so the left-border of the first button
 *   is not needed).
 * - The window title is not displayed.
 * - The stub is visible.
 * - The window controls gain transition effects for position and opacity and
 *   auto-hide behind the top edge of the screen.
 * - A border is added to the window controls to ensure they stand out against
 *   any desktop.
 * - The window border is removed.
 * - The full-screen button is removed.
 */

html.apps-v2 body.fullscreen #scroller {
  overflow: hidden;
}

html.apps-v2 body.fullscreen .window-body {
  height: 100%;
}

body.fullscreen .title-bar {
  border: 1px solid #a6a6a6;
}

body.fullscreen .window-title {
  display: none;
}

body.fullscreen .title-bar {
  position: fixed;
  width: initial;  /* Override the 100% width when windowed. */
}

body.fullscreen .window-controls-and-title {
  display: inline-flex;
}

body.fullscreen .window-controls-stub {
  display: block;
}

body.fullscreen .title-bar {
  transition-property: opacity, box-shadow, top;
  transition-duration: 0.3s;
  opacity: 0.7;
  top: -33px;
  __MSG_@@bidi_end_edge__: 8px;
}

body.fullscreen .title-bar:hover,
body.fullscreen .title-bar.menu-opened,
body.fullscreen .title-bar.opened,
body.fullscreen .title-bar.preview {
  top: -4px;
  opacity: 1.0;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
}

.fullscreen .title-bar.opened .window-controls-stub {
  background-color: #a6a6a6;
}

body.fullscreen .window-fullscreen {
  display: none;
}