9#include <QtCore/qstring.h>
10#include <QtCore/qfile.h>
16.qt-screen {
17 --border-width: 4px;
18 --resize-outline-width: 8px;
19 --resize-outline-half-width: var(--resize-outline-width) / 2;
20
21 position: relative;
22 border: none;
23 caret-color: transparent;
24 cursor: default;
25 width: 100%;
26 height: 100%;
27 overflow: hidden;
28}
29
30.qt-screen div {
31 touch-action: none;
32}
33
34.qt-decorated-window {
35 position: absolute;
36 background-color: lightgray;
37}
38
39.qt-window {
40 overflow: clip;
41 position: relative;
42}
43
44.qt-window-canvas {
45 position: absolute;
46 left: 0;
47 top: 0;
48}
49
50.qt-decorated-window.transparent-for-input {
51 pointer-events: none;
52}
53
54.qt-decorated-window.has-shadow {
55 box-shadow: rgb(0 0 0 / 20%) 0px 10px 16px 0px, rgb(0 0 0 / 19%) 0px 6px 20px 0px;
56}
57
58.qt-decorated-window.has-border {
59 border: var(--border-width) solid lightgray;
60 caret-color: transparent;
61}
62
63.qt-decorated-window.frameless {
64 background-color: transparent;
65}
66
67.resize-outline {
68 position: absolute;
69 display: none;
70}
71
72.qt-decorated-window.no-resize > .resize-outline { display: none; }
73
74.qt-decorated-window.has-border:not(.maximized):not(.no-resize) > .resize-outline {
75 display: block;
76}
77
78.resize-outline.nw {
79 left: calc(-1 * var(--resize-outline-half-width) - var(--border-width));
80 top: calc(-1 * var(--resize-outline-half-width) - var(--border-width));
81 width: var(--resize-outline-width);
82 height: var(--resize-outline-width);
83 cursor: nwse-resize;
84}
85
86.resize-outline.n {
87 left: var(--resize-outline-half-width);
88 top: calc(-1 * var(--resize-outline-half-width) - var(--border-width));
89 height: var(--resize-outline-width);
90 width: calc(100% + 2 * var(--border-width) - var(--resize-outline-width));
91 cursor: ns-resize;
92}
93
94.resize-outline.ne {
95 left: calc(100% + var(--border-width) - var(--resize-outline-half-width));
96 top: calc(-1 * var(--resize-outline-half-width) - var(--border-width));
97 width: var(--resize-outline-width);
98 height: var(--resize-outline-width);
99 cursor: nesw-resize;
100}
101
102.resize-outline.w {
103 left: calc(-1 * var(--resize-outline-half-width) - var(--border-width));
104 top: 0;
105 height: calc(100% + 2 * var(--border-width) - var(--resize-outline-width));
106 width: var(--resize-outline-width);
107 cursor: ew-resize;
108}
109
110.resize-outline.e {
111 left: calc(100% + var(--border-width) - var(--resize-outline-half-width));
112 top: 0;
113 height: calc(100% + 2 * var(--border-width) - var(--resize-outline-width));
114 width: var(--resize-outline-width);
115 cursor: ew-resize;
116}
117
118.resize-outline.sw {
119 left: calc(-1 * var(--resize-outline-half-width) - var(--border-width));
120 top: calc(100% + var(--border-width) - var(--resize-outline-half-width));
121 width: var(--resize-outline-width);
122 height: var(--resize-outline-width);
123 cursor: nesw-resize;
124}
125
126.resize-outline.s {
127 left: var(--resize-outline-half-width);
128 top: calc(100% + var(--border-width) - var(--resize-outline-half-width));
129 height: var(--resize-outline-width);
130 width: calc(100% + 2 * var(--border-width) - var(--resize-outline-width));
131 cursor: ns-resize;
132}
133
134.resize-outline.se {
135 left: calc(100% + var(--border-width) - var(--resize-outline-half-width));
136 top: calc(100% + var(--border-width) - var(--resize-outline-half-width));
137 width: var(--resize-outline-width);
138 height: var(--resize-outline-width);
139 cursor: nwse-resize;
140}
141
142.title-bar {
143 display: none;
144 align-items: center;
145 overflow: hidden;
146 height: 18px;
147 padding-bottom: 4px;
148}
149
150.qt-decorated-window.has-border > .title-bar {
151 display: flex;
152}
153
154.title-bar .window-name {
155 display: none;
156 font-family: 'Lucida Grande';
157 white-space: nowrap;
158 user-select: none;
159 overflow: hidden;
160}
161
162
163.qt-decorated-window.has-title .title-bar .window-name {
164 display: block;
165}
166
167.title-bar .spacer {
168 flex-grow: 1
169}
170
171.qt-decorated-window.inactive .title-bar {
172 opacity: 0.35;
173}
174
175.title-bar div {
176 pointer-events: none;
177}
178
179.qt-window-a11y-container {
180 position: absolute;
181 left: 0;
182 top: 0;
183 z-index: -1;
184}
185
186/* Dialogs take their geometry from Qt, the user agent would center and pad them. */
187.qt-window-a11y-container dialog {
188 margin: 0;
189 padding: 0;
190 border: none;
191 right: auto;
192 bottom: auto;
193 max-width: none;
194 max-height: none;
195}
196
197.title-bar .image-button {
198 width: 18px;
199 height: 18px;
200 display: flex;
201 justify-content: center;
202 user-select: none;
203 align-items: center;
204}
205
206.title-bar .image-button img {
207 width: 10px;
208 height: 10px;
209 user-select: none;
210 pointer-events: none;
211 -webkit-user-drag: none;
212 background-size: 10px 10px;
213}
214
215.title-bar .action-button {
216 pointer-events: all;
217}
218
219.qt-decorated-window.blocked div {
220 pointer-events: none;
221}
222
223.title-bar .action-button img {
224 transition: filter 0.08s ease-out;
225}
226
227.title-bar .action-button:hover img {
228 filter: invert(0.45);
229}
230
231.title-bar .action-button:active img {
232 filter: invert(0.6);
233}
234
235/* This will clip the content within 50% frame in 1x1 pixel area, preventing it
236 from being rendered on the page, but it should still be read by modern
237 screen readers */
238.hidden-visually-read-by-screen-reader {
239 visibility: visible;
240 clip: rect(1px, 1px, 1px, 1px);
241 clip-path: inset(50%);
242 height: 100%;
243 width: 100%;
244 margin: -1px;
245 overflow: hidden;
246 padding: 0;
247 position: absolute;
248}
249
250.hidden-drag-image {
251 visibility: visible;
252 display: block;
253 opacity: 1.0;
254 position: absolute;
255 z-index: -1;
256}
257
258.menu-item {
259 margin-block-start: 0px;
260 margin-block-end: 0px;
261 padding-inline-start: 0px;
262}
263
264)css";
270 auto document = parent[
"ownerDocument"];
271 auto screenStyle = document.call<emscripten::val>(
"createElement", emscripten::val(
"style"));
273 screenStyle.set(
"textContent", std::string(
Style));
Combined button and popup list for selecting options.
emscripten::val createStyleElement(emscripten::val parent)