@ -40,17 +40,17 @@ import "components/effects/" as MoneroEffects
Rectangle {
Rectangle {
id: panel
id: panel
property alias unlockedBalanceText: unlockedBalanceText . text
property int currentAccountIndex: 0
property alias unlockedBalanceVisible: unlockedBalanceText . visible
property string currentAccountLabel: "Primary account"
property alias unlockedBalanceLabelVisible: unlockedBalanceLabel . visible
property string balanceString: "?.??"
property alias balanceLabelText: balanceLabel . text
property string balanceUnlockedString: "?.??"
property alias balanceText: balanceText . text
property string balanceFiatString: "?.??"
property alias balanceTextFiat: balanceTextFiat . text
property string minutesToUnlock: ""
property alias unlockedBalanceTextFiat: unlockedBalanceTextFiat . text
property bool isSyncing: false
property alias networkStatus : networkStatus
property alias networkStatus : networkStatus
property alias progressBar : progressBar
property alias progressBar : progressBar
property alias daemonProgressBar : daemonProgressBar
property alias daemonProgressBar : daemonProgressBar
property alias minutesToUnlockTxt: unlockedBalanceLabel . text
property int titleBarHeight: 50
property int titleBarHeight: 50
property string copyValue: ""
property string copyValue: ""
Clipboard { id: clipboard }
Clipboard { id: clipboard }
@ -108,7 +108,7 @@ Rectangle {
visible: true
visible: true
z: 2
z: 2
id: column1
id: column1
height: 210
height: 175
anchors.left: parent . left
anchors.left: parent . left
anchors.right: parent . right
anchors.right: parent . right
anchors.top: parent . top
anchors.top: parent . top
@ -127,9 +127,9 @@ Rectangle {
id: card
id: card
visible: ! isOpenGL || MoneroComponents . Style . blackTheme
visible: ! isOpenGL || MoneroComponents . Style . blackTheme
width: 260
width: 260
height: 1 70
height: 1 35
fillMode: Image . PreserveAspectFit
fillMode: Image . PreserveAspectFit
source: "qrc:///images/card-background .png"
source: MoneroComponents . Style . blackTheme ? "qrc:///images/card-background -black.png" : "qrc:///images/card-background-white .png"
}
}
DropShadow {
DropShadow {
@ -179,7 +179,7 @@ Rectangle {
anchors.right: parent . right
anchors.right: parent . right
anchors.rightMargin: 8
anchors.rightMargin: 8
anchors.top: parent . top
anchors.top: parent . top
anchors.topMargin: 25
anchors.topMargin: 30
Image {
Image {
id: logoutImage
id: logoutImage
@ -190,6 +190,13 @@ Rectangle {
source: "qrc:///images/logout.png"
source: "qrc:///images/logout.png"
}
}
ColorOverlay {
anchors.fill: logoutImage
source: logoutImage
visible: ! MoneroComponents . Style . blackTheme
color: "#000000"
}
MouseArea {
MouseArea {
anchors.fill: parent
anchors.fill: parent
hoverEnabled: true
hoverEnabled: true
@ -202,26 +209,6 @@ Rectangle {
}
}
}
}
}
}
MoneroComponents . Label {
fontSize: 20
text: persistentSettings . fiatPriceCurrency == "xmrusd" ? "$" : "€"
color: "white"
visible: persistentSettings . fiatPriceEnabled
anchors.right: parent . right
anchors.rightMargin: 45
anchors.top: parent . top
anchors.topMargin: 28
themeTransition: false
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt . PointingHandCursor
onClicked: {
persistentSettings . fiatPriceToggle = ! persistentSettings . fiatPriceToggle
}
}
}
}
}
Item {
Item {
@ -232,176 +219,152 @@ Rectangle {
height: 490
height: 490
width: 50
width: 50
MoneroComponents . TextPlain {
MoneroComponents . Label {
visible: ! ( persistentSettings . fiatPriceToggle && persistentSettings . fiatPriceEnabled )
fontSize: 12
id: balanceText
id: accountIndex
themeTransition: false
text: qsTr ( "Account" ) + " #" + currentAccountIndex
color: MoneroComponents . Style . blackTheme ? "white" : "black"
anchors.left: parent . left
anchors.left: parent . left
anchors.leftMargin: 2 0
anchors.leftMargin: 6 0
anchors.top: parent . top
anchors.top: parent . top
anchors.topMargin: 76
anchors.topMargin: 23
font.family: "Arial"
themeTransition: false
color: "#FFFFFF"
text: "N/A"
MouseArea {
/ / d y n a m i c a l l y a d j u s t t e x t s i z e
anchors.fill: parent
font.pixelSize: {
hoverEnabled: true
if ( persistentSettings . hideBalance ) {
cursorShape: Qt . PointingHandCursor
return 20 ;
onClicked: appWindow . showPageRequest ( "Account" )
}
var digits = text . split ( '.' ) [ 0 ] . length
var defaultSize = 22 ;
if ( digits > 2 ) {
return defaultSize - 1.1 * digits
}
return defaultSize ;
}
}
}
MoneroComponents . Label {
fontSize: 16
id: accountLabel
textWidth: 170
text: currentAccountLabel
color: MoneroComponents . Style . blackTheme ? "white" : "black"
anchors.left: parent . left
anchors.leftMargin: 60
anchors.top: parent . top
anchors.topMargin: 36
themeTransition: false
elide: Text . ElideRight
MouseArea {
MouseArea {
hoverEnabled: true
hoverEnabled: true
anchors.fill: parent
anchors.fill: parent
cursorShape: Qt . PointingHandCursor
cursorShape: Qt . PointingHandCursor
onEntered: {
onClicked: appWindow . showPageRequest ( "Account" )
parent . color = MoneroComponents . Style . orange
}
onExited: {
parent . color = MoneroComponents . Style . white
}
onClicked: {
console . log ( "Copied to clipboard" ) ;
clipboard . setText ( parent . text ) ;
appWindow . showStatusMessage ( qsTr ( "Copied to clipboard" ) , 3 )
}
}
}
}
}
MoneroComponents . TextPlain {
MoneroComponents . Label {
visible: ! balanceText . visible
fontSize: 16
id: balanceTextFiat
visible: isSyncing
text: qsTr ( "Syncing..." )
color: MoneroComponents . Style . blackTheme ? "white" : "black"
anchors.left: parent . left
anchors.leftMargin: 20
anchors.bottom: currencyLabel . top
anchors.bottomMargin: 15
themeTransition: false
themeTransition: false
}
MoneroComponents . TextPlain {
id: currencyLabel
font.pixelSize: 16
text: {
if ( persistentSettings . fiatPriceEnabled && persistentSettings . fiatPriceToggle ) {
return persistentSettings . fiatPriceCurrency == "xmrusd" ? "USD" : "EUR"
} else {
return "XMR"
}
}
color: MoneroComponents . Style . blackTheme ? "white" : "black"
anchors.left: parent . left
anchors.left: parent . left
anchors.leftMargin: 20
anchors.leftMargin: 20
anchors.top: parent . top
anchors.top: parent . top
anchors.topMargin: 76
anchors.topMargin: 100
font.family: "Arial"
themeTransition: false
color: "#FFFFFF"
text: "N/A"
font.pixelSize: balanceText . font . pixelSize
MouseArea {
MouseArea {
hoverEnabled: true
hoverEnabled: true
anchors.fill: parent
anchors.fill: parent
visible: persistentSettings . fiatPriceEnabled
cursorShape: Qt . PointingHandCursor
cursorShape: Qt . PointingHandCursor
onEntered: {
onClicked: persistentSettings . fiatPriceToggle = ! persistentSettings . fiatPriceToggle
parent . color = MoneroComponents . Style . orange
}
onExited: {
parent . color = MoneroComponents . Style . white
}
onClicked: {
console . log ( "Copied to clipboard" ) ;
clipboard . setText ( parent . text ) ;
appWindow . showStatusMessage ( qsTr ( "Copied to clipboard" ) , 3 )
}
}
}
}
}
MoneroComponents . TextPlain {
MoneroComponents . TextPlain {
id: unlockedBalanceText
id: balancePart1
visible: ! ( persistentSettings . fiatPriceToggle && persistentSettings . fiatPriceEnabled )
themeTransition: false
themeTransition: false
anchors.left: parent . left
anchors.left: parent . left
anchors.leftMargin: 20
anchors.leftMargin: 58
anchors.top: parent . top
anchors.baseline: currencyLabel . baseline
anchors.topMargin: 126
color: MoneroComponents . Style . blackTheme ? "white" : "black"
font.family: "Arial"
text: {
color: "#FFFFFF"
if ( persistentSettings . fiatPriceEnabled && persistentSettings . fiatPriceToggle ) {
text: "N/A"
return balanceFiatString . split ( '.' ) [ 0 ] + "."
/ / d y n a m i c a l l y a d j u s t t e x t s i z e
} else {
font.pixelSize: {
return balanceString . split ( '.' ) [ 0 ] + "."
if ( persistentSettings . hideBalance ) {
return 20 ;
}
}
var digits = text . split ( '.' ) [ 0 ] . length
}
var defaultSize = 20 ;
font.pixelSize: {
if ( digits > 3 ) {
var defaultSize = 29 ;
return defaultSize - 0.6 * digits
var digits = ( balancePart1 . text . length - 1 )
if ( digits > 2 && ! ( persistentSettings . fiatPriceEnabled && persistentSettings . fiatPriceToggle ) ) {
return defaultSize - 1.1 * digits
} else {
return defaultSize
}
}
return defaultSize ;
}
}
MouseArea {
MouseArea {
id: balancePart1MouseArea
hoverEnabled: true
hoverEnabled: true
anchors.fill: parent
anchors.fill: parent
cursorShape: Qt . PointingHandCursor
cursorShape: Qt . PointingHandCursor
onEntered: {
onEntered: {
parent . color = MoneroComponents . Style . orange
balancePart1 . color = MoneroComponents . Style . orange
balancePart2 . color = MoneroComponents . Style . orange
}
}
onExited: {
onExited: {
parent . color = MoneroComponents . Style . white
balancePart1 . color = Qt . binding ( function ( ) { return MoneroComponents . Style . blackTheme ? "white" : "black" } )
balancePart2 . color = Qt . binding ( function ( ) { return MoneroComponents . Style . blackTheme ? "white" : "black" } )
}
}
onClicked: {
onClicked: {
console . log ( "Copied to clipboard" ) ;
console . log ( "Copied to clipboard" ) ;
clipboard . setText ( parent . text ) ;
clipboard . setText ( balancePart1. text + balancePart2 . text ) ;
appWindow . showStatusMessage ( qsTr ( "Copied to clipboard" ) , 3 )
appWindow . showStatusMessage ( qsTr ( "Copied to clipboard" ) , 3 )
}
}
}
}
}
}
MoneroComponents . TextPlain {
MoneroComponents . TextPlain {
id: unlockedBalanceTextFiat
id: balancePart2
themeTransition: false
themeTransition: false
visible: ! unlockedBalanceText . visible
anchors.left: balancePart1 . right
anchors.left: parent . left
anchors.leftMargin: 2
anchors.leftMargin: 20
anchors.baseline: currencyLabel . baseline
anchors.top: parent . top
color: MoneroComponents . Style . blackTheme ? "white" : "black"
anchors.topMargin: 126
text: {
font.family: "Arial"
if ( persistentSettings . fiatPriceEnabled && persistentSettings . fiatPriceToggle ) {
color: "#FFFFFF"
return balanceFiatString . split ( '.' ) [ 1 ]
text: "N/A"
} else {
font.pixelSize: unlockedBalanceText . font . pixelSize
return balanceString . split ( '.' ) [ 1 ]
}
}
font.pixelSize: 16
MouseArea {
MouseArea {
hoverEnabled: true
hoverEnabled: true
anchors.fill: parent
anchors.fill: parent
cursorShape: Qt . PointingHandCursor
cursorShape: Qt . PointingHandCursor
onEntered: {
onEntered: balancePart1MouseArea . entered ( )
parent . color = MoneroComponents . Style . orange
onExited: balancePart1MouseArea . exited ( )
}
onClicked: balancePart1MouseArea . clicked ( mouse )
onExited: {
parent . color = MoneroComponents . Style . white
}
onClicked: {
console . log ( "Copied to clipboard" ) ;
clipboard . setText ( parent . text ) ;
appWindow . showStatusMessage ( qsTr ( "Copied to clipboard" ) , 3 )
}
}
}
}
}
MoneroComponents . Label {
id: unlockedBalanceLabel
visible: true
text: qsTr ( "Unlocked balance" ) + translationManager . emptyString
color: "white"
fontSize: 14
anchors.left: parent . left
anchors.leftMargin: 20
anchors.top: parent . top
anchors.topMargin: 110
themeTransition: false
}
MoneroComponents . Label {
id: balanceLabel
text: qsTr ( "Balance" ) + translationManager . emptyString
color: "white"
fontSize: 14
anchors.left: parent . left
anchors.leftMargin: 20
anchors.top: parent . top
anchors.topMargin: 60
elide: Text . ElideRight
textWidth: 238
themeTransition: false
}
Item { / / s e p a r a t o r
Item { / / s e p a r a t o r
anchors.left: parent . left
anchors.left: parent . left
anchors.right: parent . right
anchors.right: parent . right