diff options
author | Mikolaj Boc <[email protected]> | 2023-02-02 09:08:33 +0100 |
---|---|---|
committer | Mikolaj Boc <[email protected]> | 2023-03-24 18:06:48 +0100 |
commit | 4d56e30f1f63a33c94067a8a11d6446b36967434 (patch) | |
tree | 08569a6338aab64a7b467b9ee83c82378db89510 | |
parent | 9a4df2b924a3f268bd34f965846a307c5173e6e7 (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 <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
(cherry picked from commit 43a77d4b64608edee3782ddbe15da2364b24567e)
Reviewed-by: Mikołaj Boc <[email protected]>
-rw-r--r-- | src/plugins/platforms/wasm/qwasmcssstyle.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcssstyle.cpp b/src/plugins/platforms/wasm/qwasmcssstyle.cpp index 2b2a225f530..a15826da9f6 100644 --- a/src/plugins/platforms/wasm/qwasmcssstyle.cpp +++ b/src/plugins/platforms/wasm/qwasmcssstyle.cpp @@ -168,21 +168,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; } @@ -205,24 +190,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; } |