summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmcssstyle.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2023-02-02 09:08:33 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2023-02-03 18:42:21 +0100
commit43a77d4b64608edee3782ddbe15da2364b24567e (patch)
tree6e7153223c8aaa18844bbc64a4a0dad0002a4f83 /src/plugins/platforms/wasm/qwasmcssstyle.cpp
parentb62ac40987e4a53be912227230c4914e77c74e88 (diff)
Remove unused code in qwasmcssstyle
Since 32666691c21cc91a3d7c7585dad711dc9743fdce, icons have been set manually on img elements. The css code assigning the icons to elements is now unused - remove it. Change-Id: I394f08371c80f0e374a5cc7e39d17bb6091d18dc 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.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcssstyle.cpp b/src/plugins/platforms/wasm/qwasmcssstyle.cpp
index efbe4ddcc40..6222e9c88a4 100644
--- a/src/plugins/platforms/wasm/qwasmcssstyle.cpp
+++ b/src/plugins/platforms/wasm/qwasmcssstyle.cpp
@@ -169,21 +169,6 @@ const char *Style = R"css(
background-size: 10px 10px;
}
-.title-bar .image-button img[qt-builtin-image-type=x] {
- background-image: url("data:image/svg+xml;base64,$close_icon");
-}
-
-.title-bar .image-button img[qt-builtin-image-type=qt-logo] {
- background-image: url("qtlogo.svg");
-}
-
-.title-bar .image-button img[qt-builtin-image-type=restore] {
- background-image: url("data:image/svg+xml;base64,$restore_icon");
-}
-
-.title-bar .image-button img[qt-builtin-image-type=maximize] {
- background-image: url("data:image/svg+xml;base64,$maximize_icon");
-}
.title-bar .action-button {
pointer-events: all;
}
@@ -206,24 +191,14 @@ const char *Style = R"css(
)css";
-void replace(std::string &str, const std::string &from, const std::string_view &to)
-{
- str.replace(str.find(from), from.length(), to);
-}
} // namespace
emscripten::val QWasmCSSStyle::createStyleElement(emscripten::val parent)
{
auto document = parent["ownerDocument"];
auto screenStyle = document.call<emscripten::val>("createElement", emscripten::val("style"));
- auto text = std::string(Style);
-
- using IconType = Base64IconStore::IconType;
- replace(text, "$close_icon", Base64IconStore::get()->getIcon(IconType::X));
- replace(text, "$restore_icon", Base64IconStore::get()->getIcon(IconType::Restore));
- replace(text, "$maximize_icon", Base64IconStore::get()->getIcon(IconType::Maximize));
- screenStyle.set("textContent", text);
+ screenStyle.set("textContent", std::string(Style));
return screenStyle;
}