From fd2535ecaf2978d4815e86fd3cf85f18e018b2ea Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sun, 6 Sep 2020 20:40:07 +1200 Subject: [PATCH] Fix browser window buttons and Web page favicon display --- interface/resources/qml/Browser.qml | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/interface/resources/qml/Browser.qml b/interface/resources/qml/Browser.qml index 496209a2a8..d2b93f45c9 100644 --- a/interface/resources/qml/Browser.qml +++ b/interface/resources/qml/Browser.qml @@ -63,29 +63,38 @@ ScrollingWindow { anchors.leftMargin: 8 HiFiGlyphs { id: back; - enabled: webview.canGoBack; + enabled: webview.canGoBack text: hifi.glyphs.backward - color: enabled ? hifi.colors.text : hifi.colors.disabledText + color: enabled ? hifi.colors.faintGray : hifi.colors.lightGray size: 48 - MouseArea { anchors.fill: parent; onClicked: webview.goBack() } + MouseArea { + anchors.fill: parent + onClicked: webview.goBack(); + } } HiFiGlyphs { id: forward; - enabled: webview.canGoForward; + enabled: webview.canGoForward text: hifi.glyphs.forward - color: enabled ? hifi.colors.text : hifi.colors.disabledText + color: enabled ? hifi.colors.faintGray : hifi.colors.lightGray size: 48 - MouseArea { anchors.fill: parent; onClicked: webview.goForward() } + MouseArea { + anchors.fill: parent + onClicked: webview.goForward(); + } } HiFiGlyphs { id: reload; - enabled: webview.canGoForward; + enabled: url !== "" text: webview.loading ? hifi.glyphs.close : hifi.glyphs.reload - color: enabled ? hifi.colors.text : hifi.colors.disabledText + color: enabled ? hifi.colors.faintGray : hifi.colors.lightGray size: 48 - MouseArea { anchors.fill: parent; onClicked: webview.goForward() } + MouseArea { + anchors.fill: parent + onClicked: webview.loading ? webview.stop() : webview.reload(); + } } } @@ -105,11 +114,12 @@ ScrollingWindow { width: parent.height height: parent.height Image { - source: webview.icon; + source: webview.icon x: (parent.height - height) / 2 y: (parent.width - width) / 2 - sourceSize: Qt.size(width, height); - verticalAlignment: Image.AlignVCenter; + width: 28 + height: 28 + verticalAlignment: Image.AlignVCenter horizontalAlignment: Image.AlignHCenter } }