summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcssstyle.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2023-02-02 09:02:01 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2023-02-07 13:33:01 +0100
commit40ddc38a7b933190dec607360de8cbdc2528a68a (patch)
tree78e1e0d65e56320cce66b3390e755399a6f648af /src/plugins/platforms/wasm/qwasmcssstyle.cpp
parent916008a50d88e19907e4e6aec921efd801818a00 (diff)
Support WindowTitleHint and FramelessWindowHint in QWasmWindow
WindowTitleHint now correctly enables/disables the window title, and FramelessWindowHint correctly enables/disables the window frame. Change-Id: I6f98f0a53af828606748308c6b5bd5d492cef9d2 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcssstyle.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmcssstyle.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcssstyle.cpp b/src/plugins/platforms/wasm/qwasmcssstyle.cpp
index 0002c05d393..3efe4504957 100644
--- a/src/plugins/platforms/wasm/qwasmcssstyle.cpp
+++ b/src/plugins/platforms/wasm/qwasmcssstyle.cpp
@@ -39,7 +39,7 @@ 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-title-bar {
+.qt-window.has-frame {
border: var(--border-width) solid lightgray;
caret-color: transparent;
}
@@ -49,7 +49,7 @@ const char *Style = R"css(
display: none;
}
-.qt-window.has-title-bar:not(.maximized) .resize-outline {
+.qt-window.has-frame:not(.maximized) .resize-outline {
display: block;
}
@@ -125,17 +125,23 @@ const char *Style = R"css(
padding-bottom: 4px;
}
-.qt-window.has-title-bar .title-bar {
+.qt-window.has-frame .title-bar {
display: flex;
}
.title-bar .window-name {
+ display: none;
font-family: 'Lucida Grande';
white-space: nowrap;
user-select: none;
overflow: hidden;
}
+
+.qt-window.has-title .title-bar .window-name {
+ display: block;
+}
+
.title-bar .spacer {
flex-grow: 1
}