Move default font color to Style.qml

This commit is contained in:
Sander Ferdinand 2017-12-07 17:33:46 +01:00 committed by moneromooo-monero
parent 22792df5cd
commit 868fbe2f2d
7 changed files with 17 additions and 24 deletions

View file

@ -29,7 +29,6 @@
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtQuick 2.10 import QtQuick 2.10
import "." 1.0 import "." 1.0
import "../components"
TextField { TextField {
@ -38,7 +37,7 @@ TextField {
font.bold: true font.bold: true
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
selectByMouse: true selectByMouse: true
color: "white" color: Style.defaultFontColor
background: Rectangle { background: Rectangle {
color: "transparent" color: "transparent"

View file

@ -41,7 +41,7 @@ TextArea {
font.bold: true font.bold: true
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
selectByMouse: true selectByMouse: true
color: "white" color: Style.defaultFontColor
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
onTextChanged: { onTextChanged: {
if(addressValidation){ if(addressValidation){

View file

@ -29,6 +29,8 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import "." 1.0
Item { Item {
id: item id: item
property alias text: label.text property alias text: label.text
@ -49,10 +51,10 @@ Item {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: 2 * scaleRatio anchors.bottomMargin: 2 * scaleRatio
anchors.left: parent.left anchors.left: parent.left
font.family: "Arial" font.family: Style.fontRegular.name
font.pixelSize: fontSize font.pixelSize: fontSize
font.bold: fontBold font.bold: fontBold
color: "white" color: Style.defaultFontColor
onLinkActivated: item.linkActivated() onLinkActivated: item.linkActivated()
} }

View file

@ -95,7 +95,7 @@ Item {
font.pixelSize: labelFontSize font.pixelSize: labelFontSize
font.bold: labelFontBold font.bold: labelFontBold
textFormat: Text.RichText textFormat: Text.RichText
color: "white" color: Style.defaultFontColor
onLinkActivated: item.labelLinkActivated() onLinkActivated: item.labelLinkActivated()
MouseArea { MouseArea {

View file

@ -8,6 +8,7 @@ QtObject {
property QtObject fontLight: FontLoader { id: _fontLight; source: "qrc:/fonts/SFUIDisplay-Light.otf"; } property QtObject fontLight: FontLoader { id: _fontLight; source: "qrc:/fonts/SFUIDisplay-Light.otf"; }
property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/SFUIDisplay-Regular.otf"; } property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/SFUIDisplay-Regular.otf"; }
property string defaultFontColor: "white"
property string inputBoxBackground: "black" property string inputBoxBackground: "black"
property string inputBoxBackgroundError: "#FFDDDD" property string inputBoxBackgroundError: "#FFDDDD"
property string inputBoxColor: "white" property string inputBoxColor: "white"
@ -15,4 +16,6 @@ QtObject {
property string buttonBackgroundColorDisabled: "#3B3B3B" property string buttonBackgroundColorDisabled: "#3B3B3B"
property string buttonTextColor: "white" property string buttonTextColor: "white"
property string buttonTextColorDisabled: "black" property string buttonTextColorDisabled: "black"
property string dividerColor: "white"
property real dividerOpacity: 0.25
} }

View file

@ -1,6 +1,10 @@
import QtQuick 2.0 import QtQuick 2.0
import "." 1.0
TextEdit { TextEdit {
color: Style.defaultFontColor
font.family: Style.fontRegular.name
wrapMode: Text.Wrap wrapMode: Text.Wrap
readOnly: true readOnly: true
selectByMouse: true selectByMouse: true

View file

@ -213,7 +213,7 @@ Rectangle {
font.pixelSize: 16 * scaleRatio font.pixelSize: 16 * scaleRatio
font.bold: labelFontBold font.bold: labelFontBold
textFormat: Text.RichText textFormat: Text.RichText
color: "white" color: Style.defaultFontColor
onLinkActivated: { appWindow.showPageRequest("AddressBook") } onLinkActivated: { appWindow.showPageRequest("AddressBook") }
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ text: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
Address <font size='2'> ( </font> <a href='#'>Address book</a><font size='2'> )</font>") Address <font size='2'> ( </font> <a href='#'>Address book</a><font size='2'> )</font>")
@ -292,10 +292,6 @@ Rectangle {
StandardButton { StandardButton {
id: qrfinderButton id: qrfinderButton
text: qsTr("QR Code") + translationManager.emptyString text: qsTr("QR Code") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible : appWindow.qrScannerEnabled visible : appWindow.qrScannerEnabled
enabled : visible enabled : visible
width: visible ? 60 * scaleRatio : 0 width: visible ? 60 * scaleRatio : 0
@ -398,7 +394,8 @@ Rectangle {
visible: persistentSettings.transferShowAdvanced visible: persistentSettings.transferShowAdvanced
Layout.fillWidth: true Layout.fillWidth: true
height: 1 height: 1
color: "#DEDEDE" color: Style.dividerColor
opacity: Style.dividerOpacity
Layout.bottomMargin: 30 * scaleRatio Layout.bottomMargin: 30 * scaleRatio
} }
@ -450,10 +447,6 @@ Rectangle {
StandardButton { StandardButton {
id: sweepUnmixableButton id: sweepUnmixableButton
text: qsTr("Sweep Unmixable") + translationManager.emptyString text: qsTr("Sweep Unmixable") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
enabled : pageRoot.enabled enabled : pageRoot.enabled
onClicked: { onClicked: {
console.log("Transfer: sweepUnmixableClicked") console.log("Transfer: sweepUnmixableClicked")
@ -464,10 +457,6 @@ Rectangle {
StandardButton { StandardButton {
id: saveTxButton id: saveTxButton
text: qsTr("Create tx file") + translationManager.emptyString text: qsTr("Create tx file") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible: appWindow.viewOnly visible: appWindow.viewOnly
enabled: pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype) enabled: pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
onClicked: { onClicked: {
@ -486,10 +475,6 @@ Rectangle {
StandardButton { StandardButton {
id: signTxButton id: signTxButton
text: qsTr("Sign tx file") + translationManager.emptyString text: qsTr("Sign tx file") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
visible: !appWindow.viewOnly visible: !appWindow.viewOnly
onClicked: { onClicked: {
console.log("Transfer: sign tx clicked") console.log("Transfer: sign tx clicked")