From 17c946de6d4e16bdc88d36310c92f9d42e89ec38 Mon Sep 17 00:00:00 2001 From: erinn Date: Wed, 9 Dec 2020 14:09:46 -0800 Subject: [PATCH] only show settings icon in history warning for default state --- qml/overlays/ChatOverlay.qml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/qml/overlays/ChatOverlay.qml b/qml/overlays/ChatOverlay.qml index b34472e8..76539d95 100644 --- a/qml/overlays/ChatOverlay.qml +++ b/qml/overlays/ChatOverlay.qml @@ -80,16 +80,24 @@ W.Overlay { ) } - Opaque.Icon { + Loader { anchors.horizontalCenter: parent.horizontalCenter - backgroundColor: Theme.backgroundMainColor - iconColor: Theme.chatOverlayWarningTextColor - source: gcd.assetPath + "core/peer_settings-24px.webp" - size: Theme.uiIconSizeM - sourceWidth: 72 - sourceHeight: 72 - width: Theme.uiIconSizeM - height: Theme.uiIconSizeM + height: overlayRoot.historyState == "DefaultDeleteHistory" ? Theme.uiIconSizeM : 0 + sourceComponent: overlayRoot.historyState == "DefaultDeleteHistory" ? settingsIcon : undefined + } + + Component { + id: settingsIcon + Opaque.Icon { + backgroundColor: Theme.backgroundMainColor + iconColor: Theme.chatOverlayWarningTextColor + source: gcd.assetPath + "core/peer_settings-24px.webp" + size: Theme.uiIconSizeM + sourceWidth: 72 + sourceHeight: 72 + width: Theme.uiIconSizeM + height: Theme.uiIconSizeM + } } Opaque.HLine {}