summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcssstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcssstyle.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmcssstyle.cpp37
1 files changed, 34 insertions, 3 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcssstyle.cpp b/src/plugins/platforms/wasm/qwasmcssstyle.cpp
index 3efe450495..e0e1a99f48 100644
--- a/src/plugins/platforms/wasm/qwasmcssstyle.cpp
+++ b/src/plugins/platforms/wasm/qwasmcssstyle.cpp
@@ -26,11 +26,20 @@ const char *Style = R"css(
overflow: hidden;
}
+.qt-screen div {
+ touch-action: none;
+}
+
.qt-window {
position: absolute;
background-color: lightgray;
}
+.qt-window-contents {
+ overflow: hidden;
+ position: relative;
+}
+
.qt-window.transparent-for-input {
pointer-events: none;
}
@@ -39,17 +48,23 @@ const char *Style = R"css(
box-shadow: rgb(0 0 0 / 20%) 0px 10px 16px 0px, rgb(0 0 0 / 19%) 0px 6px 20px 0px;
}
-.qt-window.has-frame {
+.qt-window.has-border {
border: var(--border-width) solid lightgray;
caret-color: transparent;
}
+.qt-window.frameless {
+ background-color: transparent;
+}
+
.resize-outline {
position: absolute;
display: none;
}
-.qt-window.has-frame:not(.maximized) .resize-outline {
+.qt-window.no-resize > .resize-outline { display: none; }
+
+.qt-window.has-border:not(.maximized):not(.no-resize) .resize-outline {
display: block;
}
@@ -125,7 +140,7 @@ const char *Style = R"css(
padding-bottom: 4px;
}
-.qt-window.has-frame .title-bar {
+.qt-window.has-border > .title-bar {
display: flex;
}
@@ -152,6 +167,7 @@ const char *Style = R"css(
.qt-window-canvas-container {
display: flex;
+ pointer-events: none;
}
.title-bar div {
@@ -201,6 +217,21 @@ const char *Style = R"css(
filter: invert(0.6);
}
+/* This will clip the content within 50% frame in 1x1 pixel area, preventing it
+ from being rendered on the page, but it should still be read by modern
+ screen readers */
+.hidden-visually-read-by-screen-reader {
+ visibility: visible;
+ clip: rect(1px, 1px, 1px, 1px);
+ clip-path: inset(50%);
+ height: 1px;
+ width: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+}
+
)css";
} // namespace