feat: add showFavoritesBar setting (placeholder for now)
This commit is contained in:
parent
825097f007
commit
16f5c2fb1a
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import "../../../../imports"
|
||||
import "../../../../shared"
|
||||
|
@ -10,23 +9,30 @@ Item {
|
|||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
StyledText {
|
||||
id: title
|
||||
text: qsTr("Browser Settings")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 24
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 24
|
||||
font.weight: Font.Bold
|
||||
font.pixelSize: 20
|
||||
}
|
||||
|
||||
Column {
|
||||
id: containerColumn
|
||||
spacing: Style.current.padding
|
||||
anchors.top: title.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.padding
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: contentMargin
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 24
|
||||
anchors.leftMargin: contentMargin
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
StatusSectionHeadline {
|
||||
id: labelGeneral
|
||||
text: qsTr("General")
|
||||
}
|
||||
|
||||
StatusSettingsLineButton {
|
||||
text: qsTr("Show favorites bar")
|
||||
isSwitch: true
|
||||
switchChecked: appSettings.showFavoritesBar
|
||||
onClicked: function (checked) {
|
||||
appSettings.showFavoritesBar = checked
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
StyledText {
|
||||
|
|
|
@ -86,40 +86,9 @@ Item {
|
|||
Layout.topMargin: Style.current.bigPadding - containerColumn.spacing
|
||||
}
|
||||
|
||||
Item {
|
||||
id: dappPermissions
|
||||
height: dappPermissionsText.height
|
||||
width: parent.width
|
||||
|
||||
StyledText {
|
||||
id: dappPermissionsText
|
||||
text: qsTr("Set DApp access permissions")
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
SVGImage {
|
||||
id: caret2
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.verticalCenter: dappPermissionsText.verticalCenter
|
||||
source: "../../../img/caret.svg"
|
||||
width: 13
|
||||
height: 7
|
||||
rotation: -90
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
anchors.fill: caret2
|
||||
source: caret2
|
||||
color: Style.current.darkGrey
|
||||
rotation: -90
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: dappListPopup.createObject(privacyContainer).open()
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
StatusSettingsLineButton {
|
||||
text: qsTr("Set DApp access permissions")
|
||||
onClicked: dappListPopup.createObject(privacyContainer).open()
|
||||
}
|
||||
|
||||
Separator {
|
||||
|
|
|
@ -32,6 +32,7 @@ QtObject {
|
|||
property color background
|
||||
property color border
|
||||
property color textColor
|
||||
property color secondaryText
|
||||
property color currentUserTextColor
|
||||
property color secondaryBackground
|
||||
property color modalBackground
|
||||
|
|
|
@ -113,6 +113,7 @@ ApplicationWindow {
|
|||
property int fontSize: Constants.fontSizeM
|
||||
|
||||
// Browser settings
|
||||
property bool showFavoritesBar: false
|
||||
property bool autoLoadImages: true
|
||||
property bool javaScriptEnabled: true
|
||||
property bool errorPageEnabled: true
|
||||
|
@ -150,6 +151,7 @@ ApplicationWindow {
|
|||
property bool hideSignPhraseModal: defaultAppSettings.hideSignPhraseModal
|
||||
|
||||
// Browser settings
|
||||
property bool showFavoritesBar: defaultAppSettings.showFavoritesBar
|
||||
property bool autoLoadImages: defaultAppSettings.autoLoadImages
|
||||
property bool javaScriptEnabled: defaultAppSettings.javaScriptEnabled
|
||||
property bool errorPageEnabled: defaultAppSettings.errorPageEnabled
|
||||
|
|
|
@ -406,4 +406,5 @@ DISTFILES += \
|
|||
shared/qmldir \
|
||||
shared/status/StatusEmojiSuggestionPopup.qml \
|
||||
shared/status/StatusInputListPopup.qml \
|
||||
shared/status/StatusSettingsLineButton.qml \
|
||||
sounds/ErrorSound.qml
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
import QtQuick 2.13
|
||||
import QtGraphicalEffects 1.12
|
||||
import "../../imports"
|
||||
import ".."
|
||||
|
||||
Item {
|
||||
property string text
|
||||
property bool isSwitch: false
|
||||
property bool switchChecked: false
|
||||
property string currentValue
|
||||
signal clicked(bool checked)
|
||||
|
||||
id: root
|
||||
height: textItem.height
|
||||
width: parent.width
|
||||
|
||||
StyledText {
|
||||
id: textItem
|
||||
text: root.text
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: valueText
|
||||
visible: !!root.currentValue
|
||||
text: root.currentValue
|
||||
font.pixelSize: 15
|
||||
color: Style.current.secondaryText
|
||||
anchors.right: root.isSwitch ? switchItem.left : caret.left
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.verticalCenter: textItem.verticalCenter
|
||||
}
|
||||
|
||||
StatusSwitch {
|
||||
id: switchItem
|
||||
visible: root.isSwitch
|
||||
checked: root.switchChecked
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: textItem.verticalCenter
|
||||
}
|
||||
|
||||
SVGImage {
|
||||
id: caret
|
||||
visible: !root.isSwitch
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: textItem.verticalCenter
|
||||
source: "../../app/img/caret.svg"
|
||||
width: 13
|
||||
height: 7
|
||||
rotation: -90
|
||||
ColorOverlay {
|
||||
anchors.fill: caret
|
||||
source: caret
|
||||
color: Style.current.darkGrey
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
root.clicked(!root.switchChecked)
|
||||
}
|
||||
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue