Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 html.apps-v2, | 6 html.apps-v2, |
| 7 html.apps-v2 body { | 7 html.apps-v2 body { |
| 8 height: 100%; | 8 height: 100%; |
| 9 width: 100%; | 9 width: 100%; |
| 10 } | 10 } |
| 11 | 11 |
| 12 html.apps-v2 body:not(.fullscreen) { | 12 html.apps-v2 body:not(.fullscreen) { |
| 13 border: 1px solid gray; /* This is the window border. */ | 13 border: 1px solid gray; /* This is the window border. */ |
| 14 } | 14 } |
| 15 | 15 |
| 16 html.apps-v2 .title-bar { | 16 .title-bar { |
|
Jamie
2014/08/22 20:28:20
The title bar is invisible for apps v1 anyway.
| |
| 17 border-bottom: 1px solid gray; | |
| 18 z-index: 100; | 17 z-index: 100; |
| 19 } | 18 width: 100%; |
| 20 | |
| 21 .window-title, | |
| 22 .window-controls-hover-target { | |
| 23 height: 32px; | |
| 24 line-height: 32px; | |
| 25 font-size: 14px; | |
| 26 background-color: #c4c4c4; | 19 background-color: #c4c4c4; |
| 27 } | 20 } |
| 28 | 21 |
| 22 .window-controls-and-title { | |
| 23 display: flex; | |
| 24 } | |
| 25 | |
| 26 .window-title { | |
| 27 line-height: 32px; | |
| 28 font-size: 14px; | |
| 29 } | |
| 30 | |
| 29 .title-bar .window-title { | 31 .title-bar .window-title { |
| 30 padding-__MSG_@@bidi_start_edge__: 12px; | 32 padding-__MSG_@@bidi_start_edge__: 12px; |
| 31 width: 100%; | 33 width: 100%; |
| 32 display: inline-block; | 34 display: inline-block; |
| 33 -webkit-app-region: drag; | 35 -webkit-app-region: drag; |
| 34 } | 36 flex: 1; |
|
Jamie
2014/08/22 20:28:20
The window title stretches to fill the space betwe
| |
| 35 | |
| 36 .window-controls-hover-target { | |
| 37 -webkit-app-region: no-drag; | |
| 38 position: fixed; | |
| 39 top: 1px; | |
| 40 __MSG_@@bidi_end_edge__: 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 } | 37 } |
| 50 | 38 |
| 51 .window-control { | 39 .window-control { |
| 40 width: 32px; | |
| 52 height: 32px; | 41 height: 32px; |
| 53 width: 32px; | 42 padding-top: 9px; |
| 43 padding-right: 1px; | |
| 54 text-align: center; | 44 text-align: center; |
| 55 display: inline-block; | 45 display: inline-block; |
| 56 border-__MSG_@@bidi_start_edge__: 1px solid rgba(0, 0, 0, 0.2); | |
| 57 } | 46 } |
| 58 | 47 |
| 59 .window-control > span.menu-button-activator { | 48 .window-control > span.menu-button-activator { |
| 60 display: inline-block; | 49 display: inline-block; |
| 61 width: 100%; | 50 width: 100%; |
| 62 height: 100%; | 51 height: 100%; |
| 63 } | 52 } |
| 64 | 53 |
| 65 .window-control:hover { | 54 .window-control:hover { |
| 66 background-color: #d5d5d5; | 55 background-color: #d5d5d5; |
| 67 } | 56 } |
| 68 | 57 |
| 69 .window-control:active { | 58 .window-control:active { |
| 70 background-color: #a6a6a6; | 59 background-color: #a6a6a6; |
| 71 } | 60 } |
| 72 | 61 |
| 73 .window-control img { | 62 .window-control img { |
| 74 margin-bottom: -2px; | 63 margin-bottom: -2px; |
| 75 } | 64 } |
| 76 | 65 |
| 77 .window-controls-stub { | 66 .window-controls-stub { |
| 78 display: none; | 67 display: none; |
| 79 -webkit-column-span: all; | 68 height: 8px; |
| 80 line-height: 3px; | |
| 81 background: url("drag.webp"); | 69 background: url("drag.webp"); |
| 82 border-top: 1px solid rgba(0, 0, 0, 0.2); | 70 background-position: 2px 1px; |
| 83 } | 71 } |
| 84 | 72 |
| 85 #scroller { | 73 #scroller { |
| 86 height: 100%; | 74 height: 100%; |
| 87 width: 100%; | 75 width: 100%; |
| 88 overflow: auto; | 76 overflow: auto; |
| 89 position: relative; | 77 position: relative; |
| 90 } | 78 } |
| 91 | 79 |
| 92 html.apps-v2 #scroller { | 80 html.apps-v2 #scroller { |
| 93 height: calc(100% - 32px); /** Allow space for the title-bar */ | 81 height: calc(100% - 32px); /* Allow space for the title-bar */ |
| 94 } | 82 } |
| 95 | 83 |
| 96 /* Add an etched border to the window controls, title bar and stub */ | 84 /* Add an etched border to the window controls, title bar and stub */ |
| 97 .title-bar, | 85 .window-title, |
| 98 .window-control, | 86 .window-control, |
| 99 .window-controls-stub { | 87 .window-controls-stub { |
| 100 position: relative; | 88 position: relative; |
| 101 } | 89 } |
| 102 | 90 |
| 103 .title-bar:after, | 91 .window-title::after, |
| 104 .window-control:after, | 92 .window-control::after, |
| 105 .window-controls-stub:after { | 93 .window-controls-stub::after { |
| 106 content: ""; | 94 content: ""; |
| 107 width: 100%; | 95 width: 100%; |
| 108 height: 100%; | 96 height: 100%; |
| 109 position: absolute; | 97 position: absolute; |
| 110 top: 0; | 98 top: 0; |
| 111 left: 0; | 99 left: 0; |
| 100 border-right: 1px solid rgba(0, 0, 0, 0.2); | |
| 101 border-top: 1px solid rgba(255, 255, 255, 0.2); | |
| 102 border-bottom: 1px solid rgba(0, 0, 0, 0.3); /* darken bottom slightly */ | |
| 112 border-left: 1px solid rgba(255, 255, 255, 0.2); | 103 border-left: 1px solid rgba(255, 255, 255, 0.2); |
| 113 border-top: 1px solid rgba(255, 255, 255, 0.2); | |
| 114 pointer-events: none; | 104 pointer-events: none; |
| 105 box-sizing: border-box; | |
| 115 } | 106 } |
| 116 | 107 |
| 108 /* Remove dark borders for elements that are adjacent an existing border. */ | |
| 109 .window-close::after { | |
| 110 border-right: none; | |
| 111 } | |
| 112 | |
| 113 .window-controls-stub::after { | |
| 114 border-bottom: none; | |
| 115 border-right: none; | |
| 116 } | |
| 117 | 117 |
| 118 /* The Disconnect and Options buttons are only displayed when connected. */ | 118 /* The Disconnect and Options buttons are only displayed when connected. */ |
| 119 body:not(.connected) .window-disconnect, | 119 body:not(.connected) .window-disconnect, |
| 120 body:not(.connected) .window-options { | 120 body:not(.connected) .window-options { |
| 121 display: none; | 121 display: none; |
| 122 } | 122 } |
| 123 | 123 |
| 124 | 124 |
| 125 /* | 125 /* |
| 126 * When in full-screen mode, significant changes are made: | 126 * When in full-screen mode, significant changes are made: |
| 127 * - The scroll-bars are removed. | 127 * - The scroll-bars are removed. |
| 128 * - The window controls have a border (so the left-border of the first button | 128 * - The window controls have a border (so the left-border of the first button |
| 129 * is not needed). | 129 * is not needed). |
| 130 * - The title-bar (and its bottom border) are not displayed. | 130 * - The window title is not displayed. |
| 131 * - The stub is visible. | 131 * - The stub is visible. |
| 132 * - The window controls gain transition effects for position and opacity and | 132 * - The window controls gain transition effects for position and opacity and |
| 133 * auto-hide behind the top edge of the screen. | 133 * auto-hide behind the top edge of the screen. |
| 134 * - A border is added to the window controls to ensure they stand out against | 134 * - A border is added to the window controls to ensure they stand out against |
| 135 * any desktop. | 135 * any desktop. |
| 136 * - The window border is removed. | 136 * - The window border is removed. |
| 137 */ | 137 */ |
| 138 | 138 |
| 139 html.apps-v2 body.fullscreen #scroller { | 139 html.apps-v2 body.fullscreen #scroller { |
| 140 height: 100%; | 140 height: 100%; |
| 141 overflow: hidden; | 141 overflow: hidden; |
| 142 } | 142 } |
| 143 | 143 |
| 144 body.fullscreen .window-controls-hover-target { | 144 body.fullscreen .title-bar { |
| 145 border: 1px solid #a6a6a6; | 145 border: 1px solid #a6a6a6; |
| 146 } | 146 } |
| 147 | 147 |
| 148 body.fullscreen .window-control:first-child { | |
| 149 border-__MSG_@@bidi_start_edge__: none; | |
| 150 } | |
| 151 | |
| 152 body.fullscreen .window-title { | 148 body.fullscreen .window-title { |
| 153 display: none; | 149 display: none; |
| 154 } | 150 } |
| 155 | 151 |
| 156 body.fullscreen .title-bar { | 152 body.fullscreen .title-bar { |
| 157 border-bottom: none; | 153 position: fixed; |
| 154 width: initial; /* Override the 100% width when windowed. */ | |
| 155 } | |
| 156 | |
| 157 body.fullscreen .window-controls-and-title { | |
| 158 display: inline-flex; | |
| 158 } | 159 } |
| 159 | 160 |
| 160 body.fullscreen .window-controls-stub { | 161 body.fullscreen .window-controls-stub { |
| 161 display: table-cell; | 162 display: block; |
| 162 } | 163 } |
| 163 | 164 |
| 164 body.fullscreen .window-controls-hover-target { | 165 body.fullscreen .title-bar { |
| 165 transition-property: opacity, box-shadow, top; | 166 transition-property: opacity, box-shadow, top; |
| 166 transition-duration: 0.3s; | 167 transition-duration: 0.3s; |
| 167 opacity: 0.7; | 168 opacity: 0.7; |
| 168 top: -33px; | 169 top: -33px; |
| 169 __MSG_@@bidi_end_edge__: 8px; | 170 __MSG_@@bidi_end_edge__: 8px; |
| 170 } | 171 } |
| 171 | 172 |
| 172 body.fullscreen .window-controls-hover-target:hover, | 173 body.fullscreen .title-bar:hover, |
| 173 body.fullscreen .window-controls-hover-target.menu-opened, | 174 body.fullscreen .title-bar.menu-opened, |
| 174 body.fullscreen .window-controls-hover-target.opened, | 175 body.fullscreen .title-bar.opened, |
| 175 body.fullscreen .window-controls-hover-target.preview { | 176 body.fullscreen .title-bar.preview { |
| 176 top: -4px; | 177 top: -4px; |
| 177 opacity: 1.0; | 178 opacity: 1.0; |
| 178 box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5); | 179 box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5); |
| 179 } | 180 } |
| 180 | 181 |
| 181 .fullscreen .window-controls-hover-target.opened .window-controls-stub { | 182 .fullscreen .title-bar.opened .window-controls-stub { |
| 182 background-color: #a6a6a6; | 183 background-color: #a6a6a6; |
| 183 } | 184 } |
| OLD | NEW |