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