Wizard, AddressBook, SettingsNode: prevent undesired text selection

pull/2/head
xiphon 5 years ago
parent 6c2c17ada1
commit f47335f89f

@ -67,21 +67,18 @@ Rectangle {
spacing: 0 spacing: 0
Layout.fillWidth: true Layout.fillWidth: true
TextArea { Text {
id: titleLabel id: titleLabel
Layout.fillWidth: true Layout.fillWidth: true
color: MoneroComponents.Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 32 font.pixelSize: 32
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
selectByMouse: false
wrapMode: Text.WordWrap; wrapMode: Text.WordWrap;
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
text: qsTr("Save your most used addresses here") + translationManager.emptyString text: qsTr("Save your most used addresses here") + translationManager.emptyString
width: parent.width width: parent.width
readOnly: true
// @TODO: Legacy. Remove after Qt 5.8. // @TODO: Legacy. Remove after Qt 5.8.
// https://stackoverflow.com/questions/41990013 // https://stackoverflow.com/questions/41990013
@ -91,20 +88,17 @@ Rectangle {
} }
} }
TextArea { Text {
Layout.fillWidth: true Layout.fillWidth: true
color: MoneroComponents.Style.dimmedFontColor color: MoneroComponents.Style.dimmedFontColor
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16 font.pixelSize: 16
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
selectByMouse: false
wrapMode: Text.WordWrap; wrapMode: Text.WordWrap;
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
text: qsTr("This makes it easier to send or receive Monero and reduces errors when typing in addresses manually.") + translationManager.emptyString text: qsTr("This makes it easier to send or receive Monero and reduces errors when typing in addresses manually.") + translationManager.emptyString
width: parent.width width: parent.width
readOnly: true
// @TODO: Legacy. Remove after Qt 5.8. // @TODO: Legacy. Remove after Qt 5.8.
// https://stackoverflow.com/questions/41990013 // https://stackoverflow.com/questions/41990013

@ -119,7 +119,7 @@ Rectangle{
text: qsTr("Local node") + translationManager.emptyString text: qsTr("Local node") + translationManager.emptyString
} }
TextArea { Text {
id: localNodeArea id: localNodeArea
anchors.top: localNodeHeader.bottom anchors.top: localNodeHeader.bottom
anchors.topMargin: 4 anchors.topMargin: 4
@ -129,14 +129,11 @@ Rectangle{
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 15 font.pixelSize: 15
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
selectByMouse: false
wrapMode: Text.WordWrap; wrapMode: Text.WordWrap;
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
text: qsTr("The blockchain is downloaded to your computer. Provides higher security and requires more local storage.") + translationManager.emptyString text: qsTr("The blockchain is downloaded to your computer. Provides higher security and requires more local storage.") + translationManager.emptyString
width: parent.width - (localNodeIcon.width + localNodeIcon.anchors.leftMargin + anchors.leftMargin) width: parent.width - (localNodeIcon.width + localNodeIcon.anchors.leftMargin + anchors.leftMargin)
readOnly: true
// @TODO: Legacy. Remove after Qt 5.8. // @TODO: Legacy. Remove after Qt 5.8.
// https://stackoverflow.com/questions/41990013 // https://stackoverflow.com/questions/41990013
@ -221,7 +218,7 @@ Rectangle{
text: qsTr("Remote node") + translationManager.emptyString text: qsTr("Remote node") + translationManager.emptyString
} }
TextArea { Text {
id: remoteNodeArea id: remoteNodeArea
anchors.top: remoteNodeHeader.bottom anchors.top: remoteNodeHeader.bottom
anchors.topMargin: 4 anchors.topMargin: 4
@ -230,16 +227,12 @@ Rectangle{
color: MoneroComponents.Style.dimmedFontColor color: MoneroComponents.Style.dimmedFontColor
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 15 font.pixelSize: 15
activeFocusOnPress: false
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
selectByMouse: false
wrapMode: Text.WordWrap; wrapMode: Text.WordWrap;
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
text: qsTr("Uses a third-party server to connect to the Monero network. Less secure, but easier on your computer.") + translationManager.emptyString text: qsTr("Uses a third-party server to connect to the Monero network. Less secure, but easier on your computer.") + translationManager.emptyString
width: parent.width - (remoteNodeIcon.width + remoteNodeIcon.anchors.leftMargin + anchors.leftMargin) width: parent.width - (remoteNodeIcon.width + remoteNodeIcon.anchors.leftMargin + anchors.leftMargin)
readOnly: true
// @TODO: Legacy. Remove after Qt 5.8. // @TODO: Legacy. Remove after Qt 5.8.
// https://stackoverflow.com/questions/41990013 // https://stackoverflow.com/questions/41990013

@ -158,7 +158,7 @@ Rectangle {
} }
} }
TextArea { Text {
id: errorMsg id: errorMsg
text: qsTr("Error writing wallet from hardware device. Check application logs.") + translationManager.emptyString; text: qsTr("Error writing wallet from hardware device. Check application logs.") + translationManager.emptyString;
visible: errorMsg.text !== "" visible: errorMsg.text !== ""
@ -167,16 +167,10 @@ Rectangle {
color: MoneroComponents.Style.errorColor color: MoneroComponents.Style.errorColor
font.pixelSize: 16 font.pixelSize: 16
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
readOnly: true
} }
WizardNav { WizardNav {

@ -91,7 +91,7 @@ ColumnLayout {
Layout.topMargin: 6 Layout.topMargin: 6
spacing: 0 spacing: 0
TextArea { Text {
text: qsTr("Bootstrap node") + translationManager.emptyString text: qsTr("Bootstrap node") + translationManager.emptyString
Layout.topMargin: 10 Layout.topMargin: 10
Layout.fillWidth: true Layout.fillWidth: true
@ -105,19 +105,13 @@ ColumnLayout {
} }
} }
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
readOnly: true
} }
TextArea { Text {
text: qsTr("Additionally, you may specify a bootstrap node to use Monero immediately.") + translationManager.emptyString text: qsTr("Additionally, you may specify a bootstrap node to use Monero immediately.") + translationManager.emptyString
Layout.topMargin: 4 Layout.topMargin: 4
Layout.fillWidth: true Layout.fillWidth: true
@ -133,16 +127,10 @@ ColumnLayout {
} }
} }
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
readOnly: true
} }
} }

@ -41,7 +41,7 @@ ColumnLayout {
spacing: 4 spacing: 4
Layout.maximumWidth: wizardController.wizardSubViewWidth Layout.maximumWidth: wizardController.wizardSubViewWidth
TextArea { Text {
text: title text: title
Layout.fillWidth: true Layout.fillWidth: true
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
@ -55,19 +55,13 @@ ColumnLayout {
} }
} }
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
readOnly: true
} }
TextArea { Text {
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignCenter Layout.alignment: Qt.AlignCenter
visible: parent.subtitle !== "" visible: parent.subtitle !== ""
@ -84,14 +78,8 @@ ColumnLayout {
} }
} }
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
readOnly: true
} }
} }

@ -67,7 +67,7 @@ Rectangle {
width: parent.width - 100 width: parent.width - 100
anchors.horizontalCenter: parent.horizontalCenter; anchors.horizontalCenter: parent.horizontalCenter;
TextArea { Text {
text: qsTr("Language settings") + translationManager.emptyString text: qsTr("Language settings") + translationManager.emptyString
Layout.fillWidth: true Layout.fillWidth: true
font.family: MoneroComponents.Style.fontRegular.name font.family: MoneroComponents.Style.fontRegular.name
@ -80,19 +80,13 @@ Rectangle {
} }
} }
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
readOnly: true
} }
TextArea { Text {
Layout.fillWidth: true Layout.fillWidth: true
visible: parent.subtitle !== "" visible: parent.subtitle !== ""
@ -108,15 +102,9 @@ Rectangle {
} }
} }
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
readOnly: true
} }
Flow { Flow {

@ -57,7 +57,7 @@ Rectangle {
color: "transparent" color: "transparent"
} }
TextArea { Text {
id: textWelcome id: textWelcome
opacity: 0 opacity: 0
Layout.preferredWidth: parent.width / 1.3 Layout.preferredWidth: parent.width / 1.3
@ -69,12 +69,9 @@ Rectangle {
font.bold: true font.bold: true
font.pixelSize: 18 font.pixelSize: 18
horizontalAlignment: TextInput.AlignHCenter horizontalAlignment: TextInput.AlignHCenter
selectByMouse: false
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
readOnly: true
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {

@ -198,7 +198,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
} }
TextArea { Text {
text: { text: {
// truncate on window width // truncate on window width
var maxLength = wizardController.layoutScale <= 1 ? 12 : 16 var maxLength = wizardController.layoutScale <= 1 ? 12 : 16
@ -214,19 +214,13 @@ Rectangle {
color: MoneroComponents.Style.defaultFontColor color: MoneroComponents.Style.defaultFontColor
font.pixelSize: 16 font.pixelSize: 16
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
selectByMouse: false
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: networktype !== -1 ? 8 : 4 topPadding: networktype !== -1 ? 8 : 4
bottomPadding: 0 bottomPadding: 0
readOnly: true
} }
TextArea { Text {
visible: networktype !== -1 visible: networktype !== -1
Layout.preferredHeight: 24 Layout.preferredHeight: 24
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
@ -236,16 +230,10 @@ Rectangle {
color: MoneroComponents.Style.dimmedFontColor color: MoneroComponents.Style.dimmedFontColor
font.pixelSize: 14 font.pixelSize: 14
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: false
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0 leftPadding: 0
topPadding: 0 topPadding: 0
bottomPadding: 0 bottomPadding: 0
readOnly: true
} }
Item { Item {