Compare commits

..

1 Commits

Author SHA1 Message Date
Riccardo Spagni
ea8e3d0267 Merge pull request #841
2bc86d1 monero submodule: use release-v0.11.0.0 branch (Jaquee)
2017-09-25 17:50:24 +02:00
209 changed files with 19410 additions and 56126 deletions

8
.gitignore vendored
View File

@@ -3,11 +3,3 @@
translations/*.qm translations/*.qm
build build
version.js version.js
# IOS stuff below
moc_*
*.o
*.mak
*.build
*.xcodeproj
monero-wallet-gui_plugin_import.cpp
monero-wallet-gui_qml_plugin_import.cpp

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
Copyright (c) 2014-2018, The Monero Project Copyright (c) 2014-2017, The Monero Project
All rights reserved. All rights reserved.

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -27,37 +27,29 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import moneroComponents.NetworkType 1.0
import "components" import "components"
Rectangle { Rectangle {
id: panel id: panel
property alias unlockedBalanceText: unlockedBalanceText.text property alias unlockedBalanceText: unlockedBalanceText.text
property alias unlockedBalanceVisible: unlockedBalanceText.visible
property alias unlockedBalanceLabelVisible: unlockedBalanceLabel.visible
property alias balanceLabelText: balanceLabel.text property alias balanceLabelText: balanceLabel.text
property alias balanceText: balanceText.text property alias balanceText: balanceText.text
property alias networkStatus : networkStatus property alias networkStatus : networkStatus
property alias progressBar : progressBar property alias progressBar : progressBar
property alias daemonProgressBar : daemonProgressBar
property alias minutesToUnlockTxt: unlockedBalanceLabel.text property alias minutesToUnlockTxt: unlockedBalanceLabel.text
property int titleBarHeight: 50
signal dashboardClicked() signal dashboardClicked()
signal historyClicked() signal historyClicked()
signal transferClicked() signal transferClicked()
signal receiveClicked() signal receiveClicked()
signal txkeyClicked() signal txkeyClicked()
signal sharedringdbClicked()
signal settingsClicked() signal settingsClicked()
signal addressBookClicked() signal addressBookClicked()
signal miningClicked() signal miningClicked()
signal signClicked() signal signClicked()
signal keysClicked()
function selectItem(pos) { function selectItem(pos) {
menuColumn.previousButton.checked = false menuColumn.previousButton.checked = false
@@ -68,7 +60,6 @@ Rectangle {
else if(pos === "AddressBook") menuColumn.previousButton = addressBookButton else if(pos === "AddressBook") menuColumn.previousButton = addressBookButton
else if(pos === "Mining") menuColumn.previousButton = miningButton else if(pos === "Mining") menuColumn.previousButton = miningButton
else if(pos === "TxKey") menuColumn.previousButton = txkeyButton else if(pos === "TxKey") menuColumn.previousButton = txkeyButton
else if(pos === "SharedRingDB") menuColumn.previousButton = sharedringdbButton
else if(pos === "Sign") menuColumn.previousButton = signButton else if(pos === "Sign") menuColumn.previousButton = signButton
else if(pos === "Settings") menuColumn.previousButton = settingsButton else if(pos === "Settings") menuColumn.previousButton = settingsButton
else if(pos === "Advanced") menuColumn.previousButton = advancedButton else if(pos === "Advanced") menuColumn.previousButton = advancedButton
@@ -76,185 +67,168 @@ Rectangle {
menuColumn.previousButton.checked = true menuColumn.previousButton.checked = true
} }
width: (isMobile)? appWindow.width : 300 width: (isMobile)? appWindow.width : 260
color: "transparent" color: "#FFFFFF"
anchors.bottom: parent.bottom
anchors.top: parent.top
Image { // Item with monero logo
Item {
visible: !isMobile
id: logoItem
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
height: panel.height anchors.topMargin: (persistentSettings.customDecorations)? 66 : 36
source: "images/leftPanelBg.jpg" height: logo.implicitHeight
z: 1
Image {
id: logo
anchors.left: parent.left
anchors.leftMargin: 50
source: "images/moneroLogo.png"
}
Text {
id: testnetLabel
visible: persistentSettings.testnet
text: qsTr("Testnet") + translationManager.emptyString
anchors.top: logo.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.leftMargin: 50
font.bold: true
color: "red"
}
/* Disable twitter/news panel
Image {
anchors.left: parent.left
anchors.verticalCenter: logo.verticalCenter
anchors.leftMargin: 19
source: appWindow.rightPanelExpanded ? "images/expandRightPanel.png" :
"images/collapseRightPanel.png"
}
MouseArea {
anchors.fill: parent
onClicked: appWindow.rightPanelExpanded = !appWindow.rightPanelExpanded
}
*/
} }
// card with monero logo
Column { Column {
visible: true visible: !isMobile
z: 2
id: column1 id: column1
height: 200
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: logoItem.bottom
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0 anchors.topMargin: 26
spacing: 5
RowLayout { Label {
visible: true visible: !isMobile
id: balanceLabel
text: qsTr("Balance") + translationManager.emptyString
anchors.left: parent.left
anchors.leftMargin: 50
}
Row {
visible: !isMobile
Item { Item {
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 20
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 490 * scaleRatio height: 26
width: 259 * scaleRatio width: 50
Image { Image {
width: 259; height: 170 anchors.centerIn: parent
fillMode: Image.PreserveAspectFit source: "images/lockIcon.png"
source: "images/card-background.png"
}
Text {
id: testnetLabel
visible: persistentSettings.nettype != NetworkType.MAINNET
text: (persistentSettings.nettype == NetworkType.TESTNET ? qsTr("Testnet") : qsTr("Stagenet")) + translationManager.emptyString
anchors.top: parent.top
anchors.topMargin: 8
anchors.left: parent.left
anchors.leftMargin: 192
font.bold: true
font.pixelSize: 12
color: "#f33434"
}
Text {
id: viewOnlyLabel
visible: viewOnly
text: qsTr("View Only") + translationManager.emptyString
anchors.top: parent.top
anchors.topMargin: 8
anchors.right: testnetLabel.visible ? testnetLabel.left : parent.right
anchors.rightMargin: 8
font.pixelSize: 12
font.bold: true
color: "#ff9323"
} }
} }
Item { Text {
anchors.left: parent.left visible: !isMobile
anchors.top: parent.top id: balanceText
anchors.topMargin: 20
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 490 * scaleRatio font.family: "Arial"
width: 50 * scaleRatio color: "#000000"
text: "N/A"
Text { // dynamically adjust text size
visible: !isMobile font.pixelSize: {
id: balanceText var digits = text.split('.')[0].length
anchors.left: parent.left var defaultSize = 25;
anchors.leftMargin: 20 if(digits > 2) {
anchors.top: parent.top return defaultSize - 1.1*digits
anchors.topMargin: 76
font.family: "Arial"
color: "#FFFFFF"
text: "N/A"
// dynamically adjust text size
font.pixelSize: {
var digits = text.split('.')[0].length
var defaultSize = 22;
if(digits > 2) {
return defaultSize - 1.1*digits
}
return defaultSize;
} }
return defaultSize;
} }
}
}
Text { Item { //separator
id: unlockedBalanceText anchors.left: parent.left
visible: true anchors.right: parent.right
anchors.left: parent.left height: 1
anchors.leftMargin: 20 }
anchors.top: parent.top
anchors.topMargin: 126
font.family: "Arial"
color: "#FFFFFF"
text: "N/A"
// dynamically adjust text size
font.pixelSize: {
var digits = text.split('.')[0].length
var defaultSize = 20;
if(digits > 3) {
return defaultSize - 0.6*digits
}
return defaultSize;
}
}
Label { Label {
id: unlockedBalanceLabel id: unlockedBalanceLabel
visible: true text: qsTr("Unlocked balance") + translationManager.emptyString
text: qsTr("Unlocked balance") + translationManager.emptyString anchors.left: parent.left
anchors.left: parent.left anchors.leftMargin: 50
anchors.leftMargin: 20 }
anchors.top: parent.top
anchors.topMargin: 110
}
Label { Text {
visible: !isMobile id: unlockedBalanceText
id: balanceLabel anchors.left: parent.left
text: qsTr("Balance") + translationManager.emptyString anchors.leftMargin: 50
fontSize: 14 font.family: "Arial"
anchors.left: parent.left color: "#000000"
anchors.leftMargin: 20 text: "N/A"
anchors.top: parent.top // dynamically adjust text size
anchors.topMargin: 60 font.pixelSize: {
var digits = text.split('.')[0].length
var defaultSize = 18;
if(digits > 3) {
return defaultSize - 0.6*digits
} }
Item { //separator return defaultSize;
anchors.left: parent.left
anchors.right: parent.right
height: 1
}
/* Disable twitter/news panel
Image {
anchors.left: parent.left
anchors.verticalCenter: logo.verticalCenter
anchors.leftMargin: 19
source: appWindow.rightPanelExpanded ? "images/expandRightPanel.png" :
"images/collapseRightPanel.png"
}
MouseArea {
anchors.fill: parent
onClicked: appWindow.rightPanelExpanded = !appWindow.rightPanelExpanded
}
*/
} }
} }
} }
Rectangle {
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: menuRect.top
width: 1
color: "#DBDBDB"
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: 1
color: "#DBDBDB"
}
Rectangle { Rectangle {
id: menuRect id: menuRect
z: 2
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.top: (isMobile)? parent.top : column1.bottom anchors.top: (isMobile)? parent.top : column1.bottom
anchors.topMargin: (isMobile)? 0 : 32 anchors.topMargin: (isMobile)? 0 : 25
color: "transparent" color: "#1C1C1C"
Flickable { Flickable {
id:flicker contentHeight: 500
contentHeight: (progressBar.visible)? menuColumn.height + separator.height +
networkStatus.height + progressBar.height + daemonProgressBar.height :
menuColumn.height + separator.height + networkStatus.height
anchors.fill: parent anchors.fill: parent
clip: true clip: true
@@ -265,7 +239,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
clip: true
property var previousButton: transferButton property var previousButton: transferButton
// ------------- Dashboard tab --------------- // ------------- Dashboard tab ---------------
@@ -291,19 +265,11 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: dashboardButton.checked || transferButton.checked ? "#1C1C1C" : "#313131" color: dashboardButton.checked || transferButton.checked ? "#1C1C1C" : "#505050"
height: 1 height: 1
} }
*/ */
// top border
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Transfer tab --------------- // ------------- Transfer tab ---------------
MenuButton { MenuButton {
@@ -325,7 +291,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: "#313131" color: "#505050"
height: 1 height: 1
} }
@@ -351,7 +317,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: "#313131" color: "#505050"
height: 1 height: 1
} }
@@ -374,7 +340,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: "#313131" color: "#505050"
height: 1 height: 1
} }
@@ -398,7 +364,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: "#313131" color: "#505050"
height: 1 height: 1
} }
@@ -420,14 +386,13 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: "#313131" color: "#505050"
height: 1 height: 1
} }
// ------------- Mining tab --------------- // ------------- Mining tab ---------------
MenuButton { MenuButton {
id: miningButton id: miningButton
visible: !isAndroid && !isIOS
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
text: qsTr("Mining") + translationManager.emptyString text: qsTr("Mining") + translationManager.emptyString
@@ -446,7 +411,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: miningButton.checked || settingsButton.checked ? "#1C1C1C" : "#313131" color: miningButton.checked || settingsButton.checked ? "#1C1C1C" : "#505050"
height: 1 height: 1
} }
// ------------- TxKey tab --------------- // ------------- TxKey tab ---------------
@@ -454,7 +419,7 @@ Rectangle {
id: txkeyButton id: txkeyButton
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
text: qsTr("Prove/check") + translationManager.emptyString text: qsTr("Check payment") + translationManager.emptyString
symbol: qsTr("K") + translationManager.emptyString symbol: qsTr("K") + translationManager.emptyString
dotColor: "#FFD781" dotColor: "#FFD781"
under: advancedButton under: advancedButton
@@ -469,33 +434,9 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: "#313131" color: "#505050"
height: 1 height: 1
} }
// ------------- Shared RingDB tab ---------------
MenuButton {
id: sharedringdbButton
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Shared RingDB") + translationManager.emptyString
symbol: qsTr("S") + translationManager.emptyString
dotColor: "#FFD781"
under: advancedButton
onClicked: {
parent.previousButton.checked = false
parent.previousButton = sharedringdbButton
panel.sharedringdbClicked()
}
}
Rectangle {
visible: sharedringdbButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Sign/verify tab --------------- // ------------- Sign/verify tab ---------------
MenuButton { MenuButton {
@@ -517,7 +458,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 16 anchors.leftMargin: 16
color: "#313131" color: "#505050"
height: 1 height: 1
} }
// ------------- Settings tab --------------- // ------------- Settings tab ---------------
@@ -534,84 +475,26 @@ Rectangle {
panel.settingsClicked() panel.settingsClicked()
} }
} }
Rectangle {
visible: settingsButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Sign/verify tab ---------------
MenuButton {
id: keysButton
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Seed & Keys") + translationManager.emptyString
symbol: qsTr("Y") + translationManager.emptyString
dotColor: "#FFD781"
under: settingsButton
onClicked: {
parent.previousButton.checked = false
parent.previousButton = keysButton
panel.keysClicked()
}
}
Rectangle {
visible: settingsButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
} // Column }
} // Flickable
Rectangle {
id: separator
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 0
anchors.rightMargin: 0
anchors.bottom: networkStatus.top;
height: 10 * scaleRatio
color: "black"
} }
NetworkStatusItem { NetworkStatusItem {
id: networkStatus id: networkStatus
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 0
anchors.rightMargin: 0
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom; anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
connected: Wallet.ConnectionStatus_Disconnected connected: Wallet.ConnectionStatus_Disconnected
height: 48 * scaleRatio
} }
ProgressBar { ProgressBar {
id: progressBar id: progressBar
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: daemonProgressBar.top
height: 48 * scaleRatio
syncType: qsTr("Wallet")
visible: networkStatus.connected
}
ProgressBar {
id: daemonProgressBar
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
syncType: qsTr("Daemon")
visible: networkStatus.connected
height: 62 * scaleRatio
} }
} // menuRect }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -29,7 +29,6 @@
import QtQml 2.0 import QtQml 2.0
import QtQuick 2.2 import QtQuick 2.2
// QtQuick.Controls 2.0 isn't stable enough yet. Needs more testing.
//import QtQuick.Controls 2.0 //import QtQuick.Controls 2.0
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
@@ -48,35 +47,25 @@ Rectangle {
property string balanceText property string balanceText
property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString
property string unlockedBalanceText property string unlockedBalanceText
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800 * scaleRatio property int minHeight: (appWindow.height > 800) ? appWindow.height : 800
property alias contentHeight: mainFlickable.contentHeight
// property int headerHeight: header.height // property int headerHeight: header.height
property Transfer transferView: Transfer { } property Transfer transferView: Transfer { }
property Receive receiveView: Receive { } property Receive receiveView: Receive { }
property TxKey txkeyView: TxKey { } property TxKey txkeyView: TxKey { }
property SharedRingDB sharedringdbView: SharedRingDB { }
property History historyView: History { } property History historyView: History { }
property Sign signView: Sign { } property Sign signView: Sign { }
property Settings settingsView: Settings { } property Settings settingsView: Settings { }
property Mining miningView: Mining { } property Mining miningView: Mining { }
property AddressBook addressBookView: AddressBook { } property AddressBook addressBookView: AddressBook { }
property Keys keysView: Keys { }
signal paymentClicked(string address, string paymentId, string amount, int mixinCount, int priority, string description) signal paymentClicked(string address, string paymentId, string amount, int mixinCount, int priority, string description)
signal sweepUnmixableClicked() signal sweepUnmixableClicked()
signal generatePaymentIdInvoked() signal generatePaymentIdInvoked()
signal getProofClicked(string txid, string address, string message); signal checkPaymentClicked(string address, string txid, string txkey);
signal checkProofClicked(string txid, string address, string message, string signature);
Image { color: "#F0EEEE"
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
source: "../images/middlePanelBg.jpg"
}
onCurrentViewChanged: { onCurrentViewChanged: {
if (previousView) { if (previousView) {
@@ -104,6 +93,33 @@ Rectangle {
transferView.sendTo(address, paymentId, description); transferView.sendTo(address, paymentId, description);
} }
// XXX: just for memo, to be removed
// states: [
// State {
// name: "Dashboard"
// PropertyChanges { target: loader; source: "pages/Dashboard.qml" }
// }, State {
// name: "History"
// PropertyChanges { target: loader; source: "pages/History.qml" }
// }, State {
// name: "Transfer"
// PropertyChanges { target: loader; source: "pages/Transfer.qml" }
// }, State {
// name: "Receive"
// PropertyChanges { target: loader; source: "pages/Receive.qml" }
// }, State {
// name: "AddressBook"
// PropertyChanges { target: loader; source: "pages/AddressBook.qml" }
// }, State {
// name: "Settings"
// PropertyChanges { target: loader; source: "pages/Settings.qml" }
// }, State {
// name: "Mining"
// PropertyChanges { target: loader; source: "pages/Mining.qml" }
// }
// ]
states: [ states: [
State { State {
name: "Dashboard" name: "Dashboard"
@@ -112,22 +128,18 @@ Rectangle {
name: "History" name: "History"
PropertyChanges { target: root; currentView: historyView } PropertyChanges { target: root; currentView: historyView }
PropertyChanges { target: historyView; model: appWindow.currentWallet ? appWindow.currentWallet.historyModel : null } PropertyChanges { target: historyView; model: appWindow.currentWallet ? appWindow.currentWallet.historyModel : null }
PropertyChanges { target: mainFlickable; contentHeight: historyView.tableHeight + 220 * scaleRatio } PropertyChanges { target: mainFlickable; contentHeight: minHeight }
}, State { }, State {
name: "Transfer" name: "Transfer"
PropertyChanges { target: root; currentView: transferView } PropertyChanges { target: root; currentView: transferView }
PropertyChanges { target: mainFlickable; contentHeight: 1000 * scaleRatio } PropertyChanges { target: mainFlickable; contentHeight: 1000 }
}, State { }, State {
name: "Receive" name: "Receive"
PropertyChanges { target: root; currentView: receiveView } PropertyChanges { target: root; currentView: receiveView }
PropertyChanges { target: mainFlickable; contentHeight: 1000 * scaleRatio } PropertyChanges { target: mainFlickable; contentHeight: minHeight }
}, State { }, State {
name: "TxKey" name: "TxKey"
PropertyChanges { target: root; currentView: txkeyView } PropertyChanges { target: root; currentView: txkeyView }
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio }
}, State {
name: "SharedRingDB"
PropertyChanges { target: root; currentView: sharedringdbView }
PropertyChanges { target: mainFlickable; contentHeight: minHeight } PropertyChanges { target: mainFlickable; contentHeight: minHeight }
}, State { }, State {
name: "AddressBook" name: "AddressBook"
@@ -136,19 +148,15 @@ Rectangle {
}, State { }, State {
name: "Sign" name: "Sign"
PropertyChanges { target: root; currentView: signView } PropertyChanges { target: root; currentView: signView }
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio } PropertyChanges { target: mainFlickable; contentHeight: minHeight }
}, State { }, State {
name: "Settings" name: "Settings"
PropertyChanges { target: root; currentView: settingsView } PropertyChanges { target: root; currentView: settingsView }
PropertyChanges { target: mainFlickable; contentHeight: 2000 * scaleRatio } PropertyChanges { target: mainFlickable; contentHeight: 1200 }
}, State { }, State {
name: "Mining" name: "Mining"
PropertyChanges { target: root; currentView: miningView } PropertyChanges { target: root; currentView: miningView }
PropertyChanges { target: mainFlickable; contentHeight: minHeight } PropertyChanges { target: mainFlickable; contentHeight: minHeight }
}, State {
name: "Keys"
PropertyChanges { target: root; currentView: keysView }
PropertyChanges { target: mainFlickable; contentHeight: minHeight + 200 * scaleRatio }
} }
] ]
@@ -170,8 +178,8 @@ Rectangle {
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
anchors.margins: 18 anchors.margins: 2
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 : 0 anchors.topMargin: appWindow.persistentSettings.customDecorations ? 30 : 0
spacing: 0 spacing: 0
Flickable { Flickable {
@@ -179,11 +187,6 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
clip: true clip: true
onFlickingChanged: {
releaseFocus();
}
// Disabled scrollbars, gives crash on startup on windows // Disabled scrollbars, gives crash on startup on windows
// ScrollIndicator.vertical: ScrollIndicator { } // ScrollIndicator.vertical: ScrollIndicator { }
// ScrollBar.vertical: ScrollBar { } // uncomment to test // ScrollBar.vertical: ScrollBar { } // uncomment to test
@@ -192,7 +195,11 @@ Rectangle {
StackView { StackView {
id: stackView id: stackView
initialItem: transferView initialItem: transferView
// anchors.topMargin: 30
// Layout.fillWidth: true
// Layout.fillHeight: true
anchors.fill:parent anchors.fill:parent
// anchors.margins: 4
clip: true // otherwise animation will affect left panel clip: true // otherwise animation will affect left panel
delegate: StackViewDelegate { delegate: StackViewDelegate {
@@ -203,7 +210,6 @@ Rectangle {
from: 0 - target.width from: 0 - target.width
to: 0 to: 0
duration: 300 duration: 300
easing.type: Easing.OutCubic
} }
PropertyAnimation { PropertyAnimation {
target: exitItem target: exitItem
@@ -211,7 +217,6 @@ Rectangle {
from: 0 from: 0
to: target.width to: target.width
duration: 300 duration: 300
easing.type: Easing.OutCubic
} }
} }
} }
@@ -219,14 +224,30 @@ Rectangle {
}// flickable }// flickable
} }
// border // border
Rectangle {
anchors.top: styledRow.bottom
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 1
color: "#DBDBDB"
}
Rectangle { Rectangle {
anchors.top: styledRow.bottom anchors.top: styledRow.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
width: 1 width: 1
color: "#313131" color: "#DBDBDB"
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "#DBDBDB"
} }
/* connect "payment" click */ /* connect "payment" click */

View File

@@ -1,20 +1,15 @@
# Monero GUI # Monero GUI
Copyright (c) 2014-2018, The Monero Project Copyright (c) 2014-2017, The Monero Project
## Development resources ## Development Resources
- Web: [getmonero.org](https://getmonero.org) - Web: [getmonero.org](https://getmonero.org)
- Forum: [forum.getmonero.org](https://forum.getmonero.org) - Forum: [forum.getmonero.org](https://forum.getmonero.org)
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org) - Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui) - Github: [https://github.com/monero-project/monero-core](https://github.com/monero-project/monero-core)
- IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev) - IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev)
## Vulnerability response
- Our [Vulnerability Response Process](https://github.com/monero-project/meta/blob/master/VULNERABILITY_RESPONSE_PROCESS.md) encourages responsible disclosure
- We are also available via [HackerOne](https://hackerone.com/monero)
## Introduction ## Introduction
Monero is a private, secure, untraceable, decentralised digital currency. You are your bank, you control your funds, and nobody can trace your transfers unless you allow them to do so. Monero is a private, secure, untraceable, decentralised digital currency. You are your bank, you control your funds, and nobody can trace your transfers unless you allow them to do so.
@@ -25,21 +20,23 @@ Monero is a private, secure, untraceable, decentralised digital currency. You ar
**Untraceability:** By taking advantage of ring signatures, a special property of a certain type of cryptography, Monero is able to ensure that transactions are not only untraceable, but have an optional measure of ambiguity that ensures that transactions cannot easily be tied back to an individual user or computer. **Untraceability:** By taking advantage of ring signatures, a special property of a certain type of cryptography, Monero is able to ensure that transactions are not only untraceable, but have an optional measure of ambiguity that ensures that transactions cannot easily be tied back to an individual user or computer.
## About this project ## About this Project
This is the GUI for the [core Monero implementation](https://github.com/monero-project/monero). It is open source and completely free to use without restrictions, except for those specified in the license agreement below. There are no restrictions on anyone creating an alternative implementation of Monero that uses the protocol and network in a compatible manner. This is the GUI for the [core Monero implementation](https://github.com/monero-project/monero). It is open source and completely free to use without restrictions, except for those specified in the license agreement below. There are no restrictions on anyone creating an alternative implementation of Monero that uses the protocol and network in a compatible manner.
As with many development projects, the repository on Github is considered to be the "staging" area for the latest changes. Before changes are merged into that branch on the main repository, they are tested by individual developers in their own branches, submitted as a pull request, and then subsequently tested by contributors who focus on testing and code reviews. That having been said, the repository should be carefully considered before using it in a production environment, unless there is a patch in the repository for a particular show-stopping issue you are experiencing. It is generally a better idea to use a tagged release for stability. As with many development projects, the repository on Github is considered to be the "staging" area for the latest changes. Before changes are merged into that branch on the main repository, they are tested by individual developers in their own branches, submitted as a pull request, and then subsequently tested by contributors who focus on testing and code reviews. That having been said, the repository should be carefully considered before using it in a production environment, unless there is a patch in the repository for a particular show-stopping issue you are experiencing. It is generally a better idea to use a tagged release for stability.
## Supporting the project ## Supporting the Project
Monero is a 100% community-sponsored endeavor. If you want to join our efforts, the easiest thing you can do is support the project financially. Both Monero and Bitcoin donations can be made to **donate.getmonero.org** if using a client that supports the [OpenAlias](https://openalias.org) standard. Monero development can be supported directly through donations.
Both Monero and Bitcoin donations can be made to donate.getmonero.org if using a client that supports the [OpenAlias](https://openalias.org) standard
The Monero donation address is: `44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A` (viewkey: `f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501`) The Monero donation address is: `44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A` (viewkey: `f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501`)
The Bitcoin donation address is: `1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H` The Bitcoin donation address is: `1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H`
GUI development funding and/or some supporting services are also graciously provided by sponsors: Core development funding and/or some supporting services are also graciously provided by sponsors:
[<img width="80" src="https://static.getmonero.org/images/sponsors/mymonero.png"/>](https://mymonero.com) [<img width="80" src="https://static.getmonero.org/images/sponsors/mymonero.png"/>](https://mymonero.com)
[<img width="150" src="https://static.getmonero.org/images/sponsors/kitware.png?1"/>](http://kitware.com) [<img width="150" src="https://static.getmonero.org/images/sponsors/kitware.png?1"/>](http://kitware.com)
@@ -55,17 +52,15 @@ There are also several mining pools that kindly donate a portion of their fees,
See [LICENSE](LICENSE). See [LICENSE](LICENSE).
## Installing the Monero GUI from a package ## Installing Monero Core from a Package
Packages are available for Packages are available for
* Arch Linux via AUR: [monero-wallet-qt](https://aur.archlinux.org/packages/monero-wallet-qt/) * Arch Linux via AUR: [monero-core-git](https://aur.archlinux.org/packages/monero-core-git/)
* Void Linux: xbps-install -S monero-core
* GuixSD: guix package -i monero-core
Packaging for your favorite distribution would be a welcome contribution! Packaging for your favorite distribution would be a welcome contribution!
## Compiling the Monero GUI from source ## Compiling Monero Core from Source
### On Linux: ### On Linux:
@@ -75,29 +70,29 @@ Packaging for your favorite distribution would be a welcome contribution!
- For Ubuntu and Mint - For Ubuntu and Mint
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev` `sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev`
- For Gentoo - For Gentoo
`sudo emerge app-arch/xz-utils app-doc/doxygen dev-cpp/gtest dev-libs/boost dev-libs/expat dev-libs/openssl dev-util/cmake media-gfx/graphviz net-dns/unbound net-libs/ldns net-libs/miniupnpc net-libs/zeromq sys-libs/libunwind` `sudo emerge app-arch/xz-utils app-doc/doxygen dev-cpp/gtest dev-libs/boost dev-libs/expat dev-libs/openssl dev-util/cmake media-gfx/graphviz net-dns/unbound net-libs/ldns net-libs/miniupnpc sys-libs/libunwind`
2. Grab an up-to-date copy of the monero-gui repository 2. Grab an up-to-date copy of the monero-core repository
`git clone https://github.com/monero-project/monero-gui.git` `git clone https://github.com/monero-project/monero-core.git`
3. Go into the repository 3. Go into the repository
`cd monero-gui` `cd monero-core`
4. Install the GUI dependencies 4. Install the GUI dependencies
- For Ubuntu 16.04 x86 - For Ubuntu 16.04 x86
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qttools5-dev-tools qml-module-qtquick-dialogs` `sudo apt-get install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qttools5-dev-tools qml-module-qtquick-dialogs`
- For Ubuntu 16.04+ x64 - For Ubuntu 16.04+ x64
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qttools5-dev-tools qml-module-qtquick-dialogs qml-module-qt-labs-settings libqt5qml-graphicaleffects` `sudo apt-get install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qttools5-dev-tools qml-module-qtquick-dialogs qml-module-qt-labs-settings libqt5qml-graphicaleffects`
- For Linux Mint 18 "Sarah" - Cinnamon x64 - For Linux Mint 18 "Sarah" - Cinnamon x64
@@ -134,9 +129,7 @@ The executable can be found in the build/release/bin folder.
### On OS X: ### On OS X:
1. Install Xcode from AppStore 1. Install Xcode from AppStore
2. Install [homebrew](http://brew.sh/) 2. Install [homebrew](http://brew.sh/)
3. Install [monero](https://github.com/monero-project/monero) dependencies: 3. Install [monero](https://github.com/monero-project/monero) dependencies:
`brew install boost --c++11` `brew install boost --c++11`
@@ -147,12 +140,6 @@ The executable can be found in the build/release/bin folder.
`brew install cmake` `brew install cmake`
`brew install zeromq`
*Note*: If cmake can not find zmq.hpp file on OS X, installing `zmq.hpp` from https://github.com/zeromq/cppzmq to `/usr/local/include` should fix that error.
4. Install Qt:
`brew install qt5` (or download QT 5.8+ from [qt.io](https://www.qt.io/download-open-source/)) `brew install qt5` (or download QT 5.8+ from [qt.io](https://www.qt.io/download-open-source/))
If you have an older version of Qt installed via homebrew, you can force it to use 5.x like so: If you have an older version of Qt installed via homebrew, you can force it to use 5.x like so:
@@ -165,13 +152,13 @@ The executable can be found in the build/release/bin folder.
This is the directory where Qt 5.x is installed on **your** system This is the directory where Qt 5.x is installed on **your** system
6. Grab an up-to-date copy of the monero-gui repository 6. Grab an up-to-date copy of the monero-core repository
`git clone https://github.com/monero-project/monero-gui.git` `git clone https://github.com/monero-project/monero-core.git`
7. Go into the repository 7. Go into the repository
`cd monero-gui` `cd monero-core`
8. Start the build 8. Start the build
@@ -196,10 +183,10 @@ More info: http://stackoverflow.com/a/35098040/1683164
1. Install [msys2](http://msys2.github.io/), follow the instructions on that page on how to update packages to the latest versions 1. Install [msys2](http://msys2.github.io/), follow the instructions on that page on how to update packages to the latest versions
2. Install Monero dependencies as described in [monero documentation](https://github.com/monero-project/monero) into msys2 environment 2. Install monero dependencies as described in [monero documentation](https://github.com/monero-project/monero) into msys2 environment
**As we only build application for x86, install only dependencies for x86 architecture (i686 in package name)** **As we only build application for x86, install only dependencies for x86 architecture (i686 in package name)**
``` ```
pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-zeromq mingw-w64-i686-libsodium pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake mingw-w64-i686-boost
``` ```
@@ -222,7 +209,7 @@ More info: http://stackoverflow.com/a/35098040/1683164
Where ```%MSYS_ROOT%``` will be ```c:\msys32``` if your host OS is x86-based or ```c:\msys64``` if your host OS Where ```%MSYS_ROOT%``` will be ```c:\msys32``` if your host OS is x86-based or ```c:\msys64``` if your host OS
is x64-based is x64-based
6. Install the latest version of boost, specifically the required static libraries 6. Install the latest version of boost, specificly the required static libraries
``` ```
cd cd
wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.bz2 wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.bz2
@@ -235,12 +222,12 @@ More info: http://stackoverflow.com/a/35098040/1683164
7. Clone repository 7. Clone repository
``` ```
cd cd
git clone https://github.com/monero-project/monero-gui.git git clone https://github.com/monero-project/monero-core.git
``` ```
8. Build the GUI 8. Build the GUI
``` ```
cd monero-gui cd monero-core
export PATH=$(ls -rd /c/Qt/5.[6,7,8]/mingw53_32/bin | head -1):$PATH export PATH=$(ls -rd /c/Qt/5.[6,7,8]/mingw53_32/bin | head -1):$PATH
./build.sh ./build.sh
cd build cd build

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -38,4 +38,121 @@ Rectangle {
id: root id: root
width: 330 width: 330
color: "#FFFFFF" color: "#FFFFFF"
function updateTweets() {
tabView.twitter.item.updateTweets()
}
TabView {
id: tabView
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: styledRow.top
anchors.leftMargin: 14
anchors.rightMargin: 14
anchors.topMargin: 40
property alias twitter: twitter
Tab { id: twitter; title: qsTr("Twitter"); source: "tabs/Twitter.qml" }
Tab { title: qsTr("News") + translationManager.emptyString }
Tab { title: qsTr("Help") + translationManager.emptyString }
Tab { title: qsTr("About") + translationManager.emptyString }
style: TabViewStyle {
frameOverlap: 0
tabOverlap: 0
tab: Rectangle {
implicitHeight: 31
implicitWidth: styleData.index === tabView.count - 1 ? tabView.width - (tabView.count - 1) * 68 : 68
Text {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 12
anchors.rightMargin: 12
elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 14
color: styleData.selected ? "#FF4E40" : "#4A4646"
text: styleData.title
}
Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 1
color: "#DBDBDB"
visible: styleData.index !== tabView.count - 1
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: -1
height: 1
color: styleData.selected ? "#FFFFFF" : "#DBDBDB"
}
}
frame: Rectangle {
color: "#FFFFFF"
anchors.fill: parent
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
//anchors.topMargin: 1
height: 1
color: "#DBDBDB"
}
}
}
}
Row {
id: styledRow
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
Rectangle { height: 8; width: parent.width / 5; color: "#FFE00A" }
Rectangle { height: 8; width: parent.width / 5; color: "#6B0072" }
Rectangle { height: 8; width: parent.width / 5; color: "#FF6C3C" }
Rectangle { height: 8; width: parent.width / 5; color: "#FFD781" }
Rectangle { height: 8; width: parent.width / 5 - 30; color: "#FF4F41" }
}
Rectangle {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
height: 1
color: "#DBDBDB"
}
Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 1
color: "#DBDBDB"
}
// indicate disabled state
// Desaturate {
// anchors.fill: parent
// source: parent
// desaturation: root.enabled ? 0.0 : 1.0
// }
} }

View File

@@ -0,0 +1,147 @@
# Monero GUI Vulnerability Response Process
## Preamble
Researchers/Hackers: while you research/hack, we ask that you please refrain from committing the following:
- Denial of Service / Active exploiting against the network
- Social Engineering of Monero staff or contractors
- Any physical or electronic attacks against Monero community property and/or data centers
## I. Points of Contact for Security Issues
```
ric@getmonero.org
BDA6 BD70 42B7 21C4 67A9 759D 7455 C5E3 C0CD CEB9
luigi1111@getmonero.org
8777 AB8F 778E E894 87A2 F8E7 F4AC A018 3641 E010
moneromooo.monero@gmail.com
48B0 8161 FBDA DFE3 93AD FC3E 686F 0745 4D6C EFC3
jaquee.monero@gmail.com
D21E 9CC1 2F51 C4FE A9E0 52FF 384E 52B0 9F45 DC39
```
## II. Security Response Team
- fluffypony
- luigi1111
- moneromooo
- Jaquee
## III. Incident Response
1. Researcher submits report via one or both of two methods:
- a. Email
- b. [HackerOne](https://hackerone.com/monero)
2. Response Team designates a Response Manager who is in charge of the particular report based on availability and/or knowledge-set
3. In no more than 3 working days, Response Team should gratefully respond to researcher using only encrypted, secure channels
4. Response Manager makes inquiries to satisfy any needed information to confirm if submission is indeed a vulnerability
- a. If submission proves to be vulnerable, proceed to next step
- b. If not vulnerable:
- i. Response Manager responds with reasons why submission is not a vulnerability
- ii. Response Manager moves discussion to a new or existing ticket on GitHub if necessary
5. If over email, Response Manager opens a HackerOne issue for new submission
6. Establish severity of vulnerability:
- a. HIGH: impacts network as a whole, has potential to break entire network, results in the loss of monero, or is on a scale of great catastrophe
- b. MEDIUM: impacts individual nodes, wallets, or must be carefully exploited
- c. LOW: is not easily exploitable
7. Respond according to the severity of the vulnerability:
- a. HIGH severities must be notified on website and reddit /r/Monero within 3 working days of classification
- i. The notification should list appropriate steps for users to take, if any
- ii. The notification must not include any details that could suggest an exploitation path
- iii. The latter takes precedence over the former
- b. MEDIUM and HIGH severities will require a Point Release
- c. LOW severities will be addressed in the next Regular Release
8. Response Team applies appropriate patch(es)
- a. Response Manager designates a PRIVATE git "hotfix branch" to work in
- b. Patches are reviewed with the researcher
- c. Any messages associated with PUBLIC commits during the time of review should not make reference to the security nature of the PRIVATE branch or its commits
- d. Vulnerability announcement is drafted
- i. Include the severity of the vulnerability
- ii. Include all vulnerable systems/apps/code
- iii. Include solutions (if any) if patch cannot be applied
- e. Release date is discussed
9. At release date, Response Team coordinates with developers to finalize update:
- a. Response Manager propagates the "hotfix branch" to trunk
- b. Response Manager includes vulnerability announcement draft in release notes
- c. Proceed with the Point or Regular Release
## IV. Post-release Disclosure Process
1. Response Team has 90 days to fulfill all points within section III
2. If the Incident Response process in section III is successfully completed:
- a. Response Manager contacts researcher and asks if researcher wishes for credit
- b. Finalize vulnerability announcement draft and include the following:
- i. Project name and URL
- ii. Versions known to be affected
- iii. Versions known to be not affected (for example, the vulnerable code was introduced in a recent version, and older versions are therefore unaffected)
- iv. Versions not checked
- v. Type of vulnerability and its impact
- vi. If already obtained or applicable, a CVE-ID
- vii. The planned, coordinated release date
- viii. Mitigating factors (for example, the vulnerability is only exposed in uncommon, non-default configurations)
- ix. Workarounds (configuration changes users can make to reduce their exposure to the vulnerability)
- x. If applicable, credits to the original reporter
- c. Release finalized vulnerability announcement on website and reddit /r/Monero
- d. For HIGH severities, release finalized vulnerability announcement on well-known mailing lists:
- i. oss-security@lists.openwall.com
- ii. bugtraq@securityfocus.com
- e. If applicable, developers request a CVE-ID
- i. The commit that applied the fix is made reference too in a future commit and includes a CVE-ID
3. If the Incident Response process in section III is *not* successfully completed:
- a. Response Team and developers organize an IRC meeting to discuss why/what points in section III were not resolved and how the team can resolve them in the future
- b. Any developer meetings immediately following the incident should include points made in section V
- c. If disputes arise about whether or when to disclose information about a vulnerability, the Response Team will publicly discuss the issue via IRC and attempt to reach consensus
- d. If consensus on a timely disclosure is not met (no later than 90 days), the researcher (after 90 days) has every right to expose the vulnerability to the public
## V. Incident Analysis
1. Isolate codebase
- a. Response Team and developers should coordinate to work on the following:
- i. Problematic implementation of classes/libraries/functions, etc.
- ii. Focus on apps/distro packaging, etc.
- iii. Operator/config error, etc.
2. Auditing
- a. Response Team and developers should coordinate to work on the following:
- i. Auditing of problem area(s) as discussed in point 1
- ii. Generate internal reports and store for future reference
- iii. If results are not sensitive, share with the public via IRC or GitHub
3. Response Team has 45 days following completion of section III to ensure completion of section V
## VI. Resolutions
Any further questions or resolutions regarding the incident(s) between the researcher and response + development team after public disclosure can be addressed via the following:
- [GitHub](https://github.com/monero-project/monero/issues/)
- [HackerOne](https://hackerone.com/monero)
- [Reddit /r/Monero](https://reddit.com/r/Monero/)
- IRC
- Email
## VII. Continuous Improvement
1. Response Team and developers should hold annual meetings to review the previous year's incidents
2. Response Team or designated person(s) should give a brief presentation, including:
- a. Areas of Monero affected by the incidents
- b. Any network downtime or monetary cost (if any) of the incidents
- c. Ways in which the incidents could have been avoided (if any)
- d. How effective this process was in dealing with the incidents
3. After the presentation, Response Team and developers should discuss:
- a. Potential changes to development processes to reduce future incidents
- b. Potential changes to this process to improve future responses

View File

@@ -1,4 +1,4 @@
Copyright (c) 2014-2018, The Monero Project Copyright (c) 2014-2017, The Monero Project
## Current status : ALPHA ## Current status : ALPHA
@@ -22,7 +22,7 @@ Copyright (c) 2014-2018, The Monero Project
# Get the apk # Get the apk
docker cp monero-gui-android:/opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk . docker cp monero-gui-android:/opt/android/monero-core/build/release/bin/bin/QtApp-debug.apk .
## Deployment ## Deployment
@@ -31,7 +31,7 @@ Copyright (c) 2014-2018, The Monero Project
First, see section [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling) First, see section [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling)
The only place where we are allowed to play is `/data/local/tmp`. So : The only place where we are allowed to play is `/data/local/tmp`. So :
adb push /opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk /data/local/tmp adb push /opt/android/monero-core/build/release/bin/bin/QtApp-debug.apk /data/local/tmp
adb shell pm install -r /data/local/tmp/QtApp-debug.apk adb shell pm install -r /data/local/tmp/QtApp-debug.apk
- Troubleshooting: - Troubleshooting:

View File

@@ -88,20 +88,21 @@ APP_CFLAGS += -target armv7-none-linux-androideabi -fexceptions -fstack-protect
&& android update project --path . -t "${ANDROID_API}" \ && android update project --path . -t "${ANDROID_API}" \
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ ant -Dndk.dir=${ANDROID_NDK_ROOT} -Diconv.src=${WORKDIR}/libiconv-${ICONV_VERSION} zbar-clean zbar-ndk-build && CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ ant -Dndk.dir=${ANDROID_NDK_ROOT} -Diconv.src=${WORKDIR}/libiconv-${ICONV_VERSION} zbar-clean zbar-ndk-build
#Can't directly call build.sh because of env variables
RUN git clone https://github.com/monero-project/monero-core.git \
&& cd monero-core \
&& git submodule update \
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ BOOST_ROOT=/opt/android/boost_1_62_0 BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ ./get_libwallet_api.sh release-android
RUN cp openssl/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib RUN cp openssl/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
RUN cp boost_${BOOST_VERSION}/android32/lib/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib RUN cp boost_${BOOST_VERSION}/android32/lib/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
RUN cp ZBar/android/obj/local/armeabi-v7a/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib RUN cp ZBar/android/obj/local/armeabi-v7a/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
RUN git clone https://github.com/monero-project/monero-gui.git \ ENV PATH $ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:${WORKDIR}/Qt-${QT_VERSION}/bin:$CLEAN_PATH
&& cd monero-gui \
&& git submodule update \ # NB : zxcvbn-c needs to build a local binary and Qt don't care about these environnement variable
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ BOOST_ROOT=/opt/android/boost_1_62_0 \ RUN cd monero-core \
BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ \ && CC="gcc" CXX="g++" ./build.sh release-android \
OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \
CMAKE_INCLUDE_PATH=${WORKDIR}/cppzmq/ \
CMAKE_LIBRARY_PATH=${WORKDIR}/zeromq4-1/.libs \
CXXFLAGS="-I ${WORKDIR}/zeromq4-1/include/" \
./build.sh release-android \
&& cd build \ && cd build \
&& make deploy && make deploy

View File

@@ -8,22 +8,6 @@ if [ -z $BUILD_TYPE ]; then
BUILD_TYPE=release BUILD_TYPE=release
fi fi
# Return 0 if the command exists, 1 if it does not.
exists() {
command -v "$1" &>/dev/null
}
# Return the first value in $@ that's a runnable command.
find_command() {
for arg in "$@"; do
if exists "$arg"; then
echo "$arg"
return 0
fi
done
return 1
}
if [ "$BUILD_TYPE" == "release" ]; then if [ "$BUILD_TYPE" == "release" ]; then
echo "Building release" echo "Building release"
CONFIG="CONFIG+=release"; CONFIG="CONFIG+=release";
@@ -40,16 +24,14 @@ elif [ "$BUILD_TYPE" == "release-static" ]; then
BIN_PATH=release/bin BIN_PATH=release/bin
elif [ "$BUILD_TYPE" == "release-android" ]; then elif [ "$BUILD_TYPE" == "release-android" ]; then
echo "Building release for ANDROID" echo "Building release for ANDROID"
CONFIG="CONFIG+=release static WITH_SCANNER DISABLE_PASS_STRENGTH_METER"; CONFIG="CONFIG+=release static WITH_SCANNER";
ANDROID=true ANDROID=true
BIN_PATH=release/bin BIN_PATH=release/bin
DISABLE_PASS_STRENGTH_METER=true
elif [ "$BUILD_TYPE" == "debug-android" ]; then elif [ "$BUILD_TYPE" == "debug-android" ]; then
echo "Building debug for ANDROID : ultra INSECURE !!" echo "Building debug for ANDROID : ultra INSECURE !!"
CONFIG="CONFIG+=debug qml_debug WITH_SCANNER DISABLE_PASS_STRENGTH_METER"; CONFIG="CONFIG+=debug qml_debug WITH_SCANNER";
ANDROID=true ANDROID=true
BIN_PATH=debug/bin BIN_PATH=debug/bin
DISABLE_PASS_STRENGTH_METER=true
elif [ "$BUILD_TYPE" == "debug" ]; then elif [ "$BUILD_TYPE" == "debug" ]; then
echo "Building debug" echo "Building debug"
CONFIG="CONFIG+=debug" CONFIG="CONFIG+=debug"
@@ -72,20 +54,18 @@ if [[ $platform == *bsd* ]]; then
fi fi
# build libwallet # build libwallet
./get_libwallet_api.sh $BUILD_TYPE $SHELL get_libwallet_api.sh $BUILD_TYPE
# build zxcvbn # build zxcvbn
if [ "$DISABLE_PASS_STRENGTH_METER" != true ]; then $MAKE -C src/zxcvbn-c || exit
$MAKE -C src/zxcvbn-c || exit
fi
if [ ! -d build ]; then mkdir build; fi if [ ! -d build ]; then mkdir build; fi
# Platform indepenent settings # Platform indepenent settings
if [ "$ANDROID" != true ] && ([ "$platform" == "linux32" ] || [ "$platform" == "linux64" ]); then if [ "$ANDROID" != true ] && ([ "$platform" == "linux32" ] || [ "$platform" == "linux64" ]); then
exists lsb_release && distro="$(lsb_release -is)" distro=$(lsb_release -is)
if [ "$distro" = "Ubuntu" ] || [ "$distro" = "Fedora" ] || test -f /etc/fedora-release; then if [ "$distro" == "Ubuntu" ]; then
CONFIG="$CONFIG libunwind_off" CONFIG="$CONFIG libunwind_off"
fi fi
fi fi
@@ -105,11 +85,7 @@ popd
echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js
cd build cd build
if ! QMAKE=$(find_command qmake qmake-qt5); then qmake ../monero-wallet-gui.pro "$CONFIG" || exit
echo "Failed to find suitable qmake command."
exit 1
fi
$QMAKE ../monero-wallet-gui.pro "$CONFIG" || exit
$MAKE || exit $MAKE || exit
# Copy monerod to bin folder # Copy monerod to bin folder

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -37,13 +37,13 @@ ListView {
footer: Rectangle { footer: Rectangle {
height: 127 height: 127
width: listView.width width: listView.width
color: "transparent" color: "#FFFFFF"
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
font.family: "Arial" font.family: "Arial"
font.pixelSize: 14 font.pixelSize: 14
color: "#808080" color: "#545454"
text: qsTr("No more results") + translationManager.emptyString text: qsTr("No more results") + translationManager.emptyString
} }
} }
@@ -53,7 +53,7 @@ ListView {
id: delegate id: delegate
height: 64 height: 64
width: listView.width width: listView.width
color: "transparent" color: index % 2 ? "#F8F8F8" : "#FFFFFF"
z: listView.count - index z: listView.count - index
function collapseDropdown() { dropdown.expanded = false } function collapseDropdown() { dropdown.expanded = false }
@@ -62,11 +62,11 @@ ListView {
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 12 anchors.topMargin: 12
width: text.length ? (descriptionArea.containsMouse ? 139 : 139) : 0 width: text.length ? (descriptionArea.containsMouse ? dropdown.x - x - 12 : 139) : 0
font.family: "Arial" font.family: "Arial"
font.bold: true font.bold: true
font.pixelSize: 19 font.pixelSize: 19
color: "#ffffff" color: "#444444"
elide: Text.ElideRight elide: Text.ElideRight
text: description text: description
@@ -87,9 +87,8 @@ ListView {
anchors.rightMargin: 40 anchors.rightMargin: 40
font.family: "Arial" font.family: "Arial"
font.pixelSize: 16 font.pixelSize: 16
color: "#ffffff" color: "#545454"
text: address text: address
readOnly: true
} }
Text { Text {
@@ -101,7 +100,7 @@ ListView {
width: 139 width: 139
font.family: "Arial" font.family: "Arial"
font.pixelSize: 12 font.pixelSize: 12
color: "#ffffff" color: "#535353"
text: qsTr("Payment ID:") + translationManager.emptyString text: qsTr("Payment ID:") + translationManager.emptyString
} }
@@ -112,7 +111,7 @@ ListView {
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.right: dropdown.left anchors.right: dropdown.left
readOnly: true
font.family: "Arial" font.family: "Arial"
font.pixelSize: 13 font.pixelSize: 13
@@ -145,10 +144,8 @@ ListView {
onOptionClicked: { onOptionClicked: {
// Ensure tooltip is closed // Ensure tooltip is closed
appWindow.toolTip.visible = false; appWindow.toolTip.visible = false;
if(option === 0) { if(option === 0)
clipboard.setText(address) clipboard.setText(address)
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
}
else if(option === 1){ else if(option === 1){
console.log("Sending to: ", address +" "+ paymentId); console.log("Sending to: ", address +" "+ paymentId);
middlePanel.sendTo(address, paymentId, description); middlePanel.sendTo(address, paymentId, description);
@@ -165,7 +162,7 @@ ListView {
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: 1 height: 1
color: "#404040" color: "#DBDBDB"
} }
} }
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -29,76 +29,61 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import "../components" as MoneroComponents Item {
RowLayout {
id: checkBox id: checkBox
property alias text: label.text property alias text: label.text
property string checkedIcon: "../images/checkedIcon-black.png" property string checkedIcon
property string uncheckedIcon property string uncheckedIcon
property bool checked: false property bool checked: false
property alias background: backgroundRect.color property alias background: backgroundRect.color
property int fontSize: 14 * scaleRatio property int fontSize: 14
property alias fontColor: label.color property alias fontColor: label.color
signal clicked() signal clicked()
height: 25 * scaleRatio height: 25
width: label.x + label.width
Layout.minimumWidth: label.x + label.contentWidth
clip: true
function toggle(){ Rectangle {
checkBox.checked = !checkBox.checked anchors.left: parent.left
checkBox.clicked() height: parent.height - 1
width: 25
//radius: 4
y: 0
color: "#DBDBDB"
} }
RowLayout { Rectangle {
Layout.fillWidth: true id: backgroundRect
Rectangle { anchors.left: parent.left
anchors.left: parent.left height: parent.height - 1
width: 25 * scaleRatio width: 25
height: checkBox.height - 1 //radius: 4
radius: 3 y: 1
y: 0 color: "#FFFFFF"
color: "transparent"
border.color: checkBox.checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25) Image {
anchors.centerIn: parent
source: checkBox.checked ? checkBox.checkedIcon :
checkBox.uncheckedIcon
} }
}
Rectangle { Text {
id: backgroundRect id: label
anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter
width: 25 * scaleRatio anchors.left: parent.left
height: checkBox.height - 1 anchors.leftMargin: 25 + 12
y: 1 font.family: "Arial"
color: "transparent" font.pixelSize: checkBox.fontSize
color: "#525252"
}
Image { MouseArea {
anchors.centerIn: parent anchors.fill: parent
source: checkBox.checkedIcon onClicked: {
visible: checkBox.checked checkBox.checked = !checkBox.checked
} checkBox.clicked()
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
}
}
}
Text {
id: label
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: checkBox.fontSize
color: MoneroComponents.Style.defaultFontColor
wrapMode: Text.Wrap
Layout.fillWidth: true
anchors.left: backgroundRect.right
anchors.leftMargin: !isMobile ? 10 : 8
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
}
}
} }
} }
} }

View File

@@ -1,98 +0,0 @@
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "." 1.0
RowLayout {
id: checkBox
property alias text: label.text
property string checkedIcon: "../images/checkedIcon-black.png"
property string uncheckedIcon
property bool checked: false
property string background: "backgroundRect.color"
property int fontSize: 14 * scaleRatio
property alias fontColor: label.color
property int textMargin: 8 * scaleRatio
signal clicked()
height: 25 * scaleRatio
function toggle(){
checkBox.checked = !checkBox.checked
checkBox.clicked()
}
RowLayout {
Layout.fillWidth: true
Rectangle{
height: label.height
width: (label.width + indicatorRect.width + checkBox.textMargin)
color: "transparent"
anchors.left: parent.left
Text {
id: label
font.family: Style.fontLight.name
font.pixelSize: checkBox.fontSize
color: Style.defaultFontColor
wrapMode: Text.Wrap
Layout.fillWidth: true
anchors.left: parent.left
}
Rectangle {
id: indicatorRect
width: indicatorImage.width
height: label.height
anchors.left: label.right
anchors.leftMargin: textMargin
color: "transparent"
Image {
id: indicatorImage
anchors.centerIn: parent
source: "../images/whiteDropIndicator.png"
rotation: checkBox.checked ? 180 * scaleRatio : 0
}
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle();
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -110,6 +110,10 @@ Window {
id: okButton id: okButton
width: 120 width: 120
fontSize: 14 fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Close") + translationManager.emptyString text: qsTr("Close") + translationManager.emptyString
onClicked: { onClicked: {
root.close() root.close()
@@ -124,7 +128,7 @@ Window {
placeholderText: qsTr("command + enter (e.g help)") + translationManager.emptyString placeholderText: qsTr("command + enter (e.g help)") + translationManager.emptyString
onAccepted: { onAccepted: {
if(text.length > 0) if(text.length > 0)
daemonManager.sendCommand(text,currentWallet.nettype); daemonManager.sendCommand(text,currentWallet.testnet);
text = "" text = ""
} }
} }
@@ -134,6 +138,10 @@ Window {
// id: sendCommandButton // id: sendCommandButton
// enabled: sendCommandText.text.length > 0 // enabled: sendCommandText.text.length > 0
// fontSize: 14 // fontSize: 14
// shadowReleasedColor: "#FF4304"
// shadowPressedColor: "#B32D00"
// releasedColor: "#FF6C3C"
// pressedColor: "#FF4304"
// text: qsTr("Send command") // text: qsTr("Send command")
// onClicked: { // onClicked: {
// daemonManager.sendCommand(sendCommandText.text,currentWallet.testnet); // daemonManager.sendCommand(sendCommandText.text,currentWallet.testnet);

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -39,13 +39,13 @@ Window {
id: root id: root
modality: Qt.ApplicationModal modality: Qt.ApplicationModal
flags: Qt.Window | Qt.FramelessWindowHint flags: Qt.Window | Qt.FramelessWindowHint
property int countDown: 10; property int countDown: 5;
signal rejected() signal rejected()
signal started(); signal started();
function open() { function open() {
show() show()
countDown = 10; countDown = 5;
timer.start(); timer.start();
} }
@@ -90,7 +90,7 @@ Window {
} }
Text { Text {
text: qsTr("Starting local node in %1 seconds").arg(countDown); text: qsTr("Starting Monero daemon in %1 seconds").arg(countDown);
font.pixelSize: 18 font.pixelSize: 18
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true Layout.fillWidth: true
@@ -108,6 +108,10 @@ Window {
id: okButton id: okButton
visible:false visible:false
fontSize: 14 fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Start daemon (%1)").arg(countDown) text: qsTr("Start daemon (%1)").arg(countDown)
KeyNavigation.tab: cancelButton KeyNavigation.tab: cancelButton
onClicked: { onClicked: {
@@ -121,6 +125,10 @@ Window {
MoneroComponents.StandardButton { MoneroComponents.StandardButton {
id: cancelButton id: cancelButton
fontSize: 14 fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Use custom settings") text: qsTr("Use custom settings")
onClicked: { onClicked: {

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -30,21 +30,17 @@ import QtQuick 2.2
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2 import QtQuick.Controls.Styles 1.2
import "../components" as MoneroComponents
Item { Item {
id: datePicker id: datePicker
property bool expanded: false property bool expanded: false
property date currentDate property date currentDate
property bool showCurrentDate: true property bool showCurrentDate: true
property color backgroundColor : "#404040" property color backgroundColor : "#FFFFFF"
property color errorColor : "red" property color errorColor : "#FFDDDD"
property bool error: false property bool error: false
property alias inputLabel: inputLabel
signal dateChanged(); height: 37
width: 156
height: 50
onExpandedChanged: if(expanded) appWindow.currentItem = datePicker onExpandedChanged: if(expanded) appWindow.currentItem = datePicker
@@ -61,49 +57,28 @@ Item {
return true return true
} }
Rectangle {
id: inputLabelRect
color: "transparent"
height: 22
width: parent.width
Text {
id: inputLabel
anchors.top: parent.top
anchors.topMargin: 2
anchors.left: parent.left
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 14
font.bold: false
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}
}
Item { Item {
id: head id: head
anchors.top: inputLabelRect.bottom anchors.fill: parent
anchors.topMargin: 6 * scaleRatio Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: 28 height: parent.height
//radius: 4
y: 0
color: "#DBDBDB"
}
Rectangle { Rectangle {
anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: parent.height - 1 height: parent.height - 1
anchors.leftMargin: datePicker.expanded ? 1 : 0 anchors.leftMargin: datePicker.expanded ? 1 : 0
anchors.rightMargin: datePicker.expanded ? 1 : 0 anchors.rightMargin: datePicker.expanded ? 1 : 0
radius: 4 //radius: 4
y: 1 y: 1
color: datePicker.backgroundColor color: datePicker.error ? datePicker.errorColor : datePicker.backgroundColor
} }
Item { Item {
@@ -114,18 +89,28 @@ Item {
anchors.margins: 4 anchors.margins: 4
width: height width: height
Image { StandardButton {
id: button id: button
anchors.fill: parent
shadowReleasedColor: "#DBDBDB"
shadowPressedColor: "#888888"
releasedColor: "#F0EEEE"
pressedColor: "#DBDBDB"
icon: "../images/datePicker.png"
visible: !datePicker.expanded
onClicked: datePicker.expanded = true
}
Image {
anchors.centerIn: parent anchors.centerIn: parent
source: "../images/whiteDropIndicator.png" source: "../images/datePicker.png"
rotation: datePicker.expanded ? 180 : 0 visible: datePicker.expanded
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: datePicker.expanded = !datePicker.expanded enabled: datePicker.expanded
hoverEnabled: true onClicked: datePicker.expanded = false
cursorShape: Qt.PointingHandCursor
} }
} }
@@ -136,7 +121,7 @@ Item {
anchors.rightMargin: 4 anchors.rightMargin: 4
height: 16 height: 16
width: 1 width: 1
color: "#808080" color: "#DBDBDB"
visible: datePicker.expanded visible: datePicker.expanded
} }
@@ -165,9 +150,9 @@ Item {
id: dayInput id: dayInput
readOnly: true readOnly: true
width: 22 width: 22
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.pixelSize: 14 font.pixelSize: 18
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor // color: "#525252"
maximumLength: 2 maximumLength: 2
horizontalAlignment: TextInput.AlignHCenter horizontalAlignment: TextInput.AlignHCenter
validator: IntValidator{bottom: 01; top: 31;} validator: IntValidator{bottom: 01; top: 31;}
@@ -188,19 +173,19 @@ Item {
} }
Text { Text {
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.pixelSize: 14 font.pixelSize: 18
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor // color: "#525252"
text: "-" text: "."
} }
TextInput { TextInput {
id: monthInput id: monthInput
readOnly: true readOnly: true
width: 22 width: 22
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.pixelSize: 14 font.pixelSize: 18
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor // color: "#525252"
maximumLength: 2 maximumLength: 2
horizontalAlignment: TextInput.AlignHCenter horizontalAlignment: TextInput.AlignHCenter
validator: IntValidator{bottom: 01; top: 12;} validator: IntValidator{bottom: 01; top: 12;}
@@ -220,18 +205,18 @@ Item {
} }
Text { Text {
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.pixelSize: 14 font.pixelSize: 18
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor // color: "#525252"
text: "-" text: "."
} }
TextInput { TextInput {
id: yearInput id: yearInput
width: 44 width: 44
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.pixelSize: 14 font.pixelSize: 18
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor /// color: "#525252"
maximumLength: 4 maximumLength: 4
horizontalAlignment: TextInput.AlignHCenter horizontalAlignment: TextInput.AlignHCenter
validator: IntValidator{bottom: 1000; top: 9999;} validator: IntValidator{bottom: 1000; top: 9999;}
@@ -287,7 +272,6 @@ Item {
gridVisible: false gridVisible: false
background: Rectangle { color: "transparent" } background: Rectangle { color: "transparent" }
dayDelegate: Item { dayDelegate: Item {
z: parent.z + 1
implicitHeight: implicitWidth implicitHeight: implicitWidth
implicitWidth: calendar.width / 7 implicitWidth: calendar.width / 7
@@ -324,8 +308,6 @@ Item {
calendar.showNextMonth() calendar.showNextMonth()
else calendar.showPreviousMonth() else calendar.showPreviousMonth()
} }
dateChanged();
} }
} }
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -30,8 +30,6 @@ import QtQuick 2.0
import moneroComponents.Clipboard 1.0 import moneroComponents.Clipboard 1.0
import moneroComponents.AddressBookModel 1.0 import moneroComponents.AddressBookModel 1.0
import "../components" as MoneroComponents
import "../js/TxUtils.js" as TxUtils
ListView { ListView {
id: listView id: listView
@@ -41,7 +39,7 @@ ListView {
property int rowSpacing: 12 property int rowSpacing: 12
property var addressBookModel: null property var addressBookModel: null
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings) { function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations) {
var trStart = '<tr><td width="85" style="padding-top:5px"><b>', var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">', trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
trEnd = "</td></tr>"; trEnd = "</td></tr>";
@@ -52,7 +50,6 @@ ListView {
+ (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "") + (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "")
+ (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "") + (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "")
+ (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "") + (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "")
+ (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "")
+ "</table>" + "</table>"
+ translationManager.emptyString; + translationManager.emptyString;
} }
@@ -67,10 +64,11 @@ ListView {
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole) return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
} }
footer: Rectangle { footer: Rectangle {
height: 127 * scaleRatio height: 127
width: listView.width width: listView.width
color: "transparent" color: "#FFFFFF"
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
@@ -81,403 +79,372 @@ ListView {
} }
} }
StandardDialog {
id: detailsPopup
cancelVisible: false
okVisible: true
width:850
}
delegate: Rectangle { delegate: Rectangle {
id: delegate id: delegate
property bool collapsed: index ? false : true height: 144
height: collapsed ? 180 * scaleRatio : 70 * scaleRatio
width: listView.width width: listView.width
color: "transparent" color: index % 2 ? "#F8F8F8" : "#FFFFFF"
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
function collapse(){ StandardButton {
delegate.height = 180 * scaleRatio; id: detailsButton
} anchors.right:parent.right
anchors.rightMargin: 15
// borders
Rectangle{
anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.topMargin: parent.height/2 - this.height/2
width: 1 width: 80
color: "#404040" fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Details")
onClicked: {
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
detailsPopup.title = "Transaction details";
detailsPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations);
detailsPopup.open();
}
} }
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: collapsed ? 2 : 1
color: collapsed ? "#BBBBBB" : "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.top
anchors.left: parent.left
height: 1
color: "#404040"
}
Rectangle{ Row {
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
height: 1
color: "#404040"
}
Rectangle {
id: row1 id: row1
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 15 * scaleRatio anchors.topMargin: 14
height: 40 * scaleRatio // -- direction indicator
color: "transparent"
Image {
id: arrowImage
source: isOut ? "../images/downArrow.png" : "../images/upArrow-green.png"
height: 18 * scaleRatio
width: 12 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 12 * scaleRatio
}
Text {
id: txrxLabel
anchors.left: arrowImage.right
anchors.leftMargin: 18 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 14 * scaleRatio
text: isOut ? "Sent" : "Received"
color: "#808080"
}
Text {
id: amountLabel
anchors.left: arrowImage.right
anchors.leftMargin: 18 * scaleRatio
anchors.top: txrxLabel.bottom
anchors.topMargin: 0 * scaleRatio
font.family: MoneroComponents.Style.fontBold.name
font.pixelSize: 18 * scaleRatio
font.bold: true
text: {
var _amount = amount;
if(_amount === 0){
// *sometimes* amount is 0, while the 'destinations string'
// has the correct amount, so we try to fetch it from that instead.
_amount = TxUtils.destinationsToAmount(destinations);
_amount = (_amount *1);
}
return _amount + " XMR";
}
color: isOut ? "white" : "#2eb358"
}
Rectangle { Rectangle {
anchors.right: parent.right id: dot
width: 300 * scaleRatio width: 14
height: parent.height height: width
color: "transparent" radius: width / 2
color: isOut ? "#FF4F41" : "#36B05B"
}
Text { Item { //separator
id: dateLabel width: 12
anchors.left: parent.left height: 14
font.family: MoneroComponents.Style.fontRegular.name }
font.pixelSize: 14 * scaleRatio
text: date // -- description aka recepient name from address book (TODO)
color: "#808080" /*
} Text {
id: descriptionText
Text { width: text.length ? (descriptionArea.containsMouse ? parent.width - x - 12 : 120) : 0
id: timeLabel anchors.verticalCenter: dot.verticalCenter
anchors.left: dateLabel.right font.family: "Arial"
anchors.leftMargin: 7 * scaleRatio font.bold: true
anchors.top: parent.top font.pixelSize: 19
anchors.topMargin: 3 * scaleRatio color: "#444444"
font.pixelSize: 12 * scaleRatio elide: Text.ElideRight
text: time text: description
color: "#808080"
} MouseArea {
id: descriptionArea
Text { anchors.fill: parent
id: toLabel hoverEnabled: true
property string address: ""
color: "#BBBBBB"
anchors.left: parent.left
anchors.top: dateLabel.bottom
anchors.topMargin: 0
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16 * scaleRatio
text: {
if(isOut){
address = TxUtils.destinationsToAddress(destinations);
if(address){
var truncated = TxUtils.addressTruncate(address);
return "To " + truncated;
} else {
return "Unknown recipient";
}
}
return "";
}
MouseArea{
visible: parent.address !== undefined
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
toLabel.color = "white";
}
onExited: {
toLabel.color = "#BBBBBB";
}
onClicked: {
if(parent.address){
console.log("Address copied to clipboard");
clipboard.setText(parent.address);
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
}
}
}
}
Rectangle {
height: 24 * scaleRatio
width: 24 * scaleRatio
color: "transparent"
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Image {
id: dropdownImage
height: 8 * scaleRatio
width: 12 * scaleRatio
source: "../images/whiteDropIndicator.png"
rotation: delegate.collapsed ? 180 : 0
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
delegate.collapsed = !delegate.collapsed;
}
}
} }
} }
*/
/*
Item { //separator
width: descriptionText.width ? 12 : 0
height: 14
visible: !descriptionArea.containsMouse
}
*/
// -- address (in case outgoing transaction) - N/A in case of incoming
TextEdit {
id: addressText
readOnly: true
selectByMouse: true
anchors.verticalCenter: dot.verticalCenter
width: parent.width - x - 12
//elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: hash
// visible: !descriptionArea.containsMouse
}
} }
Rectangle { Row {
// - Payment ID
id: row2 id: row2
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio anchors.top: parent.top
anchors.top: row1.bottom anchors.topMargin: 40
anchors.topMargin: 15 * scaleRatio anchors.leftMargin: 26
height: 40 * scaleRatio
color: "transparent"
visible: delegate.collapsed
// left column // -- "PaymentID" title
MoneroComponents.HistoryTableInnerColumn{ Text {
anchors.left: parent.left id: paymentLabel
anchors.leftMargin: 30 * scaleRatio width: 86
anchors.bottom: parent.bottom
font.family: "Arial"
font.pixelSize: 12
color: "#535353"
text: paymentId !== "" ? qsTr("Payment ID:") + translationManager.emptyString : ""
}
// -- "PaymentID" value
TextEdit {
readOnly: true
selectByMouse: true
id: paymentIdValue
width: 136
anchors.bottom: parent.bottom
//elide: Text.ElideRight
font.family: "Arial"
font.pixelSize:13
color: "#545454"
text: paymentId
labelHeader: "Transaction ID" }
labelValue: hash.substring(0, 18) + "..." // Address book lookup
copyValue: hash TextEdit {
readOnly: true
selectByMouse: true
id: addressBookLookupValue
width: 136
anchors.bottom: parent.bottom
//elide: Text.ElideRight
font.family: "Arial"
font.pixelSize:13
color: "#545454"
text: "(" + lookupPaymentID(paymentId) + ")"
visible: text !== "()"
}
}
Row {
// block height row
id: row3
anchors.left: parent.left
anchors.right: parent.right
anchors.top: row2.bottom
anchors.topMargin: rowSpacing
anchors.leftMargin: 26
// -- "BlockHeight" title
Text {
id: blockHeghtTitle
anchors.bottom: parent.bottom
width: 86
font.family: "Arial"
font.pixelSize: 12
color: "#535353"
text: qsTr("BlockHeight:") + translationManager.emptyString
}
// -- "BlockHeight" value
TextEdit {
readOnly: true
selectByMouse: true
width: 85
anchors.bottom: parent.bottom
//elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 13
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
text: {
if (!isPending)
if(confirmations < confirmationsRequired)
return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired)
else
return blockHeight
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
}
}
}
// -- "Date", "Balance" and "Amound" section
Row {
id: row4
anchors.top: row3.bottom
anchors.left: parent.left
spacing: 12
anchors.topMargin: rowSpacing
Item { //separator
width: 14
height: 14
} }
// right column // -- "Date" column
MoneroComponents.HistoryTableInnerColumn{ Column {
anchors.right: parent.right anchors.top: parent.top
anchors.rightMargin: 100 * scaleRatio width: 215
width: 200 * scaleRatio
height: parent.height
color: "transparent"
labelHeader: qsTr("Fee") Text {
labelValue: { anchors.left: parent.left
if(!isOut && !fee){ font.family: "Arial"
return "-"; font.pixelSize: 12
} else if(isOut && fee){ color: "#545454"
return fee + " XMR"; text: qsTr("Date") + translationManager.emptyString
} else { }
return "Unknown"
Row {
anchors.left: parent.left
anchors.right: parent.right
spacing: 33
Text {
font.family: "Arial"
font.pixelSize: 18
color: "#000000"
text: date
}
Text {
font.family: "Arial"
font.pixelSize: 18
color: "#000000"
text: time
} }
} }
copyValue: { }
if(isOut && fee){ return fee } // -- "Balance" column
else { return "" } // XXX: we don't have a balance
/*
Column {
anchors.top: parent.top
width: 148
visible: false
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("Balance") + translationManager.emptyString
}
Text {
font.family: "Arial"
font.pixelSize: 18
color: "#000000"
text: balance
}
}
*/
// -- "Amount column
Column {
anchors.top: parent.top
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("Amount") + translationManager.emptyString
}
Row {
spacing: 2
Text {
anchors.bottom: parent.bottom
anchors.bottomMargin: 3
font.family: "Arial"
font.pixelSize: 16
color: isOut ? "#FF4F41" : "#36B05B"
text: isOut ? "↓" : "↑"
}
Text {
id: amountText
anchors.bottom: parent.bottom
font.family: "Arial"
font.pixelSize: 18
color: isOut ? "#FF4F41" : "#36B05B"
text: displayAmount
}
} }
} }
// -- "Fee column
Column {
anchors.top: parent.top
width: 148
visible: isOut
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("Fee") + translationManager.emptyString
}
Row {
spacing: 2
Text {
anchors.bottom: parent.bottom
font.family: "Arial"
font.pixelSize: 18
color: "#FF4F41"
text: fee
}
}
}
}
/*
// Transaction dropdown menu.
// Disable for now until AddressBook implemented
TableDropdown {
id: dropdown
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 11
anchors.rightMargin: 5
dataModel: dropModel
z: 1
onExpandedChanged: {
if(expanded) {
listView.previousItem = delegate
listView.currentIndex = index
}
}
onOptionClicked: {
if(option === 0)
clipboard.setText(address)
}
} }
Rectangle { Rectangle {
id: row3
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio anchors.bottom: parent.bottom
anchors.top: row2.bottom height: 1
anchors.topMargin: 15 * scaleRatio color: "#DBDBDB"
height: 40 * scaleRatio
color: "transparent"
visible: delegate.collapsed
// left column
MoneroComponents.HistoryTableInnerColumn{
anchors.left: parent.left
anchors.leftMargin: 30 * scaleRatio
labelHeader: qsTr("Blockheight")
labelValue: {
if (!isPending)
if(confirmations < confirmationsRequired)
return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired);
else
return blockHeight;
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
if (isFailed)
return qsTr("FAILED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
}
copyValue: labelValue
}
// right column
MoneroComponents.HistoryTableInnerColumn {
visible: currentWallet.getUserNote(hash)
anchors.right: parent.right
anchors.rightMargin: 80 * scaleRatio
width: 220 * scaleRatio
height: parent.height
color: "transparent"
labelHeader: qsTr("Description")
labelValue: {
var note = currentWallet.getUserNote(hash);
if(note){
if(note.length > 28) {
return note.substring(0, 28) + "...";
} else {
return note;
}
} else {
return "";
}
}
copyValue: {
return currentWallet.getUserNote(hash);
}
}
Rectangle {
id: proofButton
visible: isOut
color: "#404040"
height: 24 * scaleRatio
width: 24 * scaleRatio
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 36
radius: 20 * scaleRatio
MouseArea {
id: proofButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
var address = TxUtils.destinationsToAddress(destinations);
if(address === undefined){
console.log('getProof: Error fetching address')
return;
}
var checked = (TxUtils.checkTxID(hash) && TxUtils.checkAddress(address, appWindow.persistentSettings.nettype));
if(!checked){
console.log('getProof: Error checking TxId and/or address');
}
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
root.getProofClicked(hash, address, '');
}
onEntered: {
proofButton.color = "#656565";
}
onExited: {
proofButton.color = "#404040";
}
}
Text {
color: MoneroComponents.Style.defaultFontColor
text: "P"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
}
}
Rectangle {
id: detailsButton
color: "#404040"
height: 24 * scaleRatio
width: 24 * scaleRatio
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 6
radius: 20 * scaleRatio
MouseArea {
id: detailsButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
var rings = currentWallet.getRings(hash)
if (rings)
rings = rings.replace(/\|/g, '\n')
informationPopup.title = "Transaction details";
informationPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
informationPopup.onCloseCallback = null
informationPopup.open();
}
onEntered: {
detailsButton.color = "#656565";
}
onExited: {
detailsButton.color = "#404040";
}
}
Text {
color: MoneroComponents.Style.defaultFontColor
text: "?"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
}
}
} }
*/
}
ListModel {
id: dropModel
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
ListElement { name: "<b>Add to address book</b>"; icon: "../images/dropdownAdd.png" }
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
} }
Clipboard { id: clipboard } Clipboard { id: clipboard }

View File

@@ -1,91 +0,0 @@
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import moneroComponents.Clipboard 1.0
import moneroComponents.PendingTransaction 1.0
import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents
Rectangle{
Clipboard { id: clipboard }
width: label1.width > label2.width ? label1.width : label2.width
height: label1.height + label2.height
color: "transparent"
property string copyValue: ""
property alias labelHeader: label1.text
property alias labelValue: label2.text
Text {
id: label1
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
text: labelHeader
color: MoneroComponents.Style.greyFontColor
}
Text {
id: label2
anchors.left: parent.left
anchors.top: label1.bottom
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
text: labelValue
color: MoneroComponents.Style.dimmedFontColor
}
// hover effect / copy value
MouseArea {
visible: copyValue !== ""
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
label1.color = MoneroComponents.Style.defaultFontColor;
label2.color = MoneroComponents.Style.defaultFontColor;
}
onExited: {
label1.color = MoneroComponents.Style.greyFontColor;
label2.color = MoneroComponents.Style.dimmedFontColor;
}
onClicked: {
if(copyValue){
console.log("Copied to clipboard");
clipboard.setText(copyValue);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
}
}

View File

@@ -1,222 +0,0 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import moneroComponents.Clipboard 1.0
import moneroComponents.AddressBookModel 1.0
import "../components" as MoneroComponents
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
property var previousItem
property var addressBookModel: null
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings) {
var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
trEnd = "</td></tr>";
return '<table border="0">'
+ (tx_id ? trStart + qsTr("Tx ID:") + trMiddle + tx_id + trEnd : "")
+ (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "")
+ (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "")
+ (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "")
+ (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "")
+ (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "")
+ "</table>"
+ translationManager.emptyString;
}
function lookupPaymentID(paymentId) {
if (!addressBookModel)
return ""
var idx = addressBookModel.lookupPaymentID(paymentId)
if (idx < 0)
return ""
idx = addressBookModel.index(idx, 0)
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
}
footer: Rectangle {
height: 127 * scaleRatio
width: listView.width
color: "transparent"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14 * scaleRatio
color: "#545454"
text: qsTr("No more results") + translationManager.emptyString
}
}
delegate: Rectangle {
id: delegate
height: tableContent.height + 20 * scaleRatio
width: listView.width
color: "transparent"
Layout.leftMargin: 10 * scaleRatio
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: parent.top
width: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
height: 1
color: "#404040"
}
MouseArea {
anchors.fill: parent
onClicked: {
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
var rings = currentWallet.getRings(hash)
if (rings)
rings = rings.replace(/\|/g, '\n')
informationPopup.title = "Transaction details";
informationPopup.text = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
informationPopup.open();
informationPopup.onCloseCallback = null
}
}
Rectangle {
anchors.right: parent.right
anchors.rightMargin: 15 * scaleRatio
anchors.top: parent.top
anchors.topMargin: parent.height/2 - this.height/2
width: 30 * scaleRatio; height: 30 * scaleRatio
radius: 25
color: "#404040"
Image {
width: 20 * scaleRatio
height: 20 * scaleRatio
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
source: "qrc:///images/nextPage.png"
}
}
ColumnLayout {
id: tableContent
// Date
RowLayout {
Layout.topMargin: 20 * scaleRatio
Layout.leftMargin: 10 * scaleRatio
Text {
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 14 * scaleRatio
color: MoneroComponents.Style.defaultFontColor
text: date
}
Text {
font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: MoneroComponents.Style.dimmedFontColor
text: time
}
// Show confirmations
Text {
visible: confirmations < confirmationsRequired || isPending
Layout.leftMargin: 5 * scaleRatio
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
text: {
if (!isPending)
if(confirmations < confirmationsRequired)
return qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired)
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
if (isFailed)
return qsTr("FAILED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
}
}
}
// Amount & confirmations
RowLayout {
Layout.leftMargin: 10 * scaleRatio
spacing: 2
Text {
font.family: "Arial"
font.pixelSize: 14 * scaleRatio
color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358"
text: isOut ? "↓" : "↑"
}
Text {
id: amountText
font.family: "Arial"
font.pixelSize: 18 * scaleRatio
color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358"
text: displayAmount
}
}
}
}
ListModel {
id: dropModel
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
ListElement { name: "<b>Add to address book</b>"; icon: "../images/dropdownAdd.png" }
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
}
Clipboard { id: clipboard }
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -30,7 +30,6 @@
import QtQuick 2.0 import QtQuick 2.0
Item { Item {
property alias image : buttonImage
property alias imageSource : buttonImage.source property alias imageSource : buttonImage.source
signal clicked(var mouse) signal clicked(var mouse)
@@ -54,8 +53,7 @@ Item {
MouseArea { MouseArea {
id: buttonArea id: buttonArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onPressed: { onPressed: {
buttonImage.x = buttonImage.x + 2 buttonImage.x = buttonImage.x + 2

View File

@@ -1,93 +0,0 @@
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Item {
id: inlineButton
height: rect.height * scaleRatio
property string shadowPressedColor: "#B32D00"
property string shadowReleasedColor: "#FF4304"
property string pressedColor: "#FF4304"
property string releasedColor: "#FF6C3C"
property string icon: ""
property string textColor: "#FFFFFF"
property int fontSize: 12 * scaleRatio
property alias text: inlineText.text
signal clicked()
function doClick() {
// Android workaround
releaseFocus();
clicked();
}
Rectangle{
id: rect
color: MoneroComponents.Style.buttonBackgroundColorDisabled
border.color: "black"
height: 28 * scaleRatio
width: inlineText.width + 22 * scaleRatio
radius: 4
anchors.top: parent.top
anchors.right: parent.right
Text {
id: inlineText
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: 16 * scaleRatio
color: "black"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
MouseArea {
id: buttonArea
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
hoverEnabled: true
anchors.fill: parent
onClicked: doClick()
onEntered: {
rect.color = "#707070";
rect.opacity = 0.8;
}
onExited: {
rect.opacity = 1.0;
rect.color = "#808080";
}
}
}
Keys.onSpacePressed: doClick()
Keys.onReturnPressed: doClick()
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -26,20 +26,21 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick.Controls 2.0 import QtQuick.Controls 1.2
import QtQuick 2.7 import QtQuick.Controls.Styles 1.2
import QtQuick 2.2
import "../components" as MoneroComponents
TextField { TextField {
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.pixelSize: 18 * scaleRatio
font.bold: true
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignLeft
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
background: Rectangle { style: TextFieldStyle {
color: "transparent" textColor: "#3F3F3F"
placeholderTextColor: "#BABABA"
background: Rectangle {
border.width: 0
color: "transparent"
}
} }
} }

View File

@@ -1,164 +0,0 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0
import "../components" as MoneroComponents
Item {
id: root
visible: false
property alias labelText: label.text
property alias inputText: input.text
// same signals as Dialog has
signal accepted()
signal rejected()
function open() {
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.enabled = false
show()
root.visible = true;
input.focus = true;
input.text = "";
}
function close() {
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.enabled = true
root.visible = false;
}
ColumnLayout {
z: bg.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 }
ColumnLayout {
id: column
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400 * scaleRatio
Label {
id: label
anchors.left: parent.left
Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
TextField {
id : input
focus: true
Layout.topMargin: 6
Layout.fillWidth: true
anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24 * scaleRatio
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
background: Rectangle {
radius: 2
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: "black"
}
Keys.onReturnPressed: {
root.close()
root.accepted()
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
}
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16 * scaleRatio
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
MoneroComponents.StandardButton {
id: cancelButton
small: true
width: 120
fontSize: 14
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: input
onClicked: {
root.close()
root.rejected()
}
}
MoneroComponents.StandardButton {
id: okButton
small: true
width: 120
fontSize: 14
text: qsTr("Ok")
KeyNavigation.tab: cancelButton
onClicked: {
root.close()
root.accepted()
}
}
}
}
}
Rectangle {
id: bg
z: parent.z + 1
anchors.fill: parent
color: "black"
opacity: 0.8
}
}

View File

@@ -1,68 +0,0 @@
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick.Controls 2.0
import QtQuick 2.7
import "../js/TxUtils.js" as TxUtils
import "../components" as MoneroComponents
TextArea {
property bool error: false
property bool addressValidation: false
property bool wrapAnywhere: true
property int fontSize: 18 * scaleRatio
property bool fontBold: false
id: textArea
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: fontSize
font.bold: fontBold
horizontalAlignment: TextInput.AlignLeft
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
wrapMode: {
if(wrapAnywhere){
return Text.WrapAnywhere;
} else {
return Text.WordWrap;
}
}
onTextChanged: {
if(addressValidation){
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
textArea.text = textArea.text.replace(/[^a-z0-9]/gi,'');
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype);
if(!address_ok) error = true;
else error = false;
TextArea.cursorPosition = textArea.text.length;
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -29,40 +29,55 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Item { Item {
id: item id: item
property alias text: label.text property alias text: label.text
property alias color: label.color property alias color: label.color
property alias textFormat: label.textFormat property alias textFormat: label.textFormat
property string tipText: "" property string tipText: ""
property int fontSize: 16 * scaleRatio property int fontSize: 12
property bool fontBold: false
property string fontColor: MoneroComponents.Style.defaultFontColor
property string fontFamily: ""
property alias wrapMode: label.wrapMode property alias wrapMode: label.wrapMode
property alias horizontalAlignment: label.horizontalAlignment
signal linkActivated() signal linkActivated()
height: label.height * scaleRatio width: icon.x + icon.width
width: label.width * scaleRatio height: icon.height
Layout.topMargin: 10 * scaleRatio
Text { Text {
id: label id: label
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: 2 * scaleRatio anchors.bottomMargin: 2
anchors.left: parent.left anchors.left: parent.left
font.family: { font.family: "Arial"
if(fontFamily){ font.pixelSize: parent.fontSize
return fontFamily; color: "#555555"
} else {
return MoneroComponents.Style.fontRegular.name;
}
}
font.pixelSize: fontSize
font.bold: fontBold
color: fontColor
onLinkActivated: item.linkActivated() onLinkActivated: item.linkActivated()
} }
Image {
id: icon
anchors.verticalCenter: parent.verticalCenter
anchors.left: label.right
anchors.leftMargin: 5
source: "../images/whatIsIcon.png"
visible: appWindow.whatIsEnable
}
// MouseArea {
// anchors.fill: icon
// enabled: appWindow.whatIsEnable
// hoverEnabled: true
// onEntered: {
// icon.visible = false
// var pos = appWindow.mapFromItem(icon, 0, -15)
// tipItem.text = item.tipText
// tipItem.x = pos.x
// if(tipItem.height > 30)
// pos.y -= tipItem.height - 28
// tipItem.y = pos.y
// tipItem.visible = true
// }
// onExited: {
// icon.visible = Qt.binding(function(){ return appWindow.whatIsEnable; })
// tipItem.visible = false
// }
// }
} }

View File

@@ -1,74 +0,0 @@
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Rectangle {
signal clicked();
property alias text: labelButtonText.text
id: labelButton
color: "#808080"
radius: 3
height: 20
width: labelButtonText.width + 14
anchors.right: copyButton.left
anchors.rightMargin: 6
visible: isValidOpenAliasAddress(addressLine.text)
Text {
id: labelButtonText
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 12
font.bold: true
text: ""
color: "black"
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
hoverEnabled: true
onClicked: labelButton.clicked()
onEntered: {
labelButton.color = "#707070";
labelButtonText.opacity = 0.8;
}
onExited: {
labelButton.color = "#808080";
labelButtonText.opacity = 1.0;
}
}
}

View File

@@ -1,46 +0,0 @@
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import "../components" as MoneroComponents
Label {
id: item
fontSize: 17 * scaleRatio
Rectangle {
anchors.top: item.bottom
anchors.topMargin: 4
anchors.left: parent.left
anchors.right: parent.right
height: 2
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -28,187 +28,51 @@
import QtQuick 2.0 import QtQuick 2.0
import "../components" as MoneroComponents
Item { Item {
id: item id: item
property alias placeholderText: input.placeholderText
property alias text: input.text property alias text: input.text
property alias placeholderText: placeholderLabel.text
property bool placeholderCenter: false
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 18 * scaleRatio
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.25
property alias validator: input.validator property alias validator: input.validator
property alias readOnly : input.readOnly property alias readOnly : input.readOnly
property alias cursorPosition: input.cursorPosition property alias cursorPosition: input.cursorPosition
property alias echoMode: input.echoMode property alias echoMode: input.echoMode
property alias inlineButton: inlineButtonId property int fontSize: 18
property alias inlineButtonText: inlineButtonId.text
property alias inlineIcon: inlineIcon.visible
property bool copyButton: false
property string borderColor: {
if(input.activeFocus){
return Qt.rgba(255, 255, 255, 0.35);
} else {
return Qt.rgba(255, 255, 255, 0.25);
}
}
property bool borderDisabled: false
property int fontSize: 18 * scaleRatio
property bool showBorder: true
property bool fontBold: false
property alias fontColor: input.color
property bool error: false property bool error: false
property alias labelText: inputLabel.text signal editingFinished()
property alias labelColor: inputLabel.color
property alias labelTextFormat: inputLabel.textFormat
property string backgroundColor: "transparent"
property string tipText: ""
property int labelFontSize: 16 * scaleRatio
property bool labelFontBold: false
property alias labelWrapMode: inputLabel.wrapMode
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
property bool showingHeader: inputLabel.text !== "" || copyButton
property int inputHeight: 42 * scaleRatio
signal labelLinkActivated(); // input label, rich text <a> signal
signal editingFinished();
signal accepted(); signal accepted();
signal textUpdated(); signal textUpdated();
height: showingHeader ? (inputLabel.height + inputItem.height + 2) * scaleRatio : 42 * scaleRatio height: 37
onTextUpdated: { function getColor(error) {
// check to remove placeholder text when there is content if (error)
if(item.isEmpty()){ return "#FFDDDD"
placeholderLabel.visible = true; else
} else { return "#FFFFFF"
placeholderLabel.visible = false;
}
} }
function isEmpty(){ Rectangle {
var val = input.text; anchors.fill: parent
if(val === "") { anchors.bottomMargin: 1
return true; color: "#DBDBDB"
} //radius: 4
else {
return false;
}
} }
Text { Rectangle {
id: inputLabel anchors.fill: parent
anchors.top: parent.top anchors.topMargin: 1
anchors.left: parent.left color: getColor(error)
anchors.topMargin: 2 * scaleRatio //radius: 4
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: labelFontSize
font.bold: labelFontBold
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
onLinkActivated: item.labelLinkActivated()
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
} }
MoneroComponents.LabelButton { Input {
id: copyButtonId id: input
text: qsTr("Copy") anchors.fill: parent
anchors.right: parent.right anchors.leftMargin: 4
onClicked: { anchors.rightMargin: 30
if (input.text.length > 0) { font.pixelSize: parent.fontSize
console.log("Copied to clipboard"); onEditingFinished: item.editingFinished()
clipboard.setText(input.text); onAccepted: item.accepted();
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3); onTextChanged: item.textUpdated()
}
}
visible: copyButton && input.text !== ""
}
Item{
id: inputItem
height: inputHeight * scaleRatio
anchors.top: showingHeader ? inputLabel.bottom : parent.top
anchors.topMargin: showingHeader ? 12 * scaleRatio : 2 * scaleRatio
width: parent.width
Text {
id: placeholderLabel
visible: input.text ? false : true
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: placeholderCenter ? parent.horizontalCenter : undefined
anchors.left: placeholderCenter ? undefined : parent.left
anchors.leftMargin: {
if(placeholderCenter){
return undefined;
}
else if(inlineIcon.visible){ return 50 * scaleRatio; }
else { return 10 * scaleRatio; }
}
opacity: item.placeholderOpacity
color: item.placeholderColor
font.family: item.placeholderFontFamily
font.pixelSize: placeholderFontSize * scaleRatio
font.bold: item.placeholderFontBold
text: ""
z: 3
}
Rectangle {
anchors.fill: parent
anchors.topMargin: 1 * scaleRatio
color: "transparent"
}
Rectangle {
id: inputFill
color: backgroundColor
anchors.fill: parent
border.width: borderDisabled ? 0 : 1
border.color: borderColor
radius: 4
}
Image {
id: inlineIcon
width: 26 * scaleRatio
height: 26 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 8 * scaleRatio
anchors.left: parent.left
anchors.leftMargin: 12 * scaleRatio
source: "../images/moneroIcon-28x28.png"
visible: false
}
MoneroComponents.Input {
id: input
anchors.fill: parent
anchors.leftMargin: inlineIcon.visible ? 38 : 0
font.pixelSize: item.fontSize
font.bold: item.fontBold
onEditingFinished: item.editingFinished()
onAccepted: item.accepted();
onTextChanged: item.textUpdated()
}
MoneroComponents.InlineButton {
id: inlineButtonId
visible: item.inlineButtonText ? true : false
anchors.right: parent.right
anchors.rightMargin: 8 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 6 * scaleRatio
}
} }
} }

View File

@@ -1,140 +0,0 @@
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
ColumnLayout {
id: lineditmulti
property alias text: multiLine.text
property alias placeholderText: placeholderLabel.text
property alias labelText: inputLabel.text
property alias error: multiLine.error
property alias readOnly: multiLine.readOnly
property alias addressValidation: multiLine.addressValidation
property alias labelButtonText: labelButton.text
property bool labelFontBold: false
property bool labelButtonVisible: false
property bool copyButton: false
property bool wrapAnywhere: true
property bool showingHeader: true
property bool showBorder: true
property bool fontBold: false
property int fontSize: 16 * scaleRatio
signal labelButtonClicked();
signal inputLabelLinkActivated();
spacing: 0
Rectangle {
id: inputLabelRect
color: "transparent"
Layout.fillWidth: true
height: (inputLabel.height + 10) * scaleRatio
visible: showingHeader ? true : false
Text {
id: inputLabel
anchors.top: parent.top
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16 * scaleRatio
font.bold: labelFontBold
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
onLinkActivated: inputLabelLinkActivated()
}
MoneroComponents.LabelButton {
id: labelButton
onClicked: labelButtonClicked()
visible: labelButtonVisible
}
MoneroComponents.LabelButton {
id: copyButtonId
visible: copyButton && multiLine.text !== ""
text: qsTr("Copy")
anchors.right: labelButton.visible ? inputLabel.right : parent.right
anchors.rightMargin: labelButton.visible? 4 : 0
onClicked: {
if (multiLine.text.length > 0) {
console.log("Copied to clipboard");
clipboard.setText(multiLine.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
}
}
}
}
MoneroComponents.InputMulti {
id: multiLine
readOnly: false
addressValidation: true
anchors.top: parent.showingHeader ? inputLabelRect.bottom : parent.top
Layout.fillWidth: true
topPadding: parent.showingHeader ? 10 * scaleRatio : 0
bottomPadding: 10 * scaleRatio
wrapAnywhere: parent.wrapAnywhere
fontSize: parent.fontSize
fontBold: parent.fontBold
Text {
id: placeholderLabel
visible: multiLine.text ? false : true
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10 * scaleRatio
opacity: 0.25
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 18 * scaleRatio
text: ""
z: 3
}
Rectangle {
color: "transparent"
border.width: 1
border.color: {
if(multiLine.error && multiLine.text !== ""){
return Qt.rgba(255, 0, 0, 0.45);
} else if(multiLine.activeFocus){
return Qt.rgba(255, 255, 255, 0.35);
} else {
return Qt.rgba(255, 255, 255, 0.25);
}
}
radius: 4
anchors.fill: parent
visible: lineditmulti.showBorder
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -26,9 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.5 import QtQuick 2.0
import "../components" as MoneroComponents
Rectangle { Rectangle {
id: button id: button
@@ -40,120 +38,31 @@ Rectangle {
property var under: null property var under: null
signal clicked() signal clicked()
function doClick() {
// Android workaround
releaseFocus();
clicked();
}
function getOffset() { function getOffset() {
var offset = 0 var offset = 0
var item = button var item = button
while (item.under) { while (item.under) {
offset += 20 * scaleRatio offset += 20
item = item.under item = item.under
} }
return offset return offset
} }
color: "transparent" color: checked ? "#FFFFFF" : "#1C1C1C"
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0 property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
height: present ? ((appWindow.height >= 800) ? 44 * scaleRatio : 38 * scaleRatio ) : 0 height: present ? ((appWindow.height >= 800) ? 64 : 52) : 0
// button gradient while checked
Image {
height: parent.height
width: 260
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: -20
anchors.leftMargin: parent.getOffset()
source: "../images/menuButtonGradient.png"
visible: button.checked
}
// button decorations that are subject to leftMargin offsets
Rectangle {
anchors.left: parent.left
anchors.leftMargin: parent.getOffset() + 20 * scaleRatio
height: parent.height
width: button.checked ? 20: 10
color: "#00000000"
// dot if unchecked
Rectangle {
id: dot
anchors.centerIn: parent
width: button.checked ? 20 * scaleRatio : 8 * scaleRatio
height: button.checked ? 20 * scaleRatio : 8 * scaleRatio
radius: button.checked ? 20 * scaleRatio : 4 * scaleRatio
color: button.dotColor
// arrow if checked
Image {
anchors.centerIn: parent
anchors.left: parent.left
source: "../images/arrow-right-medium-white.png"
visible: button.checked
}
}
// button text
Text {
id: label
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.right
anchors.leftMargin: 8 * scaleRatio
font.family: MoneroComponents.Style.fontMedium.name
font.bold: true
font.pixelSize: 16 * scaleRatio
color: "#FFFFFF"
}
}
// menu button right arrow
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.leftMargin: parent.getOffset()
source: "../images/right.png"
opacity: button.checked ? 1.0 : 0.4
}
Text {
id: symbolText
anchors.centerIn: parent
font.pixelSize: 11 * scaleRatio
font.bold: true
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
visible: appWindow.ctrlPressed
}
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
if(parent.checked)
return
button.doClick()
parent.checked = true
}
}
transform: Scale { transform: Scale {
yScale: button.present ? 1 : 0 yScale: button.present ? 1 : 0
Behavior on yScale { Behavior on yScale {
NumberAnimation { duration: 200; easing.type: Easing.OutCubic } NumberAnimation { duration: 500; easing.type: Easing.InOutCubic }
} }
} }
Behavior on height { Behavior on height {
SequentialAnimation { SequentialAnimation {
NumberAnimation { duration: 200; easing.type: Easing.OutCubic } NumberAnimation { duration: 500; easing.type: Easing.InOutCubic }
} }
} }
@@ -161,4 +70,77 @@ Rectangle {
// we get the value of checked before the change // we get the value of checked before the change
ScriptAction { script: if (under) under.numSelectedChildren += checked > 0 ? -1 : 1 } ScriptAction { script: if (under) under.numSelectedChildren += checked > 0 ? -1 : 1 }
} }
Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: parent.getOffset()
width: 50
Rectangle {
id: dot
anchors.centerIn: parent
width: 16
height: width
radius: height / 2
Rectangle {
anchors.centerIn: parent
width: 12
height: width
radius: height / 2
color: "#1C1C1C"
visible: !button.checked && !buttonArea.containsMouse
}
}
Text {
id: symbolText
anchors.centerIn: parent
font.pixelSize: 11
font.bold: true
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
visible: appWindow.ctrlPressed
}
}
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#DBDBDB"
visible: parent.checked
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20
anchors.leftMargin: parent.getOffset()
source: "../images/menuIndicator.png"
}
Text {
id: label
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: parent.getOffset() + 50
font.family: "Arial"
font.pixelSize: 18
color: parent.checked ? "#000000" : "#FFFFFF"
}
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
onClicked: {
if(parent.checked)
return
button.clicked()
parent.checked = true
}
}
} }

View File

@@ -1,9 +1,8 @@
import QtQuick 2.2 import QtQuick 2.2
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents
// BasicPanel header // BasicPanel header
Rectangle { Rectangle {
@@ -11,16 +10,17 @@ Rectangle {
anchors.leftMargin: 1 anchors.leftMargin: 1
anchors.rightMargin: 1 anchors.rightMargin: 1
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 64 * scaleRatio Layout.preferredHeight: 64
color: "#FFFFFF" color: "#FFFFFF"
// visible: basicMode
Image { Image {
id: logo id: logo
visible: appWindow.width > 460 * scaleRatio visible: appWindow.width > 460
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -5 anchors.verticalCenterOffset: -5
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 50 * scaleRatio anchors.leftMargin: appWindow.persistentSettings.customDecorations ? 20 : 40
source: "../images/moneroLogo2.png" source: "../images/moneroLogo2.png"
} }
@@ -28,8 +28,9 @@ Rectangle {
id: icon id: icon
visible: !logo.visible visible: !logo.visible
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
// anchors.verticalCenterOffset: -5
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 40 * scaleRatio anchors.leftMargin: appWindow.persistentSettings.customDecorations ? 20 : 40
source: "../images/moneroIcon.png" source: "../images/moneroIcon.png"
} }
@@ -37,16 +38,16 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
anchors.topMargin: 10 * scaleRatio anchors.topMargin: 10
width: 256 * scaleRatio width: 256
columns: 3 columns: 3
Text { Text {
id: balanceLabel id: balanceLabel
width: 116 * scaleRatio width: 116
height: 20 * scaleRatio height: 20
font.family: "Arial" font.family: "Arial"
font.pixelSize: 12 * scaleRatio font.pixelSize: 12
font.letterSpacing: -1 font.letterSpacing: -1
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -57,10 +58,10 @@ Rectangle {
Text { Text {
id: balanceText id: balanceText
width: 110 * scaleRatio width: 110
height: 20 * scaleRatio height: 20
font.family: "Arial" font.family: "Arial"
font.pixelSize: 18 * scaleRatio font.pixelSize: 18
font.letterSpacing: -1 font.letterSpacing: -1
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -70,8 +71,8 @@ Rectangle {
} }
Item { Item {
height: 20 * scaleRatio height: 20
width: 20 * scaleRatio width: 20
Image { Image {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@@ -81,10 +82,10 @@ Rectangle {
} }
Text { Text {
width: 116 * scaleRatio width: 116
height: 20 * scaleRatio height: 20
font.family: "Arial" font.family: "Arial"
font.pixelSize: 12 * scaleRatio font.pixelSize: 12
font.letterSpacing: -1 font.letterSpacing: -1
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@@ -95,10 +96,10 @@ Rectangle {
Text { Text {
id: availableBalanceText id: availableBalanceText
width: 110 * scaleRatio width: 110
height: 20 * scaleRatio height: 20
font.family: "Arial" font.family: "Arial"
font.pixelSize: 14 * scaleRatio font.pixelSize: 14
font.letterSpacing: -1 font.letterSpacing: -1
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -27,22 +27,30 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.1
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents
Rectangle { Row {
id: item id: item
color: "black"
property var connected: Wallet.ConnectionStatus_Disconnected property var connected: Wallet.ConnectionStatus_Disconnected
function getConnectionStatusImage(status) {
if (status == Wallet.ConnectionStatus_Connected)
return "../images/statusConnected.png"
else
return "../images/statusDisconnected.png"
}
function getConnectionStatusColor(status) {
if (status == Wallet.ConnectionStatus_Connected)
return "#FF6C3B"
else
return "#AAAAAA"
}
function getConnectionStatusString(status) { function getConnectionStatusString(status) {
if (status == Wallet.ConnectionStatus_Connected) { if (status == Wallet.ConnectionStatus_Connected) {
if(!appWindow.daemonSynced) if(!appWindow.daemonSynced)
return qsTr("Synchronizing") return qsTr("Synchronizing")
if(appWindow.remoteNodeConnected)
return qsTr("Remote node")
return qsTr("Connected") return qsTr("Connected")
} }
if (status == Wallet.ConnectionStatus_WrongVersion) if (status == Wallet.ConnectionStatus_WrongVersion)
@@ -52,68 +60,37 @@ Rectangle {
return qsTr("Invalid connection status") return qsTr("Invalid connection status")
} }
RowLayout { Item {
Layout.preferredHeight: 40 * scaleRatio id: iconItem
anchors.bottom: parent.bottom
width: 50
height: 50
Item { Image {
id: iconItem anchors.centerIn: parent
anchors.top: parent.top source: getConnectionStatusImage(item.connected)
width: 40 * scaleRatio
height: 40 * scaleRatio
opacity: {
if(item.connected == Wallet.ConnectionStatus_Connected){
return 1
} else {
return 0.5
}
}
Image {
anchors.top: parent.top
anchors.topMargin: 6
anchors.right: parent.right
anchors.rightMargin: 11
source: {
if(item.connected == Wallet.ConnectionStatus_Connected){
return "../images/lightning.png"
} else {
return "../images/lightning-white.png"
}
}
}
}
Item {
anchors.top: parent.top
anchors.left: iconItem.right
height: 40 * scaleRatio
width: 260 * scaleRatio
Text {
id: statusText
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 0
font.family: MoneroComponents.Style.fontMedium.name
font.bold: true
font.pixelSize: 13 * scaleRatio
color: "white"
opacity: 0.5
text: qsTr("Network status") + translationManager.emptyString
}
Text {
id: statusTextVal
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 14
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 20 * scaleRatio
color: "white"
text: getConnectionStatusString(item.connected) + translationManager.emptyString
}
} }
} }
Column {
anchors.bottom: parent.bottom
height: 53
spacing: 3
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("Network status") + translationManager.emptyString
}
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 18
color: getConnectionStatusColor(item.connected)
text: getConnectionStatusString(item.connected) + translationManager.emptyString
}
}
} }

View File

@@ -1,252 +0,0 @@
// Copyright (c) 2017, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0
import "../components" as MoneroComponents
Item {
id: root
visible: false
Rectangle {
id: bg
z: parent.z + 1
anchors.fill: parent
color: "black"
opacity: 0.8
}
property alias password: passwordInput1.text
// same signals as Dialog has
signal accepted()
signal rejected()
signal closeCallback()
function open() {
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.enabled = false
show();
root.visible = true;
passwordInput1.text = "";
passwordInput2.text = "";
passwordInput1.focus = true
}
function close() {
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.enabled = true
root.visible = false;
closeCallback();
}
// TODO: implement without hardcoding sizes
width: 480
height: 360
// Make window draggable
MouseArea {
anchors.fill: parent
property point lastMousePos: Qt.point(0, 0)
onPressed: { lastMousePos = Qt.point(mouseX, mouseY); }
onMouseXChanged: root.x += (mouseX - lastMousePos.x)
onMouseYChanged: root.y += (mouseY - lastMousePos.y)
}
ColumnLayout {
z: bg.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 * scaleRatio }
ColumnLayout {
id: column
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400 * scaleRatio
Label {
text: qsTr("Please enter new password")
anchors.left: parent.left
Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
TextField {
id : passwordInput1
Layout.topMargin: 6
Layout.fillWidth: true
anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
KeyNavigation.tab: passwordInput2
background: Rectangle {
radius: 2
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: "black"
Image {
width: 12
height: 16
source: "../images/lockIcon.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20
}
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
}
// padding
Rectangle {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "black"
}
Label {
text: qsTr("Please confirm new password")
anchors.left: parent.left
Layout.fillWidth: true
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
TextField {
id : passwordInput2
Layout.topMargin: 6
Layout.fillWidth: true
anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
background: Rectangle {
radius: 2
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: "black"
Image {
width: 12
height: 16
source: "../images/lockIcon.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20
}
}
Keys.onReturnPressed: {
if (passwordInput1.text === passwordInput2.text) {
root.close()
root.accepted()
}
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
}
// padding
Rectangle {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "black"
}
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16 * scaleRatio
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
MoneroComponents.StandardButton {
id: cancelButton
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passwordInput1
onClicked: {
root.close()
root.rejected()
}
}
MoneroComponents.StandardButton {
id: okButton
text: qsTr("Continue")
KeyNavigation.tab: cancelButton
enabled: passwordInput1.text === passwordInput2.text
onClicked: {
root.close()
root.accepted()
}
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2017-2018, The Monero Project // Copyright (c) 2017, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -26,8 +26,8 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.7 import QtQuick 2.0
import QtQuick.Controls 2.0 import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
@@ -35,93 +35,79 @@ import QtQuick.Window 2.0
import "../components" as MoneroComponents import "../components" as MoneroComponents
Item { Window {
id: root id: root
visible: false modality: Qt.ApplicationModal
flags: Qt.Window | Qt.FramelessWindowHint
property alias password: passwordInput.text property alias password: passwordInput.text
property string walletName property string walletName
// same signals as Dialog has // same signals as Dialog has
signal accepted() signal accepted()
signal rejected() signal rejected()
signal closeCallback()
function open(walletName) { function open(walletName) {
root.walletName = walletName ? walletName : "" root.walletName = walletName ? walletName : ""
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.enabled = false
show() show()
root.visible = true;
passwordInput.forceActiveFocus();
passwordInput.text = ""
} }
function close() { // TODO: implement without hardcoding sizes
leftPanel.enabled = true width: 480
middlePanel.enabled = true height: walletName ? 240 : 200
titleBar.enabled = true
root.visible = false; // Make window draggable
closeCallback(); MouseArea {
anchors.fill: parent
property point lastMousePos: Qt.point(0, 0)
onPressed: { lastMousePos = Qt.point(mouseX, mouseY); }
onMouseXChanged: root.x += (mouseX - lastMousePos.x)
onMouseYChanged: root.y += (mouseY - lastMousePos.y)
} }
ColumnLayout { ColumnLayout {
z: bg.z + 1
id: mainLayout id: mainLayout
spacing: 10 spacing: 10
anchors { fill: parent; margins: 35 * scaleRatio } anchors { fill: parent; margins: 35 }
ColumnLayout { ColumnLayout {
id: column id: column
//anchors {fill: parent; margins: 16 }
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400 * scaleRatio
Label { Label {
text: root.walletName.length > 0 ? qsTr("Please enter wallet password for: ") + root.walletName : qsTr("Please enter wallet password") text: root.walletName.length > 0 ? qsTr("Please enter wallet password for:<br>") + root.walletName : qsTr("Please enter wallet password")
anchors.left: parent.left Layout.alignment: Qt.AlignHCenter
Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 16 * scaleRatio font.pixelSize: 24
font.family: MoneroComponents.Style.fontLight.name font.family: "Arial"
color: "#555555"
color: MoneroComponents.Style.defaultFontColor
} }
TextField { TextField {
id : passwordInput id : passwordInput
Layout.topMargin: 6 focus: true
Layout.fillWidth: true Layout.fillWidth: true
anchors.left: parent.left Layout.alignment: Qt.AlignHCenter
horizontalAlignment: TextInput.AlignLeft horizontalAlignment: TextInput.AlignHCenter
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name font.family: "Arial"
font.pixelSize: 24 * scaleRatio font.pixelSize: 32
echoMode: TextInput.Password echoMode: TextInput.Password
KeyNavigation.tab: okButton KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
background: Rectangle { style: TextFieldStyle {
radius: 2 renderType: Text.NativeRendering
border.color: Qt.rgba(255, 255, 255, 0.35) textColor: "#35B05A"
border.width: 1 passwordCharacter: "•"
color: "black" // no background
background: Rectangle {
Image { radius: 0
width: 12 border.width: 0
height: 16
source: "../images/lockIcon.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20
} }
} }
Keys.onReturnPressed: { Keys.onReturnPressed: {
root.close() root.close()
root.accepted() root.accepted()
@@ -132,45 +118,66 @@ Item {
root.rejected() root.rejected()
} }
} }
// underline
Rectangle {
height: 1
color: "#DBDBDB"
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
anchors.bottomMargin: 3
// Ok/Cancel buttons }
RowLayout { // padding
id: buttons Rectangle {
spacing: 16 * scaleRatio Layout.fillWidth: true
Layout.topMargin: 16 Layout.alignment: Qt.AlignHCenter
Layout.alignment: Qt.AlignRight height: 10
opacity: 0
MoneroComponents.StandardButton { color: "black"
id: cancelButton }
small: true }
text: qsTr("Cancel") + translationManager.emptyString // Ok/Cancel buttons
KeyNavigation.tab: passwordInput RowLayout {
onClicked: { id: buttons
root.close() spacing: 60
root.rejected() Layout.alignment: Qt.AlignHCenter
}
} MoneroComponents.StandardButton {
id: cancelButton
MoneroComponents.StandardButton { width: 120
id: okButton fontSize: 14
small: true shadowReleasedColor: "#FF4304"
text: qsTr("Continue") shadowPressedColor: "#B32D00"
KeyNavigation.tab: cancelButton releasedColor: "#FF6C3C"
onClicked: { pressedColor: "#FF4304"
root.close() text: qsTr("Cancel") + translationManager.emptyString
root.accepted() KeyNavigation.tab: passwordInput
} onClicked: {
root.close()
root.rejected()
}
}
MoneroComponents.StandardButton {
id: okButton
width: 120
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Ok")
KeyNavigation.tab: cancelButton
onClicked: {
root.close()
root.accepted()
} }
} }
} }
} }
Rectangle {
id: bg
anchors.fill: parent
color: "black"
opacity: 0.8
}
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -116,7 +116,7 @@ Item {
Row { Row {
id: row2 id: row2
spacing: bar.width / 14 spacing: ((bar.width - 8) / 2) / 4
Repeater { Repeater {
model: 4 model: 4
@@ -125,7 +125,7 @@ Item {
id: delegateItem2 id: delegateItem2
currentX: x + row2.x currentX: x + row2.x
currentIndex: index currentIndex: index
mainTick: currentIndex === 0 mainTick: currentIndex === 0 || currentIndex === 3 || currentIndex === 13
Component.onCompleted: { Component.onCompleted: {
row.positions[currentIndex] = delegateItem2 row.positions[currentIndex] = delegateItem2
} }
@@ -135,7 +135,7 @@ Item {
Row { Row {
id: row1 id: row1
spacing: bar.width / 14 spacing: ((bar.width - 8) / 2) / 10
Repeater { Repeater {
model: 10 model: 10
@@ -144,7 +144,7 @@ Item {
id: delegateItem1 id: delegateItem1
currentX: x + row1.x currentX: x + row1.x
currentIndex: index + 4 currentIndex: index + 4
mainTick: currentIndex === 13 mainTick: currentIndex === 0 || currentIndex === 3 || currentIndex === 13
Component.onCompleted: { Component.onCompleted: {
row.positions[currentIndex] = delegateItem1 row.positions[currentIndex] = delegateItem1
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -31,26 +31,17 @@ import QtQuick.Window 2.1
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
Rectangle { Window {
id: root id: root
color: "white" modality: Qt.ApplicationModal
visible: false flags: Qt.Window
z:11
property alias messageText: messageTitle.text property alias messageText: messageTitle.text
property alias heightProgressText : heightProgress.text property alias heightProgressText : heightProgress.text
width: 200 * scaleRatio width: 200
height: 100 * scaleRatio height: 100
opacity: 0.7 opacity: 0.7
function show() {
root.visible = true;
}
function close() {
root.visible = false;
}
ColumnLayout { ColumnLayout {
id: rootLayout id: rootLayout
@@ -58,8 +49,8 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 30 * scaleRatio anchors.leftMargin: 30
anchors.rightMargin: 30 * scaleRatio anchors.rightMargin: 30
BusyIndicator { BusyIndicator {
running: parent.visible running: parent.visible
@@ -70,7 +61,7 @@ Rectangle {
id: messageTitle id: messageTitle
text: "Please wait..." text: "Please wait..."
font { font {
pixelSize: 22 * scaleRatio pixelSize: 22
} }
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
@@ -81,7 +72,7 @@ Rectangle {
Text { Text {
id: heightProgress id: heightProgress
font { font {
pixelSize: 18 * scaleRatio pixelSize: 18
} }
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -29,94 +29,78 @@
import QtQuick 2.0 import QtQuick 2.0
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents Item {
Rectangle {
id: item id: item
property int fillLevel: 0 property int fillLevel: 0
property string syncType // Wallet or Daemon height: 22
property string syncText: qsTr("%1 blocks remaining: ").arg(syncType) anchors.margins:15
visible: false visible: false
color: "black" //clip: true
function updateProgress(currentBlock,targetBlock, blocksToSync){
if(targetBlock == 1) {
fillLevel = 0
progressText.text = qsTr("Establishing connection...");
progressBar.visible = true
return
}
function updateProgress(currentBlock,targetBlock, blocksToSync, statusTxt){
if(targetBlock > 0) { if(targetBlock > 0) {
var remaining = (currentBlock < targetBlock) ? targetBlock - currentBlock : 0 var remaining = targetBlock - currentBlock
var progressLevel = (blocksToSync > 0 && blocksToSync != remaining) ? (100*(blocksToSync - remaining)/blocksToSync).toFixed(0) : (100*(currentBlock / targetBlock)).toFixed(0) // wallet sync
if(blocksToSync > 0)
var progressLevel = (100*(blocksToSync - remaining)/blocksToSync).toFixed(0);
// Daemon sync
else
var progressLevel = (100*(currentBlock/targetBlock)).toFixed(0);
fillLevel = progressLevel fillLevel = progressLevel
if(typeof statusTxt != "undefined" && statusTxt != "") { progressText.text = qsTr("Blocks remaining: %1").arg(remaining.toFixed(0));
progressText.text = statusTxt; progressBar.visible = currentBlock < targetBlock
} else {
progressText.text = syncText + remaining.toFixed(0);
}
} }
} }
Item { Rectangle {
anchors.top: item.top id: bar
anchors.topMargin: 10 * scaleRatio anchors.left: parent.left
anchors.leftMargin: 15 * scaleRatio anchors.right: parent.right
anchors.rightMargin: 15 * scaleRatio anchors.top: parent.top
anchors.fill: parent height: 22
radius: 2
Text { color: "#FFFFFF"
id: progressText
anchors.top: parent.top
anchors.topMargin: 6
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 13 * scaleRatio
font.bold: true
color: "white"
text: qsTr("Synchronizing %1").arg(syncType)
height: 18 * scaleRatio
}
Text {
id: progressTextValue
anchors.top: parent.top
anchors.topMargin: 6
anchors.right: parent.right
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 13 * scaleRatio
font.bold: true
color: "white"
height:18 * scaleRatio
}
Rectangle { Rectangle {
id: bar id: fillRect
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.margins: 2
anchors.top: progressText.bottom height: bar.height
anchors.topMargin: 4 property int maxWidth: parent.width - 4
height: 8 * scaleRatio width: (maxWidth * fillLevel) / 100
radius: 8 * scaleRatio color: {
color: "#333333" // progressbar bg if(item.fillLevel < 99 ) return "#FF6C3C"
//if(item.fillLevel < 99) return "#FFE00A"
Rectangle { return "#36B25C"
id: fillRect
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
height: bar.height
property int maxWidth: bar.width - 4 * scaleRatio
width: (maxWidth * fillLevel) / 100
radius: 8
// could change color based on progressbar status; if(item.fillLevel < 99 )
color: "#FA6800"
} }
Rectangle {
color:"#333"
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 8 * scaleRatio
}
} }
Rectangle {
color:"#333"
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 8
Text {
id:progressText
anchors.bottom: parent.bottom
font.family: "Arial"
font.pixelSize: 12
color: "#000"
text: qsTr("Synchronizing blocks")
height:18
}
}
} }
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2017, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -44,7 +44,7 @@ Rectangle {
color: "black" color: "black"
state: "Stopped" state: "Stopped"
signal qrcode_decoded(string address, string payment_id, string amount, string tx_description, string recipient_name, var extra_parameters) signal qrcode_decoded(string address, string payment_id, string amount, string tx_description, string recipient_name)
states: [ states: [
State { State {
@@ -83,7 +83,7 @@ Rectangle {
id : finder id : finder
objectName: "QrFinder" objectName: "QrFinder"
onDecoded : { onDecoded : {
root.qrcode_decoded(address, payment_id, amount, tx_description, recipient_name, extra_parameters) root.qrcode_decoded(address, payment_id, amount, tx_description, recipient_name)
root.state = "Stopped" root.state = "Stopped"
} }
onNotifyError : { onNotifyError : {
@@ -126,7 +126,7 @@ Rectangle {
MessageDialog { MessageDialog {
id: messageDialog id: messageDialog
title: qsTr("QrCode Scanned") + translationManager.emptyString title: "Scanning QrCode"
onAccepted: { onAccepted: {
root.state = "Stopped" root.state = "Stopped"
} }

View File

@@ -1,95 +0,0 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick 2.2
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
GridLayout {
columns: (isMobile) ? 1 : 2
columnSpacing: 32
id: root
property alias daemonAddrText: daemonAddr.text
property alias daemonPortText: daemonPort.text
property alias daemonAddrLabelText: daemonAddr.labelText
property alias daemonPortLabelText: daemonPort.labelText
// TODO: LEGACY; remove these placeHolder variables when
// the wizards get redesigned to the black-theme
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 18 * scaleRatio
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.25
property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15)
property string lineEditBackgroundColor: "white"
property string lineEditFontColor: "black"
property bool lineEditFontBold: true
signal editingFinished()
function getAddress() {
return daemonAddr.text.trim() + ":" + daemonPort.text.trim()
}
LineEdit {
id: daemonAddr
Layout.fillWidth: true
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
placeholderFontFamily: root.placeholderFontFamily
placeholderFontBold: root.placeholderFontBold
placeholderFontSize: root.placeholderFontSize
placeholderColor: root.placeholderColor
placeholderOpacity: root.placeholderOpacity
onEditingFinished: root.editingFinished()
borderColor: lineEditBorderColor
backgroundColor: lineEditBackgroundColor
fontColor: lineEditFontColor
fontBold: lineEditFontBold
}
LineEdit {
id: daemonPort
Layout.fillWidth: true
placeholderText: qsTr("Port") + translationManager.emptyString
placeholderFontFamily: root.placeholderFontFamily
placeholderFontBold: root.placeholderFontBold
placeholderFontSize: root.placeholderFontSize
placeholderColor: root.placeholderColor
placeholderOpacity: root.placeholderOpacity
onEditingFinished: root.editingFinished()
borderColor: lineEditBorderColor
backgroundColor: lineEditBackgroundColor
fontColor: lineEditFontColor
fontBold: lineEditFontBold
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -51,7 +51,7 @@ Item {
Rectangle { Rectangle {
id: scroll id: scroll
width: 4 width: 15
height: { height: {
var t = (flickable.height * flickable.height) / flickable.contentHeight var t = (flickable.height * flickable.height) / flickable.contentHeight
return t < 20 ? 20 : t return t < 20 ? 20 : t
@@ -62,7 +62,7 @@ Item {
visible: flickable.contentHeight > flickable.height visible: flickable.contentHeight > flickable.height
Behavior on opacity { Behavior on opacity {
NumberAnimation { duration: 200; easing.type: Easing.InQuad } NumberAnimation { duration: 100; easing.type: Easing.InQuad }
} }
MouseArea { MouseArea {

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -28,8 +28,6 @@
import QtQuick 2.0 import QtQuick 2.0
import "../components" as MoneroComponents
Item { Item {
id: item id: item
signal searchClicked(string text, int option) signal searchClicked(string text, int option)
@@ -215,13 +213,18 @@ Item {
} }
} }
MoneroComponents.StandardButton { StandardButton {
id: button id: button
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
anchors.margins: 6 anchors.margins: 6
width: 80 width: 80
shadowReleasedColor: "#C60F00"
shadowPressedColor: "#8C0B00"
pressedColor: "#C60F00"
releasedColor: "#FF4F41"
text: qsTr("SEARCH") text: qsTr("SEARCH")
onClicked: item.searchClicked(input.text, droplist.currentOption) onClicked: item.searchClicked(input.text, droplist.currentOption)
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -29,57 +29,50 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Item { Item {
id: button id: button
property string rightIcon: "" height: 37
property string shadowPressedColor
property string shadowReleasedColor
property string pressedColor
property string releasedColor
property string icon: "" property string icon: ""
property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled property string textColor: "#FFFFFF"
property bool small: false property int fontSize: 12
property alias text: label.text property alias text: label.text
property int fontSize: {
if(small) return 14 * scaleRatio;
else return 16 * scaleRatio;
}
signal clicked() signal clicked()
// Dynamic height/width // Dynamic label width
Layout.minimumWidth: (label.contentWidth > 50)? label.contentWidth + 22 : 60 Layout.minimumWidth: (label.contentWidth > 80)? label.contentWidth + 20 : 100
height: small ? 30 * scaleRatio : 36 * scaleRatio
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: buttonArea.pressed ? 0 : 1
//radius: 4
color: {
parent.enabled ? (buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor)
: Qt.lighter(parent.shadowReleasedColor)
}
border.color: Qt.darker(parent.releasedColor)
border.width: parent.focus ? 1 : 0
function doClick() {
// Android workaround
releaseFocus();
clicked();
} }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: parent.height - 1 height: parent.height - 1
radius: 3 y: buttonArea.pressed ? 1 : 0
color: parent.enabled ? MoneroComponents.Style.buttonBackgroundColor : MoneroComponents.Style.buttonBackgroundColorDisabled color: {
border.width: parent.focus ? 1 : 0 parent.enabled ? (buttonArea.pressed ? parent.pressedColor : parent.releasedColor)
: Qt.lighter(parent.releasedColor)
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
propagateComposedEvents: true
// possibly do some hover effects here
onEntered: {
// if(button.enabled) parent.color = Style.buttonBackgroundColorHover;
// else parent.color = Style.buttonBackgroundColorDisabledHover;
}
onExited: {
// if(button.enabled) parent.color = Style.buttonBackgroundColor;
// else parent.color = Style.buttonBackgroundColorDisabled;
}
} }
//radius: 4
} }
Text { Text {
@@ -88,11 +81,12 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font.family: MoneroComponents.Style.fontBold.name font.family: "Arial"
font.bold: true font.bold: true
font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize font.pixelSize: button.fontSize
color: parent.textColor color: parent.textColor
visible: parent.icon === "" visible: parent.icon === ""
// font.capitalization : Font.Capitalize
} }
Image { Image {
@@ -104,10 +98,9 @@ Item {
MouseArea { MouseArea {
id: buttonArea id: buttonArea
anchors.fill: parent anchors.fill: parent
onClicked: doClick() onClicked: parent.clicked()
cursorShape: Qt.PointingHandCursor
} }
Keys.onSpacePressed: doClick() Keys.onSpacePressed: clicked()
Keys.onReturnPressed: doClick() Keys.onReturnPressed: clicked()
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -27,7 +27,7 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.0 import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
@@ -35,10 +35,10 @@ import QtQuick.Window 2.0
import "../components" as MoneroComponents import "../components" as MoneroComponents
Rectangle { Window {
id: root id: root
color: "transparent" modality: Qt.ApplicationModal
visible: false flags: Qt.Window | Qt.FramelessWindowHint
property alias title: dialogTitle.text property alias title: dialogTitle.text
property alias text: dialogContent.text property alias text: dialogContent.text
property alias content: root.text property alias content: root.text
@@ -53,15 +53,6 @@ Rectangle {
// same signals as Dialog has // same signals as Dialog has
signal accepted() signal accepted()
signal rejected() signal rejected()
signal closeCallback();
Image {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
source: "../images/middlePanelBg.jpg"
}
// Make window draggable // Make window draggable
MouseArea { MouseArea {
@@ -73,42 +64,29 @@ Rectangle {
} }
function open() { function open() {
// Center
if(!isMobile) {
root.x = parent.width/2 - root.width/2
root.y = 100
}
show() show()
root.z = 11
root.visible = true;
}
function close() {
root.visible = false;
closeCallback();
} }
// TODO: implement without hardcoding sizes // TODO: implement without hardcoding sizes
width: isMobile ? screenWidth : 520 width: 480
height: isMobile ? screenHeight : 380 height: 280
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
spacing: 10 spacing: 10
anchors { fill: parent; margins: 15 } anchors { fill: parent; margins: 35 }
RowLayout { RowLayout {
id: column id: column
//anchors {fill: parent; margins: 16 } //anchors {fill: parent; margins: 16 }
Layout.topMargin: 14 * scaleRatio
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
MoneroComponents.Label { Label {
id: dialogTitle id: dialogTitle
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
fontSize: 18 * scaleRatio font.pixelSize: 32
fontFamily: "Arial" font.family: "Arial"
color: MoneroComponents.Style.defaultFontColor color: "#555555"
} }
} }
@@ -118,28 +96,10 @@ Rectangle {
id : dialogContent id : dialogContent
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
renderType: Text.QtRendering font.family: "Arial"
font.family: MoneroComponents.Style.fontLight.name
textFormat: TextEdit.AutoText textFormat: TextEdit.AutoText
readOnly: true readOnly: true
font.pixelSize: 14 * scaleRatio font.pixelSize: 12
selectByMouse: false
wrapMode: TextEdit.Wrap
color: MoneroComponents.Style.defaultFontColor
MouseArea {
anchors.fill: parent
onClicked: {
appWindow.showStatusMessage(qsTr("Double tap to copy"),3)
}
onDoubleClicked: {
parent.selectAll()
parent.copy()
parent.deselect()
console.log("copied to clipboard");
appWindow.showStatusMessage(qsTr("Content copied to clipboard"),3)
}
}
} }
} }
@@ -151,6 +111,12 @@ Rectangle {
MoneroComponents.StandardButton { MoneroComponents.StandardButton {
id: cancelButton id: cancelButton
width: 120
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Cancel") + translationManager.emptyString text: qsTr("Cancel") + translationManager.emptyString
onClicked: { onClicked: {
root.close() root.close()
@@ -160,7 +126,13 @@ Rectangle {
MoneroComponents.StandardButton { MoneroComponents.StandardButton {
id: okButton id: okButton
text: qsTr("OK") width: 120
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
text: qsTr("Ok")
KeyNavigation.tab: cancelButton KeyNavigation.tab: cancelButton
onClicked: { onClicked: {
root.close() root.close()
@@ -171,36 +143,7 @@ Rectangle {
} }
} }
// window borders
Rectangle{
width: 1
color: MoneroComponents.Style.grey
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
}
Rectangle{
width: 1
color: MoneroComponents.Style.grey
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
}
Rectangle{
height: 1
color: MoneroComponents.Style.grey
anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right
}
Rectangle{
height: 1
color: MoneroComponents.Style.grey
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.right: parent.right
}
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -28,8 +28,6 @@
import QtQuick 2.0 import QtQuick 2.0
import "../components" as MoneroComponents
Item { Item {
id: dropdown id: dropdown
property alias dataModel: repeater.model property alias dataModel: repeater.model
@@ -40,16 +38,7 @@ Item {
property string textColor: "#FFFFFF" property string textColor: "#FFFFFF"
property alias currentIndex: column.currentIndex property alias currentIndex: column.currentIndex
property bool expanded: false property bool expanded: false
property int dropdownHeight: 42 height: 37
property int fontHeaderSize: 16 * scaleRatio
property int fontItemSize: 14 * scaleRatio
property string colorHeaderBackground: "transparent"
property bool headerBorder: true
property bool headerFontBold: false
height: dropdownHeight
signal changed();
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
function hide() { dropdown.expanded = false } function hide() { dropdown.expanded = false }
@@ -65,35 +54,83 @@ Item {
return true return true
} }
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
function update() {
firstColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
}
Item { Item {
id: head id: head
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
height: dropdown.dropdownHeight height: 37
Rectangle { Rectangle {
color: dropdown.colorHeaderBackground anchors.left: parent.left
border.width: dropdown.headerBorder ? 1 : 0 anchors.right: parent.right
border.color: Qt.rgba(1, 1, 1, 0.25) height: parent.height - 1
radius: 4 y: dropdown.expanded || droplist.height > 0 ? 0 : 1
anchors.fill: parent color: dropdown.expanded || droplist.height > 0 ? dropdown.shadowPressedColor : dropdown.shadowReleasedColor
//radius: 4
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: dropdown.expanded || droplist.height > 0 ? 1 : 0
color: dropdown.expanded || droplist.height > 0 ? dropdown.pressedColor : dropdown.releasedColor
//radius: 4
}
Rectangle {
anchors.left: parent.left
anchors.bottom: parent.bottom
height: 3
width: 3
color: dropdown.pressedColor
visible: dropdown.expanded || droplist.height > 0
}
Rectangle {
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 3
width: 3
color: dropdown.pressedColor
visible: dropdown.expanded || droplist.height > 0
} }
Text { Text {
id: firstColText id: firstColText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 12 * scaleRatio anchors.leftMargin: 12
elide: Text.ElideRight elide: Text.ElideRight
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.bold: dropdown.headerFontBold font.bold: true
font.pixelSize: dropdown.fontHeaderSize font.pixelSize: 12
color: "#FFFFFF"
text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
}
Text {
id: secondColText
anchors.verticalCenter: parent.verticalCenter
anchors.right: separator.left
anchors.rightMargin: 12
width: dropdown.expanded ? w : (separator.x - 12) - (firstColText.x + firstColText.width + 5)
font.family: "Arial"
font.pixelSize: 12
color: "#FFFFFF"
text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : ""
property int w: 0
Component.onCompleted: w = implicitWidth
}
Rectangle {
id: separator
anchors.right: dropIndicator.left
anchors.verticalCenter: parent.verticalCenter
height: 18
width: 1
color: "#FFFFFF" color: "#FFFFFF"
} }
@@ -102,12 +139,12 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
width: 32 * scaleRatio width: 32
Image { Image {
anchors.centerIn: parent anchors.centerIn: parent
source: "../images/whiteDropIndicator.png" source: "../images/whiteDropIndicator.png"
rotation: dropdown.expanded ? 180 * scaleRatio : 0 rotation: dropdown.expanded ? 180 : 0
} }
} }
@@ -115,8 +152,6 @@ Item {
id: dropArea id: dropArea
anchors.fill: parent anchors.fill: parent
onClicked: dropdown.expanded = !dropdown.expanded onClicked: dropdown.expanded = !dropdown.expanded
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
} }
} }
@@ -133,14 +168,14 @@ Item {
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
width: 3 * scaleRatio; height: 3 * scaleRatio width: 3; height: 3
color: dropdown.pressedColor color: dropdown.pressedColor
} }
Rectangle { Rectangle {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
width: 3 * scaleRatio; height: 3 * scaleRatio width: 3; height: 3
color: dropdown.pressedColor color: dropdown.pressedColor
} }
@@ -170,24 +205,24 @@ Item {
property string stringSent: qsTr("Sent") + translationManager.emptyString property string stringSent: qsTr("Sent") + translationManager.emptyString
property string stringReceived: qsTr("Received") + translationManager.emptyString property string stringReceived: qsTr("Received") + translationManager.emptyString
delegate: Rectangle { delegate: Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: (dropdown.dropdownHeight * 0.75) * scaleRatio height: 30
//radius: index === repeater.count - 1 ? 4 : 0 //radius: index === repeater.count - 1 ? 4 : 0
color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
Text { Text {
id: col1Text
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
anchors.right: col2Text.left anchors.right: col2Text.left
anchors.leftMargin: 12 * scaleRatio anchors.leftMargin: 12
anchors.rightMargin: 0 anchors.rightMargin: column2.length > 0 ? 12 : 0
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.bold: true font.bold: true
font.pixelSize: fontItemSize font.pixelSize: 12
color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF" color: "#FFFFFF"
text: qsTr(column1) + translationManager.emptyString text: qsTr(column1) + translationManager.emptyString
} }
@@ -195,24 +230,24 @@ Item {
id: col2Text id: col2Text
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 45 * scaleRatio anchors.rightMargin: 45
font.family: MoneroComponents.Style.fontRegular.name font.family: "Arial"
font.pixelSize: 14 * scaleRatio font.pixelSize: 12
color: "#FFFFFF" color: "#FFFFFF"
text: "" text: column2
} }
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
width: 3 * scaleRatio; height: 3 * scaleRatio width: 3; height: 3
color: parent.color color: parent.color
} }
Rectangle { Rectangle {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
width: 3 * scaleRatio; height: 3 * scaleRatio width: 3; height: 3
color: parent.color color: parent.color
} }
@@ -220,13 +255,9 @@ Item {
id: itemArea id: itemArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
dropdown.expanded = false dropdown.expanded = false
column.currentIndex = index column.currentIndex = index
changed();
dropdown.update()
} }
} }
} }

View File

@@ -1,29 +0,0 @@
pragma Singleton
import QtQuick 2.5
QtObject {
property QtObject fontMedium: FontLoader { id: _fontMedium; source: "qrc:/fonts/SFUIDisplay-Medium.otf"; }
property QtObject fontBold: FontLoader { id: _fontBold; source: "qrc:/fonts/SFUIDisplay-Bold.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 string grey: "#404040"
property string defaultFontColor: "white"
property string greyFontColor: "#808080"
property string dimmedFontColor: "#BBBBBB"
property string inputBoxBackground: "black"
property string inputBoxBackgroundError: "#FFDDDD"
property string inputBoxColor: "white"
property string legacy_placeholderFontColor: "#BABABA"
property string buttonBackgroundColor: "#FA6800"
property string buttonBackgroundColorHover: "#E65E00"
property string buttonBackgroundColorDisabled: "#707070"
property string buttonBackgroundColorDisabledHover: "#808080"
property string buttonTextColor: "white"
property string buttonTextColorDisabled: "black"
property string dividerColor: "white"
property real dividerOpacity: 0.25
}

View File

@@ -1,160 +0,0 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import moneroComponents.Clipboard 1.0
import "../components" as MoneroComponents
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
highlightMoveDuration: 0
highlightFollowsCurrentItem: true
anchors.topMargin: 0
spacing: 0
delegate: Rectangle {
id: delegate
height: 80
color: 'transparent';
anchors.topMargin: 0
width: listView.width
clip: true
MoneroComponents.LineEditMulti {
id: addressLine
fontSize: 14
readOnly: true
width: parent.width
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 10
anchors.topMargin: 12
anchors.rightMargin: 54
anchors.bottomMargin: 0
text: address
showingHeader: false
showBorder: false
addressValidation: false
}
MoneroComponents.IconButton {
id: clipboardButton
imageSource: "../images/copyToClipboard.png"
onClicked: {
console.log(addressLine.text + " copied to clipboard");
clipboard.setText(addressLine.text);
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3);
}
anchors.right: parent.right
anchors.rightMargin: 0
anchors.verticalCenter: parent.verticalCenter
}
Text {
id: indexText
anchors.top: addressLine.bottom
anchors.left: parent.left
anchors.leftMargin: 20
font.family: "Arial"
font.bold: true
font.pixelSize: 12
color: "#444444"
text: "#" + index
}
Text {
id: labelText
anchors.top: addressLine.bottom
anchors.left: indexText.right
anchors.right: parent.right
anchors.leftMargin: 10
font.family: "Arial"
font.bold: true
font.pixelSize: 12
color: MoneroComponents.Style.greyFontColor
text: label
}
MouseArea {
z: 5
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: clipboardButton.width
cursorShape: Qt.PointingHandCursor
onClicked: {
listView.currentIndex = index;
}
}
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: MoneroComponents.Style.grey
z: 6
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: MoneroComponents.Style.grey
z: 6
}
Rectangle {
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
color: MoneroComponents.Style.grey
height: 1
z: 6
}
Rectangle {
width: 3
color: 'white'
visible: listView.currentIndex == index
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -36,40 +36,26 @@ Rectangle {
property int offset: 0 property int offset: 0
height: 31 height: 31
color: "transparent" color: "#FFFFFF"
Rectangle{
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#808080"
}
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#808080"
}
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: 1 height: 1
color: "#808080" color: "#DBDBDB"
} }
Row { Row {
id: row id: row
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: header.offset !== 0 ? undefined: parent.horizontalCenter
anchors.left: header.offset !== 0 ? parent.left : undefined
anchors.leftMargin: header.offset
Rectangle { Rectangle {
height: 31 height: 31
width: 1 width: 1
color: "#808080" color: "#DBDBDB"
} }
Repeater { Repeater {
@@ -84,7 +70,6 @@ Rectangle {
delegate: Rectangle { delegate: Rectangle {
id: delegate id: delegate
property bool desc: false property bool desc: false
color: "transparent"
height: 31 height: 31
width: columnWidth width: columnWidth
@@ -101,7 +86,7 @@ Rectangle {
color: { color: {
if(delegateArea.pressed) if(delegateArea.pressed)
return "#FF4304" return "#FF4304"
return index === header.activeSortColumn || delegateArea.containsMouse ? "white" : "#808080" return index === header.activeSortColumn || delegateArea.containsMouse ? "#FF6C3C" : "#4A4949"
} }
text: qsTr(columnName) + translationManager.emptyString text: qsTr(columnName) + translationManager.emptyString
} }
@@ -110,7 +95,6 @@ Rectangle {
id: delegateArea id: delegateArea
hoverEnabled: true hoverEnabled: true
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
delegate.desc = !delegate.desc delegate.desc = !delegate.desc
header.activeSortColumn = index header.activeSortColumn = index
@@ -186,7 +170,7 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: 1 height: 1
color: "transparent" color: index === header.activeSortColumn ? "#FFFFFF" : "#DBDBDB"
} }
Rectangle { Rectangle {
@@ -194,7 +178,7 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
width: 1 width: 1
color: "#808080" color: "#DBDBDB"
} }
} }
} }

View File

@@ -1,16 +1,7 @@
import QtQuick 2.0 import QtQuick 2.0
import "../components" as MoneroComponents
TextEdit { TextEdit {
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
wrapMode: Text.Wrap wrapMode: Text.Wrap
readOnly: true readOnly: true
selectByMouse: true selectByMouse: true
// Workaround for https://bugreports.qt.io/browse/QTBUG-50587
onFocusChanged: {
if(focus === false)
deselect()
}
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -28,8 +28,6 @@
import QtQuick 2.0 import QtQuick 2.0
import "../components" as MoneroComponents
Item { Item {
id: delegateItem id: delegateItem
width: 1 width: 1
@@ -51,10 +49,11 @@ Item {
anchors.bottomMargin: 2 anchors.bottomMargin: 2
font.family: "Arial" font.family: "Arial"
font.bold: true font.bold: true
font.pixelSize: 12 * scaleRatio font.pixelSize: 12
color: MoneroComponents.Style.defaultFontColor color: "#4A4949"
text: { text: {
if(currentIndex === 0) return qsTr("Default") + translationManager.emptyString if(currentIndex === 0) return qsTr("Normal") + translationManager.emptyString
if(currentIndex === 3) return qsTr("Medium") + translationManager.emptyString
if(currentIndex === 13) return qsTr("High") + translationManager.emptyString if(currentIndex === 13) return qsTr("High") + translationManager.emptyString
return "" return ""
} }
@@ -66,7 +65,7 @@ Item {
anchors.topMargin: 14 anchors.topMargin: 14
width: 1 width: 1
color: "#DBDBDB" color: "#DBDBDB"
height: 8 height: currentIndex === 8 ? 16 : 8
visible: !parent.mainTick visible: !parent.mainTick
} }
} }

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -28,84 +28,53 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Window 2.0 import QtQuick.Window 2.0
import QtQuick.Layouts 1.1
Rectangle { Rectangle {
id: titleBar id: titleBar
color: "#000000"
property int mouseX: 0 property int mouseX: 0
property bool containsMouse: false property bool containsMouse: false
property alias basicButtonVisible: goToBasicVersionButton.visible property alias basicButtonVisible: goToBasicVersionButton.visible
property bool customDecorations: true property bool customDecorations: true
signal goToBasicVersion(bool yes) signal goToBasicVersion(bool yes)
height: customDecorations && !isMobile ? 50 : 0 height: customDecorations ? 30 : 0
y: -height y: -height
property string title property string title
property alias maximizeButtonVisible: maximizeButton.visible property alias maximizeButtonVisible: maximizeButton.visible
z: 1 z: 1
Item { Text {
id: test
width: parent.width
height: 50
z: 1
// use jpg for gradiency
Image {
anchors.fill: parent
height: parent.height
width: parent.width
source: "../images/titlebarGradient.jpg"
}
}
Item{
id: titlebarlogo
width: 125
height: 50
anchors.centerIn: parent anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 15
color: "#FFFFFF"
text: titleBar.title
visible: customDecorations visible: customDecorations
z: 1
Image {
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 11
width: 125
height: 28
source: "../images/titlebarLogo.png"
}
} }
// collapse left panel
Rectangle { Rectangle {
id: goToBasicVersionButton id: goToBasicVersionButton
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
property bool checked: false property bool checked: false
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
color: "transparent" color: basicMouseArea.containsMouse || !leftPanel.visible ? "#FFE00A" : "#000000"
height: 50 * scaleRatio height: 30
width: height width: height
visible: isMobile visible: isMobile
z: 2
Image { Image {
width: 14
height: 14
anchors.centerIn: parent anchors.centerIn: parent
source: "../images/expand.png" rotation: !leftPanel.visible ? 180 : 0
source: parent.customDecorations || !leftPanel.visible ? "../images/goToBasicVersionHovered.png" :
"../images/gotoBasicVersion.png"
} }
MouseArea { MouseArea {
id: basicMouseArea id: basicMouseArea
hoverEnabled: true hoverEnabled: true
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: goToBasicVersionButton.color = "#262626";
onExited: goToBasicVersionButton.color = "transparent";
onClicked: { onClicked: {
releaseFocus()
parent.checked = !parent.checked parent.checked = !parent.checked
titleBar.goToBasicVersion(leftPanel.visible) titleBar.goToBasicVersion(leftPanel.visible)
} }
@@ -118,28 +87,22 @@ Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: parent.customDecorations visible: parent.customDecorations
z: 2
Rectangle { Rectangle {
id: whatIsAreaButton property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: 42 width: height
color: containsMouse ? "#6B0072" : "#00000000" color: containsMouse ? "#6B0072" : "#000000"
Image { Image {
anchors.centerIn: parent anchors.centerIn: parent
width: 9 source: "../images/helpIcon.png"
height: 16
source: "../images/question.png"
} }
MouseArea { MouseArea {
id: whatIsArea id: whatIsArea
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: whatIsAreaButton.color = "#262626";
onExited: whatIsAreaButton.color = "transparent";
onClicked: { onClicked: {
} }
@@ -147,24 +110,20 @@ Rectangle {
} }
Rectangle { Rectangle {
id: minimizeButton property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: 42 width: height
color: "transparent" color: containsMouse ? "#3665B3" : "#000000"
Image { Image {
anchors.centerIn: parent anchors.centerIn: parent
source: "../images/minimize.png" source: "../images/minimizeIcon.png"
} }
MouseArea { MouseArea {
id: minimizeArea id: minimizeArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: minimizeButton.color = "#262626";
onExited: minimizeButton.color = "transparent";
onClicked: { onClicked: {
appWindow.visibility = Window.Minimized appWindow.visibility = Window.Minimized
} }
@@ -173,26 +132,22 @@ Rectangle {
Rectangle { Rectangle {
id: maximizeButton id: maximizeButton
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: 42 width: height
color: "transparent"; color: containsMouse ? "#FF6C3C" : "#000000"
Image { Image {
anchors.centerIn: parent anchors.centerIn: parent
height: 16
width: 16
source: appWindow.visibility === Window.FullScreen ? "../images/backToWindowIcon.png" : source: appWindow.visibility === Window.FullScreen ? "../images/backToWindowIcon.png" :
"../images/fullscreen.png" "../images/maximizeIcon.png"
} }
MouseArea { MouseArea {
id: maximizeArea id: maximizeArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: maximizeButton.color = "#262626";
onExited: maximizeButton.color = "transparent";
onClicked: { onClicked: {
appWindow.visibility = appWindow.visibility !== Window.FullScreen ? Window.FullScreen : appWindow.visibility = appWindow.visibility !== Window.FullScreen ? Window.FullScreen :
Window.Windowed Window.Windowed
@@ -201,26 +156,20 @@ Rectangle {
} }
Rectangle { Rectangle {
id: closeButton property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: 42 width: height
color: containsMouse ? "#E04343" : "#00000000" color: containsMouse ? "#E04343" : "#000000"
Image { Image {
anchors.centerIn: parent anchors.centerIn: parent
width: 16 source: "../images/closeIcon.png"
height: 16
source: "../images/close.png"
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: appWindow.close(); onClicked: appWindow.close();
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: closeButton.color = "#262626";
onExited: closeButton.color = "transparent";
} }
} }
} }

View File

@@ -1 +0,0 @@
singleton Style 1.0 Style.qml

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //
@@ -71,12 +71,6 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
m_tabPressed = false; m_tabPressed = false;
QString sks; QString sks;
#ifdef Q_OS_ANDROID
if(ke->key() == Qt::Key_Back) {
qDebug() << "Android back hit";
sks = "android_back";
}
#endif
if(ke->key() == Qt::Key_Control) { if(ke->key() == Qt::Key_Control) {
sks = "Ctrl"; sks = "Ctrl";
#ifdef Q_OS_MAC #ifdef Q_OS_MAC

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2014-2015, The Monero Project
// //
// All rights reserved. // All rights reserved.
// //

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -17,16 +17,13 @@ if [ ! -d $MONERO_DIR/src ]; then
fi fi
git submodule update --remote git submodule update --remote
git -C $MONERO_DIR fetch git -C $MONERO_DIR fetch
git -C $MONERO_DIR checkout v0.12.0.0 git -C $MONERO_DIR checkout release-v0.11.0.0
# get monero core tag # get monero core tag
get_tag get_tag
# create local monero branch # create local monero branch
git -C $MONERO_DIR checkout -B $VERSIONTAG git -C $MONERO_DIR checkout -B $VERSIONTAG
git -C $MONERO_DIR submodule init
git -C $MONERO_DIR submodule update
# Merge monero PR dependencies # Merge monero PR dependencies
# Workaround for git username requirements # Workaround for git username requirements
@@ -111,7 +108,6 @@ elif [ "$BUILD_TYPE" == "debug-android" ]; then
elif [ "$BUILD_TYPE" == "debug" ]; then elif [ "$BUILD_TYPE" == "debug" ]; then
echo "Building libwallet debug" echo "Building libwallet debug"
CMAKE_BUILD_TYPE=Debug CMAKE_BUILD_TYPE=Debug
STATIC=true
else else
echo "Valid build types are release, release-static, release-android, debug-android and debug" echo "Valid build types are release, release-static, release-android, debug-android and debug"
exit 1; exit 1;
@@ -119,14 +115,14 @@ fi
echo "cleaning up existing monero build dir, libs and includes" echo "cleaning up existing monero build dir, libs and includes"
rm -fr $MONERO_DIR/build #rm -fr $MONERO_DIR/build
rm -fr $MONERO_DIR/lib rm -fr $MONERO_DIR/lib
rm -fr $MONERO_DIR/include rm -fr $MONERO_DIR/include
rm -fr $MONERO_DIR/bin rm -fr $MONERO_DIR/bin
mkdir -p $MONERO_DIR/build/$BUILD_TYPE mkdir -p $MONERO_DIR/build/release
pushd $MONERO_DIR/build/$BUILD_TYPE pushd $MONERO_DIR/build/release
# reusing function from "utils.sh" # reusing function from "utils.sh"
platform=$(get_platform) platform=$(get_platform)
@@ -212,7 +208,7 @@ if test -z "$CPU_CORE_COUNT"; then
fi fi
# Build libwallet_merged # Build libwallet_merged
pushd $MONERO_DIR/build/$BUILD_TYPE/src/wallet pushd $MONERO_DIR/build/release/src/wallet
eval $make_exec version -C ../.. eval $make_exec version -C ../..
eval $make_exec -j$CPU_CORE_COUNT eval $make_exec -j$CPU_CORE_COUNT
eval $make_exec install -j$CPU_CORE_COUNT eval $make_exec install -j$CPU_CORE_COUNT
@@ -221,24 +217,21 @@ popd
# Build monerod # Build monerod
# win32 need to build daemon manually with msys2 toolchain # win32 need to build daemon manually with msys2 toolchain
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
pushd $MONERO_DIR/build/$BUILD_TYPE/src/daemon pushd $MONERO_DIR/build/release/src/daemon
eval make -j$CPU_CORE_COUNT eval make -j$CPU_CORE_COUNT
eval make install -j$CPU_CORE_COUNT eval make install -j$CPU_CORE_COUNT
popd popd
fi fi
# build install epee # build install epee
eval make -C $MONERO_DIR/build/$BUILD_TYPE/contrib/epee all install eval make -C $MONERO_DIR/build/release/contrib/epee all install
# install easylogging # install easylogging
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/easylogging++ all install eval make -C $MONERO_DIR/build/release/external/easylogging++ all install
# install lmdb # Install libunwind
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/db_drivers/liblmdb all install
# Install libunbound
echo "Installing libunbound..." echo "Installing libunbound..."
pushd $MONERO_DIR/build/$BUILD_TYPE/external/unbound pushd $MONERO_DIR/build/release/external/unbound
# no need to make, it was already built as dependency for libwallet # no need to make, it was already built as dependency for libwallet
# make -j$CPU_CORE_COUNT # make -j$CPU_CORE_COUNT
$make_exec install -j$CPU_CORE_COUNT $make_exec install -j$CPU_CORE_COUNT

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

@@ -1,4 +1,4 @@
Copyright (c) 2014-2018, The Monero Project Copyright (c) 2014-2017, The Monero Project
All rights reserved. All rights reserved.

View File

@@ -1,14 +1,10 @@
; Monero Lithium Luna GUI Wallet Installer for Windows ; Monero GUI Wallet Beta 2 Installer for Windows
; Copyright (c) 2014-2018, The Monero Project ; Copyright (c) 2014-2017, The Monero Project
; See LICENSE ; See LICENSE
[Setup] [Setup]
AppName=Monero GUI Wallet AppName=Monero GUI Wallet
; For InnoSetup this is the property that uniquely identifies the application as such AppVersion=0.10.3.1
; Thus it's important to keep this stable over releases
; With a different "AppName" InnoSetup would treat a mere update as a completely new application and thus mess up
AppVersion=0.12.0.0
DefaultDirName={pf}\Monero GUI Wallet DefaultDirName={pf}\Monero GUI Wallet
DefaultGroupName=Monero GUI Wallet DefaultGroupName=Monero GUI Wallet
UninstallDisplayIcon={app}\monero-wallet-gui.exe UninstallDisplayIcon={app}\monero-wallet-gui.exe
@@ -33,190 +29,170 @@ Name: "en"; MessagesFile: "compiler:Default.isl"
[Files] [Files]
; The use of the flag "ignoreversion" for the following entries leads to the following behaviour: Source: "ReadMe.htm"; DestDir: "{app}"; Flags: comparetimestamp
; When updating / upgrading an existing installation ALL existing files are replaced with the files in this
; installer, regardless of file dates, version info within the files, or type of file (textual file or
; .exe/.dll file possibly with version info).
;
; This is far more robust than relying on version info or on file dates (flag "comparetimestamp").
; As of version 0.12.0.0, the Monero .exe files do not carry version info anyway in their .exe headers.
; The only small drawback seems to be somewhat longer update times because each and every file is
; copied again, even if already present with correct file date and identical content.
;
; Note that it would be very dangerous to use "ignoreversion" on files that may be shared with other
; applications somehow. Luckily this is no issue here because ALL files are "private" to Monero.
Source: "ReadMe.htm"; DestDir: "{app}"; Flags: ignoreversion
Source: "FinishImage.bmp"; Flags: dontcopy Source: "FinishImage.bmp"; Flags: dontcopy
; Monero GUI wallet ; Monero GUI wallet
Source: "bin\monero-wallet-gui.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\monero-wallet-gui.exe"; DestDir: "{app}"; Flags: comparetimestamp
; Monero GUI wallet log file ; Monero GUI wallet log file
; The GUI wallet does not have the "--log-file" command-line option of the CLI wallet and insists to put the .log beside the .exe ; Beta 2 does not have the "--log-file" command-line option of the CLI wallet and insists to put the .log beside the .exe
; so pre-create the file and give the necessary permissions to the wallet to write into it ; so pre-create the file and give the necessary permissions to the wallet to write into it
; Flag is "onlyifdoesntexist": We do not want to overwrite an already existing log Source: "monero-wallet-gui.log"; DestDir: "{app}"; Flags: comparetimestamp; Permissions: users-modify
Source: "monero-wallet-gui.log"; DestDir: "{app}"; Flags: onlyifdoesntexist; Permissions: users-modify
; Monero CLI wallet ; Monero CLI wallet
Source: "bin\monero-wallet-cli.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\monero-wallet-cli.exe"; DestDir: "{app}"; Flags: comparetimestamp
; Monero wallet RPC interface implementation ; Monero wallet RPC interface implementation
Source: "bin\monero-wallet-rpc.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\monero-wallet-rpc.exe"; DestDir: "{app}"; Flags: comparetimestamp
; Monero daemon ; Monero daemon
Source: "bin\monerod.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\monerod.exe"; DestDir: "{app}"; Flags: comparetimestamp
; Monero daemon wrapped in a batch file that stops before the text window closes, to see any error messages ; Monero daemon wrapped in a batch file that stops before the text window closes, to see any error messages
Source: "monero-daemon.bat"; DestDir: "{app}"; Flags: ignoreversion; Source: "monero-daemon.bat"; DestDir: "{app}"; Flags: comparetimestamp;
; Monero blockchain utilities ; Monero blockchain utilities
Source: "bin\monero-blockchain-export.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\monero-blockchain-export.exe"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\monero-blockchain-import.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\monero-blockchain-import.exe"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\monero-utils-deserialize.exe"; DestDir: "{app}"; Flags: comparetimestamp
; was present in 0.10.3.1, not present anymore in 0.11.1.0 and after
; Source: "bin\monero-utils-deserialize.exe"; DestDir: "{app}"; Flags: ignoreversion
; Various .qm files for translating the wallet UI "on the fly" into all supported languages ; Various .qm files for translating the wallet UI "on the fly" into all supported languages
Source: "bin\translations\*"; DestDir: "{app}\translations"; Flags: recursesubdirs ignoreversion Source: "bin\translations\*"; DestDir: "{app}\translations"; Flags: recursesubdirs comparetimestamp
; Core Qt runtime ; Core Qt runtime
; Use wildcards to deal with differences in those files between Qt version, like Source: "bin\Qt5Core.dll"; DestDir: "{app}"; Flags: comparetimestamp
; "Qt5MultimediaQuick_p.dll" versus "Qt5MultimediaQuick.dll" and "Qt5RemoteObjects.dll" as new file Source: "bin\Qt5Gui.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5*.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\Qt5Multimedia.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5MultimediaQuick_p.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5Network.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5Qml.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5Quick.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5Svg.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5Widgets.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\Qt5XmlPatterns.dll"; DestDir: "{app}"; Flags: comparetimestamp
; Qt QML elements like the local files selector "FolderListModel" and "Settings" ; Qt QML elements like the local files selector "FolderListModel" and "Settings"
Source: "bin\Qt\*"; DestDir: "{app}\Qt"; Flags: recursesubdirs ignoreversion Source: "bin\Qt\*"; DestDir: "{app}\Qt"; Flags: recursesubdirs comparetimestamp
; Qt audio support ; Qt audio support
Source: "bin\audio\*"; DestDir: "{app}\audio"; Flags: recursesubdirs ignoreversion Source: "bin\audio\*"; DestDir: "{app}\audio"; Flags: recursesubdirs comparetimestamp
; Qt bearer / network connection management ; Qt bearer / network connection management
Source: "bin\bearer\*"; DestDir: "{app}\bearer"; Flags: recursesubdirs ignoreversion Source: "bin\bearer\*"; DestDir: "{app}\bearer"; Flags: recursesubdirs comparetimestamp
; Qt Windows platform plugins ; Qt Windows platform plugin
Source: "bin\platforms\*"; DestDir: "{app}\platforms"; Flags: recursesubdirs ignoreversion Source: "bin\platforms\qwindows.dll"; DestDir: "{app}\platforms"; Flags: comparetimestamp
Source: "bin\platforminputcontexts\*"; DestDir: "{app}\platforminputcontexts"; Flags: recursesubdirs ignoreversion
Source: "bin\styles\*"; DestDir: "{app}\styles"; Flags: recursesubdirs ignoreversion
; Qt support for SVG icons ; Qt support for SVG icons
Source: "bin\iconengines\*"; DestDir: "{app}\iconengines"; Flags: recursesubdirs ignoreversion Source: "bin\iconengines\*"; DestDir: "{app}\iconengines"; Flags: recursesubdirs comparetimestamp
; Qt support for various image formats (JPEG, BMP, SVG etc) ; Qt support for various image formats (JPEG, BMP, SVG etc)
Source: "bin\imageformats\*"; DestDir: "{app}\imageformats"; Flags: recursesubdirs ignoreversion Source: "bin\imageformats\*"; DestDir: "{app}\imageformats"; Flags: recursesubdirs comparetimestamp
; Qt multimedia support ; Qt multimedia support
Source: "bin\QtMultimedia\*"; DestDir: "{app}\QtMultimedia"; Flags: recursesubdirs ignoreversion Source: "bin\QtMultimedia\*"; DestDir: "{app}\QtMultimedia"; Flags: recursesubdirs comparetimestamp
Source: "bin\mediaservice\*"; DestDir: "{app}\mediaservice"; Flags: recursesubdirs ignoreversion Source: "bin\mediaservice\*"; DestDir: "{app}\mediaservice"; Flags: recursesubdirs comparetimestamp
; Qt support for "m3u" playlists ; Qt support for "m3u" playlists
; candidate for elimination? Don't think the GUI wallet needs such playlists ; candidate for elimination? Don't think the GUI wallet needs such playlists
Source: "bin\playlistformats\*"; DestDir: "{app}\playlistformats"; Flags: recursesubdirs ignoreversion Source: "bin\playlistformats\*"; DestDir: "{app}\playlistformats"; Flags: recursesubdirs comparetimestamp
; Qt graphical effects as part of the core runtime, effects like blurring and blending ; Qt graphical effects as part of the core runtime, effects like blurring and blending
Source: "bin\QtGraphicalEffects\*"; DestDir: "{app}\QtGraphicalEffects"; Flags: recursesubdirs ignoreversion Source: "bin\QtGraphicalEffects\*"; DestDir: "{app}\QtGraphicalEffects"; Flags: recursesubdirs comparetimestamp
; No more Qt "private" directory in 0.12.0.0 ; Some more Qt graphical effects
; "private" as a name for this directory looks a little strange. Historical reasons?
Source: "bin\private\*"; DestDir: "{app}\private"; Flags: recursesubdirs comparetimestamp
; Qt QML files ; Qt QML files
Source: "bin\QtQml\*"; DestDir: "{app}\QtQml"; Flags: recursesubdirs ignoreversion Source: "bin\QtQml\*"; DestDir: "{app}\QtQml"; Flags: recursesubdirs comparetimestamp
; Qt Quick files ; Qt Quick files
Source: "bin\QtQuick\*"; DestDir: "{app}\QtQuick"; Flags: recursesubdirs ignoreversion Source: "bin\QtQuick\*"; DestDir: "{app}\QtQuick"; Flags: recursesubdirs comparetimestamp
Source: "bin\QtQuick.2\*"; DestDir: "{app}\QtQuick.2"; Flags: recursesubdirs ignoreversion Source: "bin\QtQuick.2\*"; DestDir: "{app}\QtQuick.2"; Flags: recursesubdirs comparetimestamp
; Qt Quick 2D Renderer fallback for systems / environments with "low-level graphics" i.e. without 3D support ; Qt Quick 2D Renderer fallback for systems / environments with "low-level graphics" i.e. without 3D support
Source: "bin\scenegraph\*"; DestDir: "{app}\scenegraph"; Flags: recursesubdirs ignoreversion Source: "bin\scenegraph\*"; DestDir: "{app}\scenegraph"; Flags: recursesubdirs comparetimestamp
Source: "bin\start-low-graphics-mode.bat"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\start-low-graphics-mode.bat"; DestDir: "{app}"; Flags: comparetimestamp
; Mesa, open-source OpenGL implementation; part of "low-level graphics" support ; Mesa, open-source OpenGL implementation; part of "low-level graphics" support
Source: "bin\opengl32sw.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\opengl32sw.dll"; DestDir: "{app}"; Flags: comparetimestamp
; Left out subdirectory "qmltooling" with the Qt QML debugger: Probably not relevant in an end-user package ; Left out subdirectory "qmltooling" with the Qt QML debugger: Probably not relevant in an end-user package
; Microsoft Direct3D runtime ; Microsoft Direct3D runtime
Source: "bin\D3Dcompiler_47.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\D3Dcompiler_47.dll"; DestDir: "{app}"; Flags: comparetimestamp
; bzip2 support ; bzip2 support
Source: "bin\libbz2-1.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libbz2-1.dll"; DestDir: "{app}"; Flags: comparetimestamp
; ANGLE ("Almost Native Graphics Layer Engine") support, as used by Qt ; ANGLE ("Almost Native Graphics Layer Engine") support, as used by Qt
Source: "bin\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libEGL.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\libGLESV2.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libGLESV2.dll"; DestDir: "{app}"; Flags: comparetimestamp
; FreeType font engine, as used by Qt ; FreeType font engine, as used by Qt
Source: "bin\libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libfreetype-6.dll"; DestDir: "{app}"; Flags: comparetimestamp
; GCC runtime, x64 version ; GCC runtime, x64 version
Source: "bin\libgcc_s_seh-1.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libgcc_s_seh-1.dll"; DestDir: "{app}"; Flags: comparetimestamp
; GLib, low level core library e.g. for GNOME and GTK+ ; GLib, low level core library e.g. for GNOME and GTK+
; Really needed under Windows? ; Really needed under Windows?
Source: "bin\libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libglib-2.0-0.dll"; DestDir: "{app}"; Flags: comparetimestamp
; Graphite font support ; Graphite font support
; Really needed? ; Really needed?
Source: "bin\libgraphite2.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libgraphite2.dll"; DestDir: "{app}"; Flags: comparetimestamp
; HarfBuzz OpenType text shaping engine ; HarfBuzz OpenType text shaping engine
; Really needed? ; Really needed?
Source: "bin\libharfbuzz-0.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libharfbuzz-0.dll"; DestDir: "{app}"; Flags: comparetimestamp
; LibIconv, conversions between character encodings ; LibIconv, conversions between character encodings
Source: "bin\libiconv-2.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libiconv-2.dll"; DestDir: "{app}"; Flags: comparetimestamp
; ICU, International Components for Unicode ; Part of cygwin? Needed by Qt somehow?
; After changes for supporting UTF-8 path and file names by using Boost Locale, all those 5 Source: "bin\libicudt57.dll"; DestDir: "{app}"; Flags: comparetimestamp
; ICU libraries are needed in 0.12.0.0 Source: "bin\libicuin57.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\libicudt58.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libicuuc57.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\libicuin58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\libicuio58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\libicutu58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\libicuuc58.dll"; DestDir: "{app}"; Flags: ignoreversion
; Library for native language support, part of GNU gettext ; Library for native language support, part of GNU gettext
Source: "bin\libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libintl-8.dll"; DestDir: "{app}"; Flags: comparetimestamp
; JasPer, support for JPEG-2000 ; JasPer, support for JPEG-2000
; was present in 0.10.3.1, not present anymore in 0.11.1.0 and after Source: "bin\libjasper-1.dll"; DestDir: "{app}"; Flags: comparetimestamp
; Source: "bin\libjasper-1.dll"; DestDir: "{app}"; Flags: ignoreversion
; libjpeg, C library for reading and writing JPEG image files ; libjpeg, C library for reading and writing JPEG image files
Source: "bin\libjpeg-8.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libjpeg-8.dll"; DestDir: "{app}"; Flags: comparetimestamp
; Little CMS, color management system ; Little CMS, color management system
Source: "bin\liblcms2-2.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\liblcms2-2.dll"; DestDir: "{app}"; Flags: comparetimestamp
; XZ Utils, LZMA compression library ; XZ Utils, LZMA compression library
Source: "bin\liblzma-5.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\liblzma-5.dll"; DestDir: "{app}"; Flags: comparetimestamp
; MNG / Portable Network Graphics ("animated PNG") ; MNG / Portable Network Graphics ("animated PNG")
Source: "bin\libmng-2.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libmng-2.dll"; DestDir: "{app}"; Flags: comparetimestamp
; PCRE, Perl Compatible Regular Expressions ; PCRE, Perl Compatible Regular Expressions
; "libpcre2-16-0.dll" is new for 0.12.0.0; unclear whether "libpcre16-0.dll" is still needed Source: "bin\libpcre-1.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\libpcre-1.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libpcre16-0.dll"; DestDir: "{app}"; Flags: comparetimestamp
Source: "bin\libpcre16-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\libpcre2-16-0.dll"; DestDir: "{app}"; Flags: ignoreversion
; libpng, the official PNG reference library ; libpng, the official PNG reference library
Source: "bin\libpng16-16.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libpng16-16.dll"; DestDir: "{app}"; Flags: comparetimestamp
; libstdc++, GNU Standard C++ Library ; libstdc++, GNU Standard C++ Library
Source: "bin\libstdc++-6.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libstdc++-6.dll"; DestDir: "{app}"; Flags: comparetimestamp
; LibTIFF, TIFF Library and Utilities ; LibTIFF, TIFF Library and Utilities
Source: "bin\libtiff-5.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libtiff-5.dll"; DestDir: "{app}"; Flags: comparetimestamp
; C++ threading support ; C++ threading support
Source: "bin\libwinpthread-1.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\libwinpthread-1.dll"; DestDir: "{app}"; Flags: comparetimestamp
; zlib compression library ; zlib compression library
Source: "bin\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "bin\zlib1.dll"; DestDir: "{app}"; Flags: comparetimestamp
; Stack protection
; New for 0.12.0.0
Source: "bin\libssp-0.dll"; DestDir: "{app}"; Flags: ignoreversion
[Tasks] [Tasks]
@@ -252,7 +228,7 @@ begin
// Additional wizard page for entering a special blockchain location // Additional wizard page for entering a special blockchain location
blockChainDefaultDir := ExpandConstant('{commonappdata}\bitmonero'); blockChainDefaultDir := ExpandConstant('{commonappdata}\bitmonero');
s := 'The default folder to store the Monero blockchain is ' + blockChainDefaultDir; s := 'The default folder to store the Monero blockchain is ' + blockChainDefaultDir;
s := s + '. As this will need more than 50 GB of free space, you may want to use a folder on a different drive.'; s := s + '. As this will need up to 20 GB of free space, you may want to use a folder on a different drive.';
s := s + ' If yes, specify that folder here.'; s := s + ' If yes, specify that folder here.';
BlockChainDirPage := CreateInputDirPage(wpSelectDir, BlockChainDirPage := CreateInputDirPage(wpSelectDir,
@@ -358,10 +334,7 @@ Name: "{group}\Uninstall GUI Wallet"; Filename: "{uninstallexe}"
; and insists on displaying ALL icons on one single level ; and insists on displaying ALL icons on one single level
Name: "{group}\Utilities\Monero Daemon"; Filename: "{app}\monerod.exe"; Parameters: {code:DaemonFlags} Name: "{group}\Utilities\Monero Daemon"; Filename: "{app}\monerod.exe"; Parameters: {code:DaemonFlags}
Name: "{group}\Utilities\Read Me"; Filename: "{app}\ReadMe.htm" Name: "{group}\Utilities\Read Me"; Filename: "{app}\ReadMe.htm"
Name: "{group}\Utilities\Textual (CLI) Wallet"; Filename: "{app}\monero-wallet-cli.exe"
; CLI wallet: Needs a working directory ("Start in:") set in the icon, because with no such directory set
; it tries to create new wallets without a path given in the probably non-writable program folder and will abort with an error
Name: "{group}\Utilities\Textual (CLI) Wallet"; Filename: "{app}\monero-wallet-cli.exe"; WorkingDir: "{userdocs}\Monero\wallets"
; Icons for troubleshooting problems / testing / debugging ; Icons for troubleshooting problems / testing / debugging
; To show that they are in some way different (not for everyday use), make them visually different ; To show that they are in some way different (not for everyday use), make them visually different

View File

@@ -1,28 +1,26 @@
# Monero GUI Wallet Windows Installer # # Monero GUI Wallet Beta 2 Windows Installer #
Copyright (c) 2014-2018, The Monero Project Copyright (c) 2014-2017, The Monero Project
## Introduction ## ## Introduction ##
This is a *Inno Setup* script `Monero.iss` plus some related files This is a *Inno Setup* script `Monero.iss` plus some related files that
that allows you to build a standalone Windows installer (.exe) for allows you to build a standalone Windows installer (.exe) for the
the GUI wallet that comes with the Lithium Luna release of Monero. Monero GUI Wallet Beta 2.
This turns the GUI wallet into a more or less standard Windows program, This turns the GUI Wallet into a more or less standard Windows program,
by default installed into a subdirectory of `C:\Program Files`, a by default installed into a subdirectory of `C:\Program Files`, a
program group with some icons in the *Start* menu, and automatic program group with some icons in the *Start* menu, and automatic
uninstall support. It helps lowering the "barrier to entry" uninstall support. It helps lower the "barrier to entry" somewhat,
somewhat, especially for less technically experienced users of especially for less technically experienced users of Monero.
Monero.
As the setup script in file [Monero.iss](Monero.iss) has to list every As the setup script in file [Monero.iss](Monero.iss) has to list every
single file of the GUI wallet package to install by name, single file of the GUI Wallet package to install by name, this version
this version of the script only works with exactly the GUI wallet of the script only works with exactly the GUI Beta 2 that you find on
for Monero release *Lithium Luna* that you find on
[the official download page](https://getmonero.org/downloads/). [the official download page](https://getmonero.org/downloads/).
But of course it will be easy to modify the script for future But of course it will be easy to modify the script for future versions
versions of the GUI wallet. of the GUI Wallet.
## License ## ## License ##
@@ -30,15 +28,14 @@ See [LICENSE](LICENSE).
## Building ## ## Building ##
You can only build on Windows, and the result is always a You can only build on Windows, and the result is always a Windows .exe
Windows .exe file that can act as a standalone installer for the file that can act as a standalone installer for the GUI Wallet Beta 2.
Lithium Luna GUI wallet.
The build steps in detail: The build steps in detail:
1. Install *Inno Setup*. You can get it from [here](http://www.jrsoftware.org/isdl.php) 1. Install *Inno Setup*. You can get it from [here](http://www.jrsoftware.org/isdl.php)
2. Get the Inno Setup script plus related files by cloning the whole [monero-core GitHub repository](https://github.com/monero-project/monero-core); you will only need the files in the installer directory `installers\windows` however 2. Get the Inno Setup script plus related files by cloning the whole [monero-core](https://github.com/monero-project/monero-core) repository; you will only need the files in the installer directory `installers\windows` however
3. The setup script is written to take the GUI wallet files from a subdirectory named `bin`; so create `installers\windows\bin`, get the zip file of the GUI wallet from [here](https://getmonero.org/downloads/), unpack it somewhere, and copy all the files and subdirectories in the `monero-gui-0.12.0.0` directory to this `bin` subdirectory 3. The setup script is written to take the GUI Wallet files from a subdirectory named `bin`; so create `installers\windows\bin`, get the zip file of the GUI Wallet Beta 2 from [here](https://getmonero.org/downloads/), unpack it somewhere, and copy all the files and subdirectories in the `monero-gui-0.10.3.1-beta2` directory to this `bin` subdirectory
4. Start Inno Setup, load `Monero.iss` and compile it 4. Start Inno Setup, load `Monero.iss` and compile it.
5. The result i.e. the finished installer will be the file `mysetup.exe` in the `installers\windows\Output` subdirectory 5. The result i.e. the finished installer will be the file `mysetup.exe` in the `installers\windows\Output` subdirectory

View File

@@ -1,13 +1,13 @@
<html> <html>
<head> <head>
<title>Monero Lithium Luna GUI Wallet</title> <title>Monero GUI Wallet Beta 2</title>
</head> </head>
<body style="font-family: Arial, Helvetica, sans-serif"> <body style="font-family: Arial, Helvetica, sans-serif">
<h1>Monero Lithium Luna GUI Wallet</h1> <h1>Monero GUI Wallet Beta 2</h1>
<p>Copyright (c) 2014-2018, The Monero Project<br> <p>Copyright (c) 2014-2017, The Monero Project<br>
Date: March 18, 2018</p> Date: June 28, 2017</p>
<h2>Preface</h2> <h2>Preface</h2>
@@ -23,8 +23,8 @@
<h2>Content of the Package</h2> <h2>Content of the Package</h2>
<p>You just installed the <i>Monero GUI wallet</i> for Windows, release Lithium Luna, more exact version 0.12.0.0. <p>You just installed the Beta 2 of the <i>Monero GUI Wallet</i> for Windows, more exact version 0.10.3.1. The wallet
The wallet enables you to send and receive Moneroj in a secure and very private way. enables you to send and receive moneroj in a secure and very private way.
</p> </p>
<p>Also included is the <i>Monero daemon</i>, so you have everything now to run a so-called <i>full node</i> <p>Also included is the <i>Monero daemon</i>, so you have everything now to run a so-called <i>full node</i>
@@ -33,22 +33,7 @@
<p>For checking whether there are already newer versions of this package you can go to the <p>For checking whether there are already newer versions of this package you can go to the
<a href="https://getmonero.org/downloads/">Downloads</a> page on <a href="https://getmonero.org/home">getmonero.org</a>, <a href="https://getmonero.org/downloads/">Downloads</a> page on <a href="https://getmonero.org/home">getmonero.org</a>,
the official Monero site.</p> the official Monero site.</p>
<h2>Upgrading</h2>
<p>If you have already a release of the GUI wallet software on your computer that was installed with the help
of this installer (in an earlier version), upgrading is easy: Just run the new installer; there is no need to
uninstall the old Monero release first.</p>
<p>But if you run a release of the GUI wallet software that you downloaded as a .zip file and unzipped into a
folder, if you "installed it manually" so to say, don't try to upgrade by pointing the installer to that folder,
because this might lead to problems e.g. if you try to uninstall everything later.</p>
<p>It's better to let the installer put the software into another folder and then delete the old folder, either
outright or after moving away any additional files that you may have stored there. (If you did not change
default locations for wallets and the blockchain, you don't have to worry about them, they won't be in that
particular folder, but elsewhere "in safety".)</p>
<h2>Access to the Blockchain</h2> <h2>Access to the Blockchain</h2>
@@ -61,9 +46,9 @@
provides the most security and privacy possible for you.</p> provides the most security and privacy possible for you.</p>
<p>However if your Internet access makes it difficult to run a full node, or if you have simply no room to store <p>However if your Internet access makes it difficult to run a full node, or if you have simply no room to store
the blockchain locally (around 50 GB in spring 2018, and of course growing), you can compromise and try to connect the blockchain locally (over 17 GB in summer 2017, and of course growing), you can compromise and try to connect
to a remote node. One way of finding such a node is checking to a remote node. One way of finding such a node is checking
<a href="https://moneroworld.com/#nodes">this page</a>. <a href="https://moneroworld.com/pages/nodes.html">this page</a>.
</p> </p>
<h2>Initial Blockchain Download</h2> <h2>Initial Blockchain Download</h2>
@@ -105,13 +90,21 @@
<h2>Troubleshooting</h2> <h2>Troubleshooting</h2>
<p>The Monero software and especially the GUI wallet are "work in progress", and sometimes things go wrong.</p> <p>The Monero software and especially the GUI wallet are "work in progress", as you can expect seeing the word
<i>Beta</i> in the name of the package, and sometimes things go wrong.</p>
<p>Please note that despite any technical problems that you may encounter your moneroj are almost always safe: You may <p>Please note that despite any technical problems that you may encounter your moneroj are almost always safe: You may
not be able to move them or you even may not see how many you currently have, but you most probably won't loose any. not be able to move them or you even may not see how many you currently have, but you most probably won't loose any.
But do remember that the seed needed to re-create the wallet <b>is</b> critical, however: <b>Never loose your But do remember that the seed needed to re-create the wallet <b>is</b> critical, however: <b>Never loose your
seed!</b></p> seed!</b></p>
<p>There is a <b>bug</b> in this beta of the GUI wallet that triggers if it is installed in a path that contains spaces /
blank characters, like the default location for Windows programs <i>C:\Program Files</i> unfortunately does.
Symptoms are problems in the communication between the wallet and the daemon, e.g. the wallet not "seeing" the
daemon and then not knowing whether it is "synchronized" with the network and thus ready to work or not. You can
avoid these problems by starting the daemon yourself, with the help of the <i>Monero Daemon</i> icon in the
<i>Utilities</i> sub-folder of the Monero program group.</p>
<p>In the <i>Utilities</i> sub-folder there are several more icons that may help you to solve problems. <p>In the <i>Utilities</i> sub-folder there are several more icons that may help you to solve problems.
These are the icons with a <i>x</i> in front and the name <i>(in parenthesis)</i> to make them visually stand These are the icons with a <i>x</i> in front and the name <i>(in parenthesis)</i> to make them visually stand
apart from the "normal" ones because you will probably only need them in case of trouble, but not during normal apart from the "normal" ones because you will probably only need them in case of trouble, but not during normal
@@ -149,15 +142,15 @@
<tr> <tr>
<td><i>x (Check GUI Wallet Log)</i></td> <td><i>x (Check GUI Wallet Log)</i></td>
<td>Open the log with status and error messages of the GUI wallet program in Notepad; <td>Open the log with status and error messages of the GUI wallet program in Notepad;
experienced people have a chance to diagnose technical problems with the wallet, experienced people have a chance to diagnose technical problems with the wallet by looking at the last few lines
usually by looking at the last few lines of this log</td> of this log</td>
</tr> </tr>
<tr> <tr>
<td><i>x (Check Daemon Log)</i></td> <td><i>x (Check Daemon Log)</i></td>
<td> <td>
Open the log with status and error messages of the daemon in Notepad; again, the last few Open the log with status and error messages of the daemon in Notepad; again, the last few
lines of this (possible very long) log are usually the most important for troubleshooting lines of this (possible very long) log are the most important for troubleshooting
</td> </td>
</tr> </tr>

Some files were not shown because too many files have changed in this diff Show More