fix(ChooseBrowserPopup): 'Choose browser' modal doesn't look good

- export a non-blurry browsers image from Figma
- bring the whole UI closer to the design
- sllight refactor to user StatusDialog and layouts

Fixes #7169
This commit is contained in:
Lukáš Tinkl 2022-08-31 10:30:27 +02:00 committed by Lukáš Tinkl
parent 2d873db153
commit 24719c680f
3 changed files with 26 additions and 25 deletions

View File

@ -1,65 +1,66 @@
import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import utils 1.0
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Popups.Dialog 0.1
StatusDialog {
id: root
StatusModal {
property string link
id: popup
anchors.centerIn: parent
title: qsTr("Choose browser")
width: 400
footer: null
header.title: qsTr("Choose browser")
width: 440
contentItem: Column {
width: popup.width - 32
contentItem: ColumnLayout {
spacing: 20
anchors.horizontalCenter: popup.horizontalCenter
Image {
source: Style.png("browser/chooseBrowserImage")
width: 240
height: 148
anchors.horizontalCenter: parent.horizontalCenter
source: Style.png("browser/chooseBrowserImage@2x")
Layout.preferredWidth: 240
Layout.preferredHeight: 148
Layout.alignment: Qt.AlignHCenter
}
StatusButton {
Layout.alignment: Qt.AlignHCenter
text: qsTr("Open in Status")
anchors.horizontalCenter: parent.horizontalCenter
font.weight: Font.Medium
onClicked: {
localAccountSensitiveSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
if (rememberChoiceCheckBox.checked) {
localAccountSensitiveSettings.openLinksInStatus = true
}
Global.changeAppSectionBySectionType(Constants.appSection.browser)
browserLayoutContainer.item.openUrlInNewTab(popup.link)
popup.close()
Global.openLinkInBrowser(root.link)
root.close()
}
}
StatusFlatButton {
text: qsTr("Open in my default browser")
anchors.horizontalCenter: parent.horizontalCenter
Layout.alignment: Qt.AlignHCenter
font.weight: Font.Medium
onClicked: {
localAccountSensitiveSettings.showBrowserSelector = !rememberChoiceCheckBox.checked
if (rememberChoiceCheckBox.checked) {
localAccountSensitiveSettings.openLinksInStatus = false
}
Qt.openUrlExternally(popup.link)
popup.close()
Qt.openUrlExternally(root.link)
root.close()
}
}
StatusCheckBox {
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: Style.current.smallPadding
id: rememberChoiceCheckBox
font.pixelSize: 13
text: qsTr("Remember my choice. To override it, go to settings.")
width: parent.width
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB