Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: remoting/webapp/window_frame.css

Issue 265393005: Implement apps v2 custom window frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary getElementById and work-around AppWindow.restore bug. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /* Copyright 2014 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 html.apps-v2,
7 html.apps-v2 body {
8 height: 100%;
9 width: 100%;
10 }
11
12 html.apps-v2 body:not(.fullscreen) {
13 border: 1px solid gray; /* This is the window border. */
14 }
15
16 html.apps-v2 .title-bar {
17 border-bottom: 1px solid gray;
18 z-index: 100;
19 }
20
21 .window-title,
22 .window-controls-hover-target {
23 height: 32px;
24 line-height: 32px;
25 font-size: 16px;
26 background-color: #c4c4c4;
27 }
28
29 .title-bar .window-title {
30 padding-left: 12px;
31 width: 100%;
32 display: inline-block;
33 -webkit-app-region: drag;
34 }
35
36 .window-controls-hover-target {
37 -webkit-app-region: no-drag;
38 position: fixed;
39 top: 1px;
40 right: 1px;
41 }
42
43 .window-controls-hover-target {
44 display: table;
45 }
46
47 .window-controls-hover-target > div:first-child {
48 display: table-row;
49 }
50
51 .window-control {
52 height: 32px;
53 width: 32px;
54 text-align: center;
55 display: inline-block;
56 border-left: 1px solid rgba(0, 0, 0, 0.2);
57 }
58
59 .window-control:hover {
60 background-color: #d5d5d5;
61 }
62
63 .window-control:active {
64 background-color: #a6a6a6;
65 }
66
67 .window-control > img {
68 margin-bottom: -2px;
69 }
70
71 .window-controls-stub {
72 display: none;
73 -webkit-column-span: all;
74 line-height: 3px;
75 background: url("drag.webp");
76 border-top: 1px solid rgba(0, 0, 0, 0.2);
77 }
78
79 #scroller {
80 height: 100%;
81 width: 100%;
82 overflow: auto;
83 position: relative;
84 }
85
86 html.apps-v2 #scroller {
87 height: calc(100% - 32px); /** Allow space for the title-bar */
88 }
89
90 /* Add an etched border to the window controls, title bar and stub */
91 .title-bar,
92 .window-control,
93 .window-controls-stub {
94 position: relative;
95 }
96
97 .title-bar:after,
98 .window-control:after,
99 .window-controls-stub:after {
100 content: "";
101 width: 100%;
102 height: 100%;
103 position: absolute;
104 top: 0;
105 left: 0;
106 border-left: 1px solid rgba(255, 255, 255, 0.2);
107 border-top: 1px solid rgba(255, 255, 255, 0.2);
108 pointer-events: none;
109 }
110
111
112 /* When connected to a host, the Disconnect button is displayed. */
113 body:not(.connected) .window-disconnect {
114 display: none;
115 }
116
117
118 /*
119 * When in full-screen mode, significant changes are made:
120 * - The scroll-bars are removed.
121 * - The window controls have a border (so the left-border of the first button
122 * is not needed).
123 * - The title-bar (and its bottom border) are not displayed.
124 * - The stub is visible.
125 * - The window controls gain transition effects for position and opacity and
126 * auto-hide behind the top edge of the screen.
127 * - The window border is removed.
128 */
129
130 html.apps-v2 body.fullscreen #scroller {
131 height: 100%;
132 overflow: hidden;
133 }
134
135 body.fullscreen .window-controls {
136 border: 1px solid gray;
137 }
138
139 body.fullscreen .window-control:first-child {
140 border-left: none;
141 }
142
143 body.fullscreen .window-title {
144 display: none;
145 }
146
147 body.fullscreen .title-bar {
148 border-bottom: none;
149 }
150
151 body.fullscreen .window-controls-stub {
152 display: table-cell;
153 }
154
155 body.fullscreen .window-controls-hover-target {
156 transition-property: opacity, box-shadow, border, top;
157 transition-duration: 0.3s;
158 opacity: 0.7;
159 top: -33px;
160 right: 8px;
161 }
162
163 body.fullscreen .window-controls-hover-target:hover,
164 body.fullscreen .window-controls-hover-target.opened {
165 top: -4px;
166 opacity: 1.0;
167 }
168
169 .fullscreen .window-controls-hover-target.opened .window-controls-stub {
170 background-color: #a6a6a6;
171 }
172
173 .fullscreen .window-controls-hover-target:hover .window-controls {
174 box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698