forked from Public/monero-gui
Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f03ea0461c | ||
|
|
6ce9a3cba0 | ||
|
|
8cd32987d4 | ||
|
|
648b775a25 | ||
|
|
b24ccc2fe3 | ||
|
|
00783e7b68 | ||
|
|
dafc47050a | ||
|
|
0e65d89172 | ||
|
|
fd9e7d00ed | ||
|
|
3d7ded209a | ||
|
|
e81a589a8d | ||
|
|
074d8fb42e | ||
|
|
b632d078e5 | ||
|
|
1c2920a339 | ||
|
|
676b8d6921 | ||
|
|
9d5eb002ae | ||
|
|
63d4ba6df8 | ||
|
|
c2dbda63c6 | ||
|
|
6e7b4ff9f9 | ||
|
|
1269f0a13a | ||
|
|
04b91e76f2 | ||
|
|
c9c7bb9171 | ||
|
|
619661a61d | ||
|
|
457b1dee49 | ||
|
|
7cca39ad48 | ||
|
|
90406dfd1e | ||
|
|
6d7abaf5c0 | ||
|
|
bc40942889 | ||
|
|
646d3394d3 | ||
|
|
c06cb5cc58 | ||
|
|
983a3ba7ad | ||
|
|
265afe1610 | ||
|
|
32f7666912 | ||
|
|
20a58143b6 | ||
|
|
4cc3d3f3e2 | ||
|
|
2ab3d8ebf2 | ||
|
|
9e4bfb1ef2 | ||
|
|
7b0cd19487 | ||
|
|
c0fa4f5d27 | ||
|
|
d5f4d5d93f | ||
|
|
9ba1960207 | ||
|
|
04a665db0c | ||
|
|
f47335f89f | ||
|
|
f75aa22b26 | ||
|
|
50e1ce1460 | ||
|
|
df02532fd5 | ||
|
|
bd20626460 | ||
|
|
8738210991 | ||
|
|
6c2c17ada1 | ||
|
|
380f218b3a | ||
|
|
12647fac73 | ||
|
|
9f0f40af80 | ||
|
|
c316fab29f | ||
|
|
37de27d7f6 | ||
|
|
c61d857a67 | ||
|
|
56023facaa | ||
|
|
1dc45bad87 | ||
|
|
0daf2aacf5 | ||
|
|
06ccded94e | ||
|
|
ff38e965bd | ||
|
|
a9a59fd314 | ||
|
|
e2a187f892 | ||
|
|
4a526810ce |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -13,6 +13,8 @@ jobs:
|
||||
run: brew update && brew install boost hidapi zmq libpgm unbound libsodium miniupnpc ldns expat doxygen graphviz libunwind-headers protobuf qt5
|
||||
- name: build
|
||||
run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh
|
||||
- name: test qml
|
||||
run: build/release/bin/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui --test-qml
|
||||
|
||||
build-ubuntu:
|
||||
|
||||
@@ -25,6 +27,8 @@ jobs:
|
||||
- name: install monero dependencies
|
||||
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev
|
||||
- name: install monero gui dependencies
|
||||
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev
|
||||
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev xvfb
|
||||
- name: build
|
||||
run: ./build.sh
|
||||
- name: test qml
|
||||
run: xvfb-run -a build/release/bin/monero-wallet-gui --test-qml
|
||||
|
||||
@@ -40,8 +40,8 @@ import "components/effects/" as MoneroEffects
|
||||
Rectangle {
|
||||
id: panel
|
||||
|
||||
property int currentAccountIndex: 0
|
||||
property string currentAccountLabel: "Primary account"
|
||||
property int currentAccountIndex
|
||||
property alias currentAccountLabel: accountLabel.text
|
||||
property string balanceString: "?.??"
|
||||
property string balanceUnlockedString: "?.??"
|
||||
property string balanceFiatString: "?.??"
|
||||
@@ -184,7 +184,7 @@ Rectangle {
|
||||
MoneroComponents.Label {
|
||||
fontSize: 12
|
||||
id: accountIndex
|
||||
text: qsTr("Account") + " #" + currentAccountIndex
|
||||
text: qsTr("Account") + translationManager.emptyString + " #" + currentAccountIndex
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 60
|
||||
@@ -204,7 +204,6 @@ Rectangle {
|
||||
fontSize: 16
|
||||
id: accountLabel
|
||||
textWidth: 170
|
||||
text: currentAccountLabel
|
||||
color: MoneroComponents.Style.blackTheme ? "white" : "black"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 60
|
||||
|
||||
@@ -168,23 +168,6 @@ Rectangle {
|
||||
}
|
||||
]
|
||||
|
||||
// color stripe at the top
|
||||
Row {
|
||||
id: styledRow
|
||||
visible: currentView !== merchantView
|
||||
height: 4
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
z: parent.z + 1
|
||||
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FFE00A" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#6B0072" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FF6C3C" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FFD781" }
|
||||
Rectangle { height: 4; width: parent.width / 5; color: "#FF4F41" }
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: {
|
||||
@@ -195,6 +178,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 : 0
|
||||
anchors.bottomMargin: 0
|
||||
spacing: 0
|
||||
|
||||
Flickable {
|
||||
@@ -253,7 +237,7 @@ Rectangle {
|
||||
Rectangle {
|
||||
id: borderLeft
|
||||
visible: middlePanel.state !== "Merchant"
|
||||
anchors.top: styledRow.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
width: 1
|
||||
|
||||
@@ -38,6 +38,7 @@ Item {
|
||||
property alias text: label.text
|
||||
property string checkedIcon: "qrc:///images/check-white.svg"
|
||||
property string uncheckedIcon
|
||||
property bool fontAwesomeIcons: false
|
||||
property int imgWidth: 13
|
||||
property int imgHeight: 13
|
||||
property bool toggleOnClick: true
|
||||
@@ -89,9 +90,11 @@ Item {
|
||||
width: checkBox.imgWidth
|
||||
height: checkBox.imgHeight
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
fontAwesomeFallbackIcon: FontAwesome.plus
|
||||
fontAwesomeFallbackIcon: checkBox.fontAwesomeIcons ? getIcon() : FontAwesome.plus
|
||||
fontAwesomeFallbackSize: 14
|
||||
image: {
|
||||
image: checkBox.fontAwesomeIcons ? "" : getIcon()
|
||||
|
||||
function getIcon() {
|
||||
if (checkBox.checked || checkBox.uncheckedIcon == "")
|
||||
return checkBox.checkedIcon;
|
||||
return checkBox.uncheckedIcon;
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls 2.2 as QtQuickControls2
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
@@ -37,8 +38,7 @@ import "effects/" as MoneroEffects
|
||||
|
||||
Item {
|
||||
id: datePicker
|
||||
z: parent.z + 1
|
||||
property bool expanded: false
|
||||
readonly property alias expanded: popup.visible
|
||||
property date currentDate
|
||||
property bool showCurrentDate: true
|
||||
property color backgroundColor : MoneroComponents.Style.appWindowBorderColor
|
||||
@@ -52,19 +52,6 @@ Item {
|
||||
|
||||
onExpandedChanged: if(expanded) appWindow.currentItem = datePicker
|
||||
|
||||
function hide() { datePicker.expanded = false }
|
||||
function containsPoint(px, py) {
|
||||
if(px < 0)
|
||||
return false
|
||||
if(px > width)
|
||||
return false
|
||||
if(py < 0)
|
||||
return false
|
||||
if(py > height + calendarRect.height)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: inputLabelRect
|
||||
color: "transparent"
|
||||
@@ -253,7 +240,7 @@ Item {
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: datePicker.expanded = !datePicker.expanded
|
||||
onClicked: datePicker.expanded ? popup.close() : popup.open()
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
@@ -261,195 +248,204 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: calendarRect
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: head.bottom
|
||||
anchors.topMargin: 10
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
border.width: 1
|
||||
border.color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: datePicker.expanded ? calendar.height + 2 : 0
|
||||
clip: true
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
QtQuickControls2.Popup {
|
||||
id: popup
|
||||
padding: 0
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 1
|
||||
anchors.rightMargin: 1
|
||||
anchors.top: parent.top
|
||||
color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: 1
|
||||
}
|
||||
id: calendarRect
|
||||
width: head.width
|
||||
x: head.x
|
||||
y: head.y + head.height + 10
|
||||
|
||||
Calendar {
|
||||
id: calendar
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: 1
|
||||
anchors.bottomMargin: 10
|
||||
height: 220
|
||||
frameVisible: false
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
border.width: 1
|
||||
border.color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: datePicker.expanded ? calendar.height + 2 : 0
|
||||
clip: true
|
||||
|
||||
style: CalendarStyle {
|
||||
gridVisible: false
|
||||
background: Rectangle { color: MoneroComponents.Style.middlePanelBackgroundColor }
|
||||
dayDelegate: Item {
|
||||
z: parent.z + 1
|
||||
implicitHeight: implicitWidth
|
||||
implicitWidth: calendar.width / 7
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: dayRect
|
||||
anchors.fill: parent
|
||||
radius: parent.implicitHeight / 2
|
||||
color: {
|
||||
if(dayArea.pressed && styleData.visibleMonth)
|
||||
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
return "transparent";
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 1
|
||||
anchors.rightMargin: 1
|
||||
anchors.top: parent.top
|
||||
color: MoneroComponents.Style.appWindowBorderColor
|
||||
height: 1
|
||||
}
|
||||
|
||||
Calendar {
|
||||
id: calendar
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: 1
|
||||
anchors.bottomMargin: 10
|
||||
height: 220
|
||||
frameVisible: false
|
||||
|
||||
style: CalendarStyle {
|
||||
gridVisible: false
|
||||
background: Rectangle { color: MoneroComponents.Style.middlePanelBackgroundColor }
|
||||
dayDelegate: Item {
|
||||
z: parent.z + 1
|
||||
implicitHeight: implicitWidth
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
Rectangle {
|
||||
id: dayRect
|
||||
anchors.fill: parent
|
||||
radius: parent.implicitHeight / 2
|
||||
color: {
|
||||
if(dayArea.pressed && styleData.visibleMonth)
|
||||
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
return "transparent";
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: dayText
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: {
|
||||
if(!styleData.visibleMonth) return 12
|
||||
return 14
|
||||
}
|
||||
font.bold: {
|
||||
if(dayArea.pressed || styleData.visibleMonth) return true;
|
||||
return false;
|
||||
}
|
||||
text: styleData.date.getDate()
|
||||
themeTransition: false
|
||||
color: {
|
||||
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
|
||||
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
|
||||
if(styleData.today) return MoneroComponents.Style.orange
|
||||
return MoneroComponents.Style.defaultFontColor
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: dayArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
onExited: dayRect.color = "transparent"
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if(styleData.visibleMonth) {
|
||||
currentDate = styleData.date
|
||||
popup.close()
|
||||
} else {
|
||||
var date = styleData.date
|
||||
if(date.getMonth() > calendar.visibleMonth)
|
||||
calendar.showNextMonth()
|
||||
else calendar.showPreviousMonth()
|
||||
}
|
||||
|
||||
datePicker.dateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: dayText
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: {
|
||||
if(!styleData.visibleMonth) return 12
|
||||
return 14
|
||||
}
|
||||
font.bold: {
|
||||
if(dayArea.pressed || styleData.visibleMonth) return true;
|
||||
return false;
|
||||
}
|
||||
text: styleData.date.getDate()
|
||||
themeTransition: false
|
||||
color: {
|
||||
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
|
||||
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
|
||||
if(styleData.today) return MoneroComponents.Style.orange
|
||||
return MoneroComponents.Style.defaultFontColor
|
||||
dayOfWeekDelegate: Item {
|
||||
implicitHeight: 20
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
elide: Text.ElideRight
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.lightGreyFontColor
|
||||
themeTransition: false
|
||||
text: {
|
||||
var locale = Qt.locale()
|
||||
return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: dayArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
|
||||
onExited: dayRect.color = "transparent"
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
if(styleData.visibleMonth) {
|
||||
currentDate = styleData.date
|
||||
datePicker.expanded = false
|
||||
} else {
|
||||
var date = styleData.date
|
||||
if(date.getMonth() > calendar.visibleMonth)
|
||||
calendar.showNextMonth()
|
||||
else calendar.showPreviousMonth()
|
||||
navigationBar: Rectangle {
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
implicitWidth: calendar.width
|
||||
implicitHeight: 30
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
themeTransition: false
|
||||
text: styleData.title
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
Image {
|
||||
id: prevMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
}
|
||||
|
||||
datePicker.dateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
ColorOverlay {
|
||||
source: prevMonthIcon
|
||||
anchors.fill: prevMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
}
|
||||
|
||||
dayOfWeekDelegate: Item {
|
||||
implicitHeight: 20
|
||||
implicitWidth: calendar.width / 7
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
elide: Text.ElideRight
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.lightGreyFontColor
|
||||
themeTransition: false
|
||||
text: {
|
||||
var locale = Qt.locale()
|
||||
return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
navigationBar: Rectangle {
|
||||
color: MoneroComponents.Style.middlePanelBackgroundColor
|
||||
implicitWidth: calendar.width
|
||||
implicitHeight: 30
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
anchors.centerIn: parent
|
||||
font.family: MoneroComponents.Style.fontMonoRegular.name
|
||||
font.pixelSize: 14
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
themeTransition: false
|
||||
text: styleData.title
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
Image {
|
||||
id: prevMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showPreviousMonth()
|
||||
}
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
source: prevMonthIcon
|
||||
anchors.fill: prevMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
}
|
||||
Item {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showPreviousMonth()
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: nextMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: height
|
||||
ColorOverlay {
|
||||
source: nextMonthIcon
|
||||
anchors.fill: nextMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
rotation: 180
|
||||
}
|
||||
|
||||
Image {
|
||||
id: nextMonthIcon
|
||||
anchors.centerIn: parent
|
||||
source: "qrc:///images/prevMonth.png"
|
||||
visible: false
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
source: nextMonthIcon
|
||||
anchors.fill: nextMonthIcon
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
opacity: 0.5
|
||||
rotation: 180
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showNextMonth()
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: calendar.showNextMonth()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ TextField {
|
||||
}
|
||||
|
||||
MoneroComponents.ContextMenu {
|
||||
cursorShape: Qt.IBeamCursor
|
||||
onPaste: {
|
||||
textField.clear();
|
||||
textField.paste();
|
||||
|
||||
@@ -70,6 +70,7 @@ TextArea {
|
||||
}
|
||||
|
||||
MoneroComponents.ContextMenu {
|
||||
cursorShape: Qt.IBeamCursor
|
||||
onPaste: {
|
||||
textArea.clear();
|
||||
textArea.paste();
|
||||
|
||||
@@ -69,5 +69,10 @@ Item {
|
||||
color: fontColor
|
||||
onLinkActivated: item.linkActivated()
|
||||
textFormat: parent.textFormat
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,6 +203,7 @@ Item {
|
||||
return passwordInput2
|
||||
}
|
||||
}
|
||||
implicitHeight: 50
|
||||
bottomPadding: 10
|
||||
leftPadding: 10
|
||||
topPadding: 10
|
||||
@@ -307,6 +308,7 @@ Item {
|
||||
font.pixelSize: 24
|
||||
echoMode: TextInput.Password
|
||||
KeyNavigation.tab: okButton
|
||||
implicitHeight: 50
|
||||
bottomPadding: 10
|
||||
leftPadding: 10
|
||||
topPadding: 10
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
@@ -42,7 +43,7 @@ Item {
|
||||
property string releasedColor: MoneroComponents.Style.titleBarButtonHoverColor
|
||||
property string textColor: MoneroComponents.Style.defaultFontColor
|
||||
property alias currentIndex: columnid.currentIndex
|
||||
property bool expanded: false
|
||||
readonly property alias expanded: popup.visible
|
||||
property int dropdownHeight: 42
|
||||
property int fontHeaderSize: 16
|
||||
property int fontItemSize: 14
|
||||
@@ -56,18 +57,6 @@ Item {
|
||||
signal changed();
|
||||
|
||||
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
||||
function hide() { dropdown.expanded = false }
|
||||
function containsPoint(px, py) {
|
||||
if(px < 0)
|
||||
return false
|
||||
if(px > width)
|
||||
return false
|
||||
if(py < 0)
|
||||
return false
|
||||
if(py > height + droplist.height)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
|
||||
function update() {
|
||||
@@ -128,118 +117,118 @@ Item {
|
||||
MouseArea {
|
||||
id: dropArea
|
||||
anchors.fill: parent
|
||||
onClicked: dropdown.expanded = !dropdown.expanded
|
||||
onClicked: dropdown.expanded ? popup.close() : popup.open()
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: droplist
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: head.bottom
|
||||
clip: true
|
||||
height: dropdown.expanded ? columnid.height : 0
|
||||
color: dropdown.pressedColor
|
||||
Popup {
|
||||
id: popup
|
||||
padding: 0
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
id: droplist
|
||||
x: dropdown.x
|
||||
width: dropdown.width
|
||||
y: head.y + head.height
|
||||
clip: true
|
||||
height: dropdown.expanded ? columnid.height : 0
|
||||
color: dropdown.pressedColor
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: dropdown.pressedColor
|
||||
}
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: dropdown.pressedColor
|
||||
}
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: dropdown.pressedColor
|
||||
}
|
||||
|
||||
Column {
|
||||
id: columnid
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
property int currentIndex: 0
|
||||
Behavior on height {
|
||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
Column {
|
||||
id: columnid
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
property int currentIndex: 0
|
||||
|
||||
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
|
||||
property string stringLow: qsTr("Low (x1 fee)") + translationManager.emptyString
|
||||
property string stringMedium: qsTr("Medium (x20 fee)") + translationManager.emptyString
|
||||
property string stringHigh: qsTr("High (x166 fee)") + translationManager.emptyString
|
||||
property string stringSlow: qsTr("Slow (x0.25 fee)") + translationManager.emptyString
|
||||
property string stringDefault: qsTr("Default (x1 fee)") + translationManager.emptyString
|
||||
property string stringFast: qsTr("Fast (x5 fee)") + translationManager.emptyString
|
||||
property string stringFastest: qsTr("Fastest (x41.5 fee)") + translationManager.emptyString
|
||||
property string stringAll: qsTr("All") + translationManager.emptyString
|
||||
property string stringSent: qsTr("Sent") + translationManager.emptyString
|
||||
property string stringReceived: qsTr("Received") + translationManager.emptyString
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
delegate: Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: (dropdown.dropdownHeight * 0.75)
|
||||
//radius: index === repeater.count - 1 ? 4 : 0
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
||||
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
|
||||
property string stringAutomatic: qsTr("Automatic") + translationManager.emptyString
|
||||
property string stringSlow: qsTr("Slow (x0.2 fee)") + translationManager.emptyString
|
||||
property string stringNormal: qsTr("Normal (x1 fee)") + translationManager.emptyString
|
||||
property string stringFast: qsTr("Fast (x5 fee)") + translationManager.emptyString
|
||||
property string stringFastest: qsTr("Fastest (x200 fee)") + translationManager.emptyString
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: col1Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
delegate: Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: col2Text.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 0
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.bold: true
|
||||
font.pixelSize: fontItemSize
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||
text: qsTr(column1) + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: col2Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 45
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: ""
|
||||
}
|
||||
height: (dropdown.dropdownHeight * 0.75)
|
||||
//radius: index === repeater.count - 1 ? 4 : 0
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
MoneroComponents.TextPlain {
|
||||
id: col1Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: col2Text.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 0
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.bold: true
|
||||
font.pixelSize: fontItemSize
|
||||
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
|
||||
text: qsTr(column1) + translationManager.emptyString
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
MoneroComponents.TextPlain {
|
||||
id: col2Text
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 45
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: ""
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: itemArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
dropdown.expanded = false
|
||||
columnid.currentIndex = index
|
||||
changed();
|
||||
dropdown.update()
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
width: 3; height: 3
|
||||
color: parent.color
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: itemArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
onClicked: {
|
||||
popup.close()
|
||||
columnid.currentIndex = index
|
||||
changed();
|
||||
dropdown.update()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,26 +37,26 @@ Rectangle {
|
||||
source: "qrc:///images/warning.png"
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
id: content
|
||||
Layout.fillWidth: true
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: root.fontSize
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: true
|
||||
textFormat: Text.RichText
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 4
|
||||
rightPadding: 18
|
||||
topPadding: 10
|
||||
bottomPadding: 10
|
||||
readOnly: true
|
||||
onLinkActivated: root.linkActivated();
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ Item {
|
||||
id: root
|
||||
property string image: ""
|
||||
property string color: ""
|
||||
property bool fontAwesomeFallbackEnabled: true
|
||||
property var fontAwesomeFallbackIcon: ""
|
||||
property string fontAwesomeFallbackFont: FontAwesome.fontFamilySolid
|
||||
property string fontAwesomeFallbackStyle: "Solid"
|
||||
@@ -69,13 +68,13 @@ Item {
|
||||
anchors.fill: root
|
||||
source: svgMask
|
||||
color: root.color
|
||||
visible: isOpenGL
|
||||
visible: image && isOpenGL
|
||||
}
|
||||
|
||||
Text {
|
||||
id: fontAwesomeFallback
|
||||
visible: !isOpenGL && root.fontAwesomeFallback
|
||||
text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
|
||||
visible: !imgMockColor.visible
|
||||
text: root.fontAwesomeFallbackIcon
|
||||
font.family: root.fontAwesomeFallbackFont
|
||||
font.pixelSize: root.fontAwesomeFallbackSize
|
||||
font.styleName: root.fontAwesomeFallbackStyle
|
||||
|
||||
@@ -144,9 +144,9 @@ make_exec="make"
|
||||
if [ "$platform" == "darwin" ]; then
|
||||
echo "Configuring build for MacOS.."
|
||||
if [ "$STATIC" == true ]; then
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
|
||||
## LINUX 64
|
||||
@@ -156,9 +156,9 @@ elif [ "$platform" == "linux64" ]; then
|
||||
echo "Configuring build for Android on Linux host"
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
elif [ "$STATIC" == true ]; then
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
else
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
||||
fi
|
||||
|
||||
## LINUX 32
|
||||
@@ -194,7 +194,7 @@ elif [ "$platform" == "mingw64" ]; then
|
||||
# Do something under Windows NT platform
|
||||
echo "Configuring build for MINGW64.."
|
||||
BOOST_ROOT=/mingw64/boost
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="x86-64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 ../..
|
||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="x86-64" -D BUILD_TAG="win-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 ../..
|
||||
|
||||
## Windows 32
|
||||
elif [ "$platform" == "mingw32" ]; then
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 170 B |
Binary file not shown.
|
Before Width: | Height: | Size: 170 B |
Binary file not shown.
|
Before Width: | Height: | Size: 399 B |
Binary file not shown.
|
Before Width: | Height: | Size: 760 B |
Binary file not shown.
|
Before Width: | Height: | Size: 193 B |
Binary file not shown.
|
Before Width: | Height: | Size: 195 B |
@@ -317,7 +317,7 @@ end;
|
||||
; Icons in the "Monero GUI Wallet" program group
|
||||
; Windows will almost always display icons in alphabetical order, per level, so specify the text accordingly
|
||||
Name: "{group}\GUI Wallet"; Filename: "{app}\monero-wallet-gui.exe";
|
||||
Name: "{group}\GUI Wallet Guide"; Filename: "{app}\monero-GUI-guide.pdf"; IconFilename: "{app}\monero-wallet-gui.exe"
|
||||
Name: "{group}\GUI Wallet Guide"; Filename: "{app}\monero-gui-wallet-guide.pdf"; IconFilename: "{app}\monero-wallet-gui.exe"
|
||||
Name: "{group}\Uninstall GUI Wallet"; Filename: "{uninstallexe}"
|
||||
|
||||
; Sub-folder "Utilities";
|
||||
|
||||
7
main.cpp
7
main.cpp
@@ -174,7 +174,10 @@ int main(int argc, char *argv[])
|
||||
QCoreApplication::translate("main", "Log to specified file"),
|
||||
QCoreApplication::translate("main", "file"));
|
||||
|
||||
QCommandLineOption testQmlOption("test-qml");
|
||||
testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp);
|
||||
parser.addOption(logPathOption);
|
||||
parser.addOption(testQmlOption);
|
||||
parser.addHelpOption();
|
||||
parser.process(app);
|
||||
|
||||
@@ -405,6 +408,10 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
// QML loaded successfully.
|
||||
if (parser.isSet(testQmlOption))
|
||||
return 0;
|
||||
|
||||
#ifdef WITH_SCANNER
|
||||
QObject *qmlCamera = rootObject->findChild<QObject*>("qrCameraQML");
|
||||
if (qmlCamera)
|
||||
|
||||
91
main.qml
91
main.qml
@@ -47,7 +47,7 @@ import "js/Windows.js" as Windows
|
||||
|
||||
ApplicationWindow {
|
||||
id: appWindow
|
||||
title: "Monero"
|
||||
title: "Monero" + (walletName ? " - " + walletName : "")
|
||||
|
||||
property var currentItem
|
||||
property bool hideBalanceForced: false
|
||||
@@ -112,7 +112,6 @@ ApplicationWindow {
|
||||
property var current_address
|
||||
property var current_address_label: "Primary"
|
||||
property int current_subaddress_table_index: 0
|
||||
property int current_subaddress_account_table_index: 0
|
||||
|
||||
function altKeyReleased() { ctrlPressed = false; }
|
||||
|
||||
@@ -418,8 +417,6 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
leftPanel.minutesToUnlock = (balance !== balanceU) ? currentWallet.history.minutesToUnlock : "";
|
||||
leftPanel.currentAccountIndex = currentWallet.currentSubaddressAccount;
|
||||
leftPanel.currentAccountLabel = currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0);
|
||||
leftPanel.balanceString = balance
|
||||
leftPanel.balanceUnlockedString = balanceU
|
||||
}
|
||||
@@ -469,14 +466,18 @@ ApplicationWindow {
|
||||
leftPanel.networkStatus.connected = status
|
||||
|
||||
// update local daemon status.
|
||||
if(walletManager.isDaemonLocal(currentDaemonAddress))
|
||||
daemonRunning = status;
|
||||
const isDisconnected = status === Wallet.ConnectionStatus_Disconnected;
|
||||
if (walletManager.isDaemonLocal(currentDaemonAddress)) {
|
||||
daemonRunning = !isDisconnected;
|
||||
} else {
|
||||
daemonRunning = false;
|
||||
}
|
||||
|
||||
// Update fee multiplier dropdown on transfer page
|
||||
middlePanel.transferView.updatePriorityDropdown();
|
||||
|
||||
// If wallet isnt connected, advanced wallet mode and no daemon is running - Ask
|
||||
if (appWindow.walletMode >= 2 && walletManager.isDaemonLocal(currentDaemonAddress) && !walletInitialized && status === Wallet.ConnectionStatus_Disconnected) {
|
||||
if (appWindow.walletMode >= 2 && walletManager.isDaemonLocal(currentDaemonAddress) && !walletInitialized && isDisconnected) {
|
||||
daemonManager.runningAsync(persistentSettings.nettype, function(running) {
|
||||
if (!running) {
|
||||
daemonManagerDialog.open();
|
||||
@@ -598,10 +599,19 @@ ApplicationWindow {
|
||||
|
||||
function connectRemoteNode() {
|
||||
console.log("connecting remote node");
|
||||
persistentSettings.useRemoteNode = true;
|
||||
currentDaemonAddress = persistentSettings.remoteNodeAddress;
|
||||
currentWallet.initAsync(currentDaemonAddress, isTrustedDaemon());
|
||||
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
||||
|
||||
const callback = function() {
|
||||
persistentSettings.useRemoteNode = true;
|
||||
currentDaemonAddress = persistentSettings.remoteNodeAddress;
|
||||
currentWallet.initAsync(currentDaemonAddress, isTrustedDaemon());
|
||||
walletManager.setDaemonAddressAsync(currentDaemonAddress);
|
||||
};
|
||||
|
||||
if (typeof daemonManager != "undefined" && daemonRunning) {
|
||||
showDaemonIsRunningDialog(callback);
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
function disconnectRemoteNode() {
|
||||
@@ -1603,6 +1613,13 @@ ApplicationWindow {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
visible: rootItem.state == "normal" && middlePanel.state != "Merchant"
|
||||
currentAccountIndex: currentWallet ? currentWallet.currentSubaddressAccount : 0
|
||||
currentAccountLabel: {
|
||||
if (currentWallet) {
|
||||
return currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0);
|
||||
}
|
||||
return qsTr("Primary account") + translationManager.emptyString;
|
||||
}
|
||||
|
||||
onTransferClicked: {
|
||||
middlePanel.state = "Transfer";
|
||||
@@ -1674,6 +1691,7 @@ ApplicationWindow {
|
||||
|
||||
MiddlePanel {
|
||||
id: middlePanel
|
||||
accountView.currentAccountIndex: currentWallet ? currentWallet.currentSubaddressAccount : 0
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: leftPanel.visible ? leftPanel.right : parent.left
|
||||
@@ -1916,6 +1934,23 @@ ApplicationWindow {
|
||||
statusMessage.visible = true
|
||||
}
|
||||
|
||||
function showDaemonIsRunningDialog(onClose) {
|
||||
// Show confirmation dialog
|
||||
confirmationDialog.title = qsTr("Local node is running") + translationManager.emptyString;
|
||||
confirmationDialog.text = qsTr("Do you want to stop local node or keep it running in the background?") + translationManager.emptyString;
|
||||
confirmationDialog.icon = StandardIcon.Question;
|
||||
confirmationDialog.cancelText = qsTr("Force stop") + translationManager.emptyString;
|
||||
confirmationDialog.okText = qsTr("Keep it running") + translationManager.emptyString;
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
onClose();
|
||||
}
|
||||
confirmationDialog.onRejectedCallback = function() {
|
||||
daemonManager.stop(persistentSettings.nettype);
|
||||
onClose();
|
||||
};
|
||||
confirmationDialog.open();
|
||||
}
|
||||
|
||||
onClosing: {
|
||||
close.accepted = false;
|
||||
console.log("blocking close event");
|
||||
@@ -1937,27 +1972,12 @@ ApplicationWindow {
|
||||
|
||||
// If daemon is running - prompt user before exiting
|
||||
if(typeof daemonManager != "undefined" && daemonRunning) {
|
||||
// Show confirmation dialog
|
||||
confirmationDialog.title = qsTr("Daemon is running") + translationManager.emptyString;
|
||||
confirmationDialog.text = qsTr("Daemon will still be running in background when GUI is closed.");
|
||||
confirmationDialog.icon = StandardIcon.Question
|
||||
confirmationDialog.cancelText = qsTr("Stop daemon")
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
closeAccepted();
|
||||
}
|
||||
|
||||
confirmationDialog.onRejectedCallback = function() {
|
||||
daemonManager.stop(persistentSettings.nettype);
|
||||
closeAccepted();
|
||||
};
|
||||
|
||||
if (appWindow.walletMode == 0) {
|
||||
stopDaemon();
|
||||
closeAccepted();
|
||||
} else {
|
||||
confirmationDialog.open();
|
||||
showDaemonIsRunningDialog(closeAccepted);
|
||||
}
|
||||
|
||||
} else {
|
||||
closeAccepted();
|
||||
}
|
||||
@@ -1979,17 +1999,12 @@ ApplicationWindow {
|
||||
if (parts.length == 4) {
|
||||
var version = parts[0]
|
||||
var hash = parts[1]
|
||||
//var user_url = parts[2]
|
||||
//var auto_url = parts[3]
|
||||
var osBuildTag = isMac ? "mac-x64" : isWindows ? "win-x64" : isLinux ? "linux-x64" : "unknownBuildTag"
|
||||
var extension = isMac || isLinux ? ".tar.bz2" : isWindows ? ".zip" : ".unknownExtension"
|
||||
var base_url = "https://downloads.getmonero.org/gui/monero-gui-"
|
||||
var download_url = base_url + osBuildTag + "-v" + version + extension
|
||||
var user_url = parts[2]
|
||||
var msg = ""
|
||||
if (osBuildTag !== "unknownBuildTag") {
|
||||
msg = qsTr("New version of Monero v.%1 is available.<br><br>Download:<br>%2<br><br>SHA256 Hash:<br>%3").arg(version).arg(download_url).arg(hash) + translationManager.emptyString
|
||||
if (isMac || isWindows || isLinux) {
|
||||
msg = qsTr("New version of Monero v%1 is available.<br><br>Download:<br>%2<br><br>SHA256 Hash:<br>%3").arg(version).arg(user_url).arg(hash) + translationManager.emptyString
|
||||
} else {
|
||||
msg = qsTr("New version of Monero is available. Check out getmonero.org") + translationManager.emptyString
|
||||
msg = qsTr("New version of Monero v%1 is available. Check out getmonero.org").arg(version) + translationManager.emptyString
|
||||
}
|
||||
notifier.show(msg)
|
||||
} else {
|
||||
@@ -2025,7 +2040,9 @@ ApplicationWindow {
|
||||
// some fields need an extra nudge when changing languages
|
||||
function resetLanguageFields(){
|
||||
clearMoneroCardLabelText()
|
||||
onWalletRefresh()
|
||||
if (currentWallet) {
|
||||
onWalletRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
function userActivity() {
|
||||
|
||||
@@ -370,11 +370,19 @@ macx {
|
||||
# message("using static libraries")
|
||||
# LIBS+= -Wl,-Bstatic
|
||||
# }
|
||||
|
||||
OPENSSL_LIBRARY_DIRS = $$system(brew --prefix openssl, lines, EXIT_CODE)
|
||||
equals(EXIT_CODE, 0) {
|
||||
OPENSSL_LIBRARY_DIRS = $$OPENSSL_LIBRARY_DIRS/lib
|
||||
} else {
|
||||
OPENSSL_LIBRARY_DIRS = /usr/local/ssl/lib
|
||||
}
|
||||
|
||||
QT += macextras
|
||||
OBJECTIVE_SOURCES += src/qt/macoshelper.mm
|
||||
LIBS+= \
|
||||
-L/usr/local/lib \
|
||||
-L/usr/local/opt/openssl/lib \
|
||||
-L$$OPENSSL_LIBRARY_DIRS \
|
||||
-L/usr/local/opt/boost/lib \
|
||||
-lboost_serialization \
|
||||
-lboost_thread-mt \
|
||||
|
||||
@@ -31,6 +31,7 @@ import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
import FontAwesome 1.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../components/effects/" as MoneroEffects
|
||||
@@ -48,6 +49,7 @@ Rectangle {
|
||||
property var model
|
||||
property alias accountHeight: mainLayout.height
|
||||
property bool selectAndSend: false
|
||||
property int currentAccountIndex
|
||||
|
||||
function renameSubaddressAccountLabel(_index){
|
||||
inputDialog.labelText = qsTr("Set the label of the selected account:") + translationManager.emptyString;
|
||||
@@ -179,6 +181,7 @@ Rectangle {
|
||||
clip: true
|
||||
boundsBehavior: ListView.StopAtBounds
|
||||
interactive: false
|
||||
currentIndex: currentAccountIndex
|
||||
|
||||
delegate: Rectangle {
|
||||
id: tableItem2
|
||||
@@ -210,7 +213,7 @@ Rectangle {
|
||||
|
||||
MoneroComponents.Label {
|
||||
id: idLabel
|
||||
color: index === appWindow.current_subaddress_account_table_index ? MoneroComponents.Style.defaultFontColor : "#757575"
|
||||
color: index === currentAccountIndex ? MoneroComponents.Style.defaultFontColor : "#757575"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 6
|
||||
@@ -277,9 +280,9 @@ Rectangle {
|
||||
onEntered: tableItem2.color = MoneroComponents.Style.titleBarButtonHoverColor
|
||||
onExited: tableItem2.color = "transparent"
|
||||
onClicked: {
|
||||
if (index == subaddressAccountListView.currentIndex && selectAndSend)
|
||||
appWindow.currentWallet.switchSubaddressAccount(index);
|
||||
if (selectAndSend)
|
||||
appWindow.showPageRequest("Transfer");
|
||||
subaddressAccountListView.currentIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -318,17 +321,9 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentItemChanged: {
|
||||
// reset global vars
|
||||
appWindow.current_subaddress_account_table_index = subaddressAccountListView.currentIndex;
|
||||
appWindow.currentWallet.switchSubaddressAccount(appWindow.current_subaddress_account_table_index);
|
||||
appWindow.onWalletUpdate();
|
||||
}
|
||||
|
||||
onCurrentIndexChanged: {
|
||||
if (selectAndSend) {
|
||||
appWindow.showPageRequest("Transfer");
|
||||
}
|
||||
appWindow.onWalletUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,8 +344,9 @@ Rectangle {
|
||||
id: addNewAccountCheckbox
|
||||
visible: !selectAndSend
|
||||
border: false
|
||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: FontAwesome.plusCircle
|
||||
toggleOnClick: false
|
||||
fontAwesomeIcons: true
|
||||
fontSize: 16
|
||||
iconOnTheLeft: true
|
||||
Layout.fillWidth: true
|
||||
@@ -362,8 +358,6 @@ Rectangle {
|
||||
inputDialog.onAcceptedCallback = function() {
|
||||
appWindow.currentWallet.subaddressAccount.addRow(inputDialog.inputText)
|
||||
appWindow.currentWallet.switchSubaddressAccount(appWindow.currentWallet.numSubaddressAccounts() - 1)
|
||||
current_subaddress_account_table_index = appWindow.currentWallet.numSubaddressAccounts() - 1
|
||||
subaddressAccountListView.currentIndex = current_subaddress_account_table_index
|
||||
appWindow.onWalletUpdate();
|
||||
}
|
||||
inputDialog.onRejectedCallback = null;
|
||||
|
||||
@@ -67,21 +67,18 @@ Rectangle {
|
||||
spacing: 0
|
||||
Layout.fillWidth: true
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
id: titleLabel
|
||||
Layout.fillWidth: true
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 32
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: false
|
||||
wrapMode: Text.WordWrap;
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
text: qsTr("Save your most used addresses here") + translationManager.emptyString
|
||||
width: parent.width
|
||||
readOnly: true
|
||||
|
||||
// @TODO: Legacy. Remove after Qt 5.8.
|
||||
// https://stackoverflow.com/questions/41990013
|
||||
@@ -91,20 +88,17 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 16
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: false
|
||||
wrapMode: Text.WordWrap;
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
text: qsTr("This makes it easier to send or receive Monero and reduces errors when typing in addresses manually.") + translationManager.emptyString
|
||||
width: parent.width
|
||||
readOnly: true
|
||||
|
||||
// @TODO: Legacy. Remove after Qt 5.8.
|
||||
// https://stackoverflow.com/questions/41990013
|
||||
@@ -284,8 +278,9 @@ Rectangle {
|
||||
MoneroComponents.CheckBox {
|
||||
id: addNewEntryCheckbox
|
||||
border: false
|
||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: FontAwesome.plusCircle
|
||||
toggleOnClick: false
|
||||
fontAwesomeIcons: true
|
||||
fontSize: 16
|
||||
iconOnTheLeft: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -181,7 +181,6 @@ Rectangle {
|
||||
Layout.rightMargin: sideMargin
|
||||
columns: 2
|
||||
columnSpacing: 20
|
||||
z: 6
|
||||
|
||||
MoneroComponents.DatePicker {
|
||||
id: fromDatePicker
|
||||
@@ -228,7 +227,7 @@ Rectangle {
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: qsTr("Sort by") + ":"
|
||||
text: qsTr("Sort by") + ":" + translationManager.emptyString
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
@@ -447,7 +446,7 @@ Rectangle {
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: qsTr("Page") + ":"
|
||||
text: qsTr("Page") + ":" + translationManager.emptyString
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
@@ -651,7 +650,7 @@ Rectangle {
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: _amount + " XMR"
|
||||
text: displayAmount
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -870,7 +869,7 @@ Rectangle {
|
||||
MoneroComponents.TextPlain {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
text: persistentSettings.historyHumanDates ? dateHuman : date + " " + time
|
||||
text: persistentSettings.historyHumanDates ? dateHuman : dateTime
|
||||
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -882,7 +881,7 @@ Rectangle {
|
||||
onEntered: {
|
||||
parent.color = MoneroComponents.Style.orange
|
||||
if (persistentSettings.historyHumanDates) {
|
||||
parent.text = date + " " + time;
|
||||
parent.text = dateTime;
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
@@ -1197,7 +1196,7 @@ Rectangle {
|
||||
if(res[i].state === 'copyable_address') root.toClipboard(address);
|
||||
if(res[i].state === 'copyable_txkey') root.getTxKey(hash, res[i]);
|
||||
if(res[i].state === 'set_tx_note') root.editDescription(hash);
|
||||
if(res[i].state === 'details') root.showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex);
|
||||
if(res[i].state === 'details') root.showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex, dateTime, displayAmount, isout);
|
||||
if(res[i].state === 'proof') root.showTxProof(hash, paymentId, destinations, subaddrAccount, subaddrIndex);
|
||||
doCollapse = false;
|
||||
break;
|
||||
@@ -1480,12 +1479,12 @@ Rectangle {
|
||||
var timestamp = new Date(date + " " + time).getTime() / 1000;
|
||||
var dateHuman = Utils.ago(timestamp);
|
||||
|
||||
var _amount = amount;
|
||||
if(_amount === 0){
|
||||
var displayAmount = amount;
|
||||
if(displayAmount === 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 = Number(_amount *1);
|
||||
displayAmount = TxUtils.destinationsToAmount(destinations);
|
||||
displayAmount = Number(displayAmount *1);
|
||||
}
|
||||
|
||||
var tx_note = currentWallet.getUserNote(hash);
|
||||
@@ -1503,15 +1502,14 @@ Rectangle {
|
||||
"i": i,
|
||||
"isout": isout,
|
||||
"amount": Number(amount),
|
||||
"_amount": _amount,
|
||||
"displayAmount": displayAmount + " XMR",
|
||||
"hash": hash,
|
||||
"paymentId": paymentId,
|
||||
"address": address,
|
||||
"destinations": destinations,
|
||||
"tx_note": tx_note,
|
||||
"time": time,
|
||||
"date": date,
|
||||
"dateHuman": dateHuman,
|
||||
"dateTime": date + " " + time,
|
||||
"blockheight": blockheight,
|
||||
"address": address,
|
||||
"timestamp": timestamp,
|
||||
@@ -1588,17 +1586,20 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
function showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex){
|
||||
function showTxDetails(hash, paymentId, destinations, subaddrAccount, subaddrIndex, dateTime, amount, isout) {
|
||||
var tx_note = currentWallet.getUserNote(hash)
|
||||
var rings = currentWallet.getRings(hash)
|
||||
var address_label = subaddrIndex == 0 ? (qsTr("Primary address") + translationManager.emptyString) : currentWallet.getSubaddressLabel(subaddrAccount, subaddrIndex)
|
||||
var address = currentWallet.address(subaddrAccount, subaddrIndex)
|
||||
const hasPaymentId = parseInt(paymentId, 16);
|
||||
const integratedAddress = !isout && hasPaymentId ? currentWallet.integratedAddress(paymentId) : null;
|
||||
|
||||
if (rings)
|
||||
rings = rings.replace(/\|/g, '\n')
|
||||
|
||||
currentWallet.getTxKeyAsync(hash, function(hash, tx_key) {
|
||||
informationPopup.title = qsTr("Transaction details") + translationManager.emptyString;
|
||||
informationPopup.content = buildTxDetailsString(hash, paymentId, tx_key, tx_note, destinations, rings, address, address_label);
|
||||
informationPopup.content = buildTxDetailsString(hash, paymentId, tx_key, tx_note, destinations, rings, address, address_label, integratedAddress, dateTime, amount);
|
||||
informationPopup.onCloseCallback = null
|
||||
informationPopup.open();
|
||||
});
|
||||
@@ -1626,16 +1627,18 @@ Rectangle {
|
||||
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3);
|
||||
}
|
||||
|
||||
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings, address, address_label) {
|
||||
var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
|
||||
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings, address, address_label, integratedAddress, dateTime, amount) {
|
||||
var trStart = '<tr><td style="white-space: nowrap; 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 : "")
|
||||
+ (address_label ? trStart + qsTr("Address label:") + trMiddle + address_label + trEnd : "")
|
||||
+ (dateTime ? trStart + qsTr("Date") + ":" + trMiddle + dateTime + trEnd : "")
|
||||
+ (amount ? trStart + qsTr("Amount") + ":" + trMiddle + amount + trEnd : "")
|
||||
+ (address ? trStart + qsTr("Address:") + trMiddle + address + trEnd : "")
|
||||
+ (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "")
|
||||
+ (integratedAddress ? trStart + qsTr("Integrated address") + ":" + trMiddle + integratedAddress + 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 : "")
|
||||
|
||||
@@ -244,8 +244,9 @@ Rectangle {
|
||||
MoneroComponents.CheckBox {
|
||||
id: addNewAddressCheckbox
|
||||
border: false
|
||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: FontAwesome.plusCircle
|
||||
toggleOnClick: false
|
||||
fontAwesomeIcons: true
|
||||
fontSize: 16
|
||||
iconOnTheLeft: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -168,7 +168,7 @@ Rectangle {
|
||||
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
|
||||
Amount <font size='2'> ( </font> <a href='#'>Change account</a><font size='2'> )</font>")
|
||||
+ translationManager.emptyString
|
||||
copyButton: persistentSettings.fiatPriceEnabled
|
||||
copyButton: !isNaN(amountLine.text) && persistentSettings.fiatPriceEnabled
|
||||
copyButtonText: fiatApiCurrencySymbol() + " ~" + fiatApiConvertToFiat(amountLine.text)
|
||||
copyButtonEnabled: false
|
||||
|
||||
@@ -182,9 +182,17 @@ Rectangle {
|
||||
inlineButtonText: qsTr("All") + translationManager.emptyString
|
||||
inlineButton.onClicked: amountLine.text = "(all)"
|
||||
onTextChanged: {
|
||||
if(amountLine.text.indexOf('.') === 0){
|
||||
amountLine.text = '0' + amountLine.text;
|
||||
}
|
||||
const match = amountLine.text.match(/^0+(\d.*)/);
|
||||
if (match) {
|
||||
const cursorPosition = amountLine.cursorPosition;
|
||||
amountLine.text = match[1];
|
||||
amountLine.cursorPosition = Math.max(cursorPosition, 1) - 1;
|
||||
} else if(amountLine.text.indexOf('.') === 0){
|
||||
amountLine.text = '0' + amountLine.text;
|
||||
if (amountLine.text.length > 2) {
|
||||
amountLine.cursorPosition = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
validator: RegExpValidator {
|
||||
@@ -343,8 +351,9 @@ Rectangle {
|
||||
CheckBox {
|
||||
id: descriptionCheckbox
|
||||
border: false
|
||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
checkedIcon: FontAwesome.minusCircle
|
||||
uncheckedIcon: FontAwesome.plusCircle
|
||||
fontAwesomeIcons: true
|
||||
fontSize: descriptionLine.labelFontSize
|
||||
iconOnTheLeft: true
|
||||
Layout.fillWidth: true
|
||||
@@ -370,8 +379,9 @@ Rectangle {
|
||||
CheckBox {
|
||||
id: paymentIdCheckbox
|
||||
border: false
|
||||
checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
|
||||
checkedIcon: FontAwesome.minusCircle
|
||||
uncheckedIcon: FontAwesome.plusCircle
|
||||
fontAwesomeIcons: true
|
||||
fontSize: paymentIdLine.labelFontSize
|
||||
iconOnTheLeft: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -158,7 +158,7 @@ Item {
|
||||
"<p>It's up to you whether to accept unconfirmed transactions or not. It is likely they'll be " +
|
||||
"confirmed in short order, but there is still a possibility they might not, so for larger " +
|
||||
"values you may want to wait for one or more confirmation(s).</p>"
|
||||
);
|
||||
) + translationManager.emptyString;
|
||||
} else if(root.trackingError !== ""){
|
||||
return root.trackingError;
|
||||
} else if(trackingModel.count < 1){
|
||||
@@ -265,7 +265,7 @@ Item {
|
||||
font.pixelSize: 12
|
||||
font.bold: false
|
||||
color: "white"
|
||||
text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 12px;}</style>Currently selected address: " + addressLabel + " <a href='#'>(Change)</a>"
|
||||
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 12px;}</style>Currently selected address: ") + addressLabel + qsTr(" <a href='#'>(Change)</a>") + translationManager.emptyString
|
||||
textFormat: Text.RichText
|
||||
themeTransition: false
|
||||
|
||||
@@ -446,7 +446,7 @@ Item {
|
||||
font.pixelSize: 14
|
||||
font.bold: false
|
||||
color: "white"
|
||||
text: qsTr("Amount to receive") + " (XMR)"
|
||||
text: qsTr("Amount to receive") + " (XMR)" + translationManager.emptyString
|
||||
themeTransition: false
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,8 @@ Rectangle {
|
||||
Layout.leftMargin: 42
|
||||
spacing: 0
|
||||
|
||||
MoneroComponents.TextBlock {
|
||||
Text {
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.pixelSize: 14
|
||||
Layout.fillWidth: true
|
||||
text: {
|
||||
@@ -142,6 +143,12 @@ Rectangle {
|
||||
}
|
||||
|
||||
onMoved: persistentSettings.lockOnUserInActivityInterval = userInactivitySlider.value;
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ Rectangle{
|
||||
text: qsTr("Local node") + translationManager.emptyString
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
id: localNodeArea
|
||||
anchors.top: localNodeHeader.bottom
|
||||
anchors.topMargin: 4
|
||||
@@ -129,14 +129,11 @@ Rectangle{
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: false
|
||||
wrapMode: Text.WordWrap;
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
text: qsTr("The blockchain is downloaded to your computer. Provides higher security and requires more local storage.") + translationManager.emptyString
|
||||
width: parent.width - (localNodeIcon.width + localNodeIcon.anchors.leftMargin + anchors.leftMargin)
|
||||
readOnly: true
|
||||
|
||||
// @TODO: Legacy. Remove after Qt 5.8.
|
||||
// https://stackoverflow.com/questions/41990013
|
||||
@@ -221,7 +218,7 @@ Rectangle{
|
||||
text: qsTr("Remote node") + translationManager.emptyString
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
id: remoteNodeArea
|
||||
anchors.top: remoteNodeHeader.bottom
|
||||
anchors.topMargin: 4
|
||||
@@ -230,16 +227,12 @@ Rectangle{
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 15
|
||||
activeFocusOnPress: false
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: false
|
||||
wrapMode: Text.WordWrap;
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
text: qsTr("Uses a third-party server to connect to the Monero network. Less secure, but easier on your computer.") + translationManager.emptyString
|
||||
width: parent.width - (remoteNodeIcon.width + remoteNodeIcon.anchors.leftMargin + anchors.leftMargin)
|
||||
readOnly: true
|
||||
|
||||
// @TODO: Legacy. Remove after Qt 5.8.
|
||||
// https://stackoverflow.com/questions/41990013
|
||||
@@ -253,7 +246,6 @@ Rectangle{
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
persistentSettings.useRemoteNode = true;
|
||||
appWindow.connectRemoteNode();
|
||||
}
|
||||
}
|
||||
|
||||
6
qml.qrc
6
qml.qrc
@@ -7,10 +7,6 @@
|
||||
<file>images/download-white@2x.png</file>
|
||||
<file>images/external-link-white.png</file>
|
||||
<file>images/external-link-white@2x.png</file>
|
||||
<file>images/minus-white.png</file>
|
||||
<file>images/minus-white@2x.png</file>
|
||||
<file>images/plus-white.png</file>
|
||||
<file>images/plus-white@2x.png</file>
|
||||
<file>components/Label.qml</file>
|
||||
<file>components/SettingsListItem.qml</file>
|
||||
<file>images/whatIsIcon.png</file>
|
||||
@@ -174,8 +170,6 @@
|
||||
<file>components/WarningBox.qml</file>
|
||||
<file>images/miningxmr.png</file>
|
||||
<file>images/miningxmr@2x.png</file>
|
||||
<file>images/plus-in-circle-medium-white.png</file>
|
||||
<file>images/plus-in-circle-medium-white@2x.png</file>
|
||||
<file>pages/merchant/Merchant.qml</file>
|
||||
<file>pages/merchant/MerchantCheckbox.qml</file>
|
||||
<file>pages/merchant/MerchantTrackingList.qml</file>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <QMap>
|
||||
|
||||
namespace {
|
||||
static const int DAEMON_START_TIMEOUT_SECONDS = 60;
|
||||
static const int DAEMON_START_TIMEOUT_SECONDS = 120;
|
||||
}
|
||||
|
||||
DaemonManager * DaemonManager::m_instance = nullptr;
|
||||
|
||||
@@ -32,10 +32,13 @@
|
||||
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
#include <QReadLocker>
|
||||
#include <QWriteLocker>
|
||||
|
||||
|
||||
TransactionInfo *TransactionHistory::transaction(int index)
|
||||
{
|
||||
QReadLocker locker(&m_tinfoLock);
|
||||
|
||||
if (index < 0 || index >= m_tinfo.size()) {
|
||||
qCritical("%s: no transaction info for index %d", __FUNCTION__, index);
|
||||
@@ -53,41 +56,48 @@ TransactionInfo *TransactionHistory::transaction(int index)
|
||||
|
||||
QList<TransactionInfo *> TransactionHistory::getAll(quint32 accountIndex) const
|
||||
{
|
||||
// XXX this invalidates previously saved history that might be used by model
|
||||
emit refreshStarted();
|
||||
qDeleteAll(m_tinfo);
|
||||
m_tinfo.clear();
|
||||
|
||||
QDateTime firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block
|
||||
QDateTime lastDateTime = QDateTime::currentDateTime().addDays(1); // tomorrow (guard against jitter and timezones)
|
||||
quint64 lastTxHeight = 0;
|
||||
m_locked = false;
|
||||
m_minutesToUnlock = 0;
|
||||
TransactionHistory * parent = const_cast<TransactionHistory*>(this);
|
||||
for (const auto i : m_pimpl->getAll()) {
|
||||
TransactionInfo * ti = new TransactionInfo(i, parent);
|
||||
if (ti->subaddrAccount() != accountIndex) {
|
||||
delete ti;
|
||||
continue;
|
||||
}
|
||||
m_tinfo.append(ti);
|
||||
// looking for transactions timestamp scope
|
||||
if (ti->timestamp() >= lastDateTime) {
|
||||
lastDateTime = ti->timestamp();
|
||||
}
|
||||
if (ti->timestamp() <= firstDateTime) {
|
||||
firstDateTime = ti->timestamp();
|
||||
}
|
||||
quint64 requiredConfirmations = (ti->blockHeight() < ti->unlockTime()) ? ti->unlockTime() - ti->blockHeight() : 10;
|
||||
// store last tx height
|
||||
if (ti->confirmations() < requiredConfirmations && ti->blockHeight() >= lastTxHeight) {
|
||||
lastTxHeight = ti->blockHeight();
|
||||
// TODO: Fetch block time and confirmations needed from wallet2?
|
||||
m_minutesToUnlock = (requiredConfirmations - ti->confirmations()) * 2;
|
||||
m_locked = true;
|
||||
}
|
||||
|
||||
emit refreshStarted();
|
||||
|
||||
{
|
||||
QWriteLocker locker(&m_tinfoLock);
|
||||
|
||||
// XXX this invalidates previously saved history that might be used by model
|
||||
qDeleteAll(m_tinfo);
|
||||
m_tinfo.clear();
|
||||
|
||||
quint64 lastTxHeight = 0;
|
||||
m_locked = false;
|
||||
m_minutesToUnlock = 0;
|
||||
TransactionHistory * parent = const_cast<TransactionHistory*>(this);
|
||||
for (const auto i : m_pimpl->getAll()) {
|
||||
TransactionInfo * ti = new TransactionInfo(i, parent);
|
||||
if (ti->subaddrAccount() != accountIndex) {
|
||||
delete ti;
|
||||
continue;
|
||||
}
|
||||
m_tinfo.append(ti);
|
||||
// looking for transactions timestamp scope
|
||||
if (ti->timestamp() >= lastDateTime) {
|
||||
lastDateTime = ti->timestamp();
|
||||
}
|
||||
if (ti->timestamp() <= firstDateTime) {
|
||||
firstDateTime = ti->timestamp();
|
||||
}
|
||||
quint64 requiredConfirmations = (ti->blockHeight() < ti->unlockTime()) ? ti->unlockTime() - ti->blockHeight() : 10;
|
||||
// store last tx height
|
||||
if (ti->confirmations() < requiredConfirmations && ti->blockHeight() >= lastTxHeight) {
|
||||
lastTxHeight = ti->blockHeight();
|
||||
// TODO: Fetch block time and confirmations needed from wallet2?
|
||||
m_minutesToUnlock = (requiredConfirmations - ti->confirmations()) * 2;
|
||||
m_locked = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
emit refreshFinished();
|
||||
|
||||
if (m_firstDateTime != firstDateTime) {
|
||||
@@ -112,6 +122,8 @@ void TransactionHistory::refresh(quint32 accountIndex)
|
||||
|
||||
quint64 TransactionHistory::count() const
|
||||
{
|
||||
QReadLocker locker(&m_tinfoLock);
|
||||
|
||||
return m_tinfo.count();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QReadWriteLock>
|
||||
#include <QDateTime>
|
||||
|
||||
namespace Monero {
|
||||
@@ -76,6 +77,7 @@ private:
|
||||
friend class Wallet;
|
||||
Monero::TransactionHistory * m_pimpl;
|
||||
mutable QList<TransactionInfo*> m_tinfo;
|
||||
mutable QReadWriteLock m_tinfoLock;
|
||||
mutable QDateTime m_firstDateTime;
|
||||
mutable QDateTime m_lastDateTime;
|
||||
mutable int m_minutesToUnlock;
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace {
|
||||
static const int DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS = 5;
|
||||
static const int DAEMON_BLOCKCHAIN_TARGET_HEIGHT_CACHE_TTL_SECONDS = 30;
|
||||
static const int WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS = 5;
|
||||
|
||||
static constexpr char ATTRIBUTE_SUBADDRESS_ACCOUNT[] ="gui.subaddress_account";
|
||||
}
|
||||
|
||||
class WalletListenerImpl : public Monero::WalletListener
|
||||
@@ -316,8 +318,13 @@ void Wallet::switchSubaddressAccount(quint32 accountIndex)
|
||||
if (accountIndex < numSubaddressAccounts())
|
||||
{
|
||||
m_currentSubaddressAccount = accountIndex;
|
||||
if (!setCacheAttribute(ATTRIBUTE_SUBADDRESS_ACCOUNT, QString::number(m_currentSubaddressAccount)))
|
||||
{
|
||||
qWarning() << "failed to set " << ATTRIBUTE_SUBADDRESS_ACCOUNT << " cache attribute";
|
||||
}
|
||||
m_subaddress->refresh(m_currentSubaddressAccount);
|
||||
m_history->refresh(m_currentSubaddressAccount);
|
||||
emit currentSubaddressAccountChanged();
|
||||
}
|
||||
}
|
||||
void Wallet::addSubaddressAccount(const QString& label)
|
||||
@@ -982,6 +989,7 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
||||
m_walletListener = new WalletListenerImpl(this);
|
||||
m_walletImpl->setListener(m_walletListener);
|
||||
m_connectionStatus = Wallet::ConnectionStatus_Disconnected;
|
||||
m_currentSubaddressAccount = getCacheAttribute(ATTRIBUTE_SUBADDRESS_ACCOUNT).toUInt();
|
||||
// start cache timers
|
||||
m_connectionStatusTime.restart();
|
||||
m_daemonBlockChainHeightTime.restart();
|
||||
|
||||
@@ -65,7 +65,7 @@ class Wallet : public QObject
|
||||
Q_PROPERTY(Status status READ status)
|
||||
Q_PROPERTY(NetworkType::Type nettype READ nettype)
|
||||
// Q_PROPERTY(ConnectionStatus connected READ connected)
|
||||
Q_PROPERTY(quint32 currentSubaddressAccount READ currentSubaddressAccount)
|
||||
Q_PROPERTY(quint32 currentSubaddressAccount READ currentSubaddressAccount NOTIFY currentSubaddressAccountChanged)
|
||||
Q_PROPERTY(bool synchronized READ synchronized)
|
||||
Q_PROPERTY(QString errorString READ errorString)
|
||||
Q_PROPERTY(TransactionHistory * history READ history)
|
||||
@@ -365,6 +365,7 @@ signals:
|
||||
void transactionCreated(PendingTransaction * transaction, QString address, QString paymentId, quint32 mixinCount);
|
||||
|
||||
void connectionStatusChanged(int status) const;
|
||||
void currentSubaddressAccountChanged() const;
|
||||
|
||||
private:
|
||||
Wallet(QObject * parent = nullptr);
|
||||
|
||||
@@ -180,14 +180,15 @@ ColumnLayout {
|
||||
color: "transparent"
|
||||
|
||||
MoneroComponents.Label {
|
||||
fontSize: 20
|
||||
fontSize: 18
|
||||
text: FontAwesome.lock
|
||||
opacity: 0.5
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
fontFamily: FontAwesome.fontFamilySolid
|
||||
styleName: "Solid"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 15
|
||||
anchors.rightMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: 3
|
||||
anchors.verticalCenterOffset: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,14 +238,15 @@ ColumnLayout {
|
||||
color: "transparent"
|
||||
|
||||
MoneroComponents.Label {
|
||||
fontSize: 20
|
||||
fontSize: 18
|
||||
text: FontAwesome.lock
|
||||
opacity: 0.5
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
fontFamily: FontAwesome.fontFamilySolid
|
||||
styleName: "Solid"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 15
|
||||
anchors.rightMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: 3
|
||||
anchors.verticalCenterOffset: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
id: errorMsg
|
||||
text: qsTr("Error writing wallet from hardware device. Check application logs.") + translationManager.emptyString;
|
||||
visible: errorMsg.text !== ""
|
||||
@@ -167,16 +167,10 @@ Rectangle {
|
||||
color: MoneroComponents.Style.errorColor
|
||||
font.pixelSize: 16
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: true
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
|
||||
WizardNav {
|
||||
|
||||
@@ -91,7 +91,7 @@ ColumnLayout {
|
||||
Layout.topMargin: 6
|
||||
spacing: 0
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
text: qsTr("Bootstrap node") + translationManager.emptyString
|
||||
Layout.topMargin: 10
|
||||
Layout.fillWidth: true
|
||||
@@ -105,19 +105,13 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: true
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
text: qsTr("Additionally, you may specify a bootstrap node to use Monero immediately.") + translationManager.emptyString
|
||||
Layout.topMargin: 4
|
||||
Layout.fillWidth: true
|
||||
@@ -133,16 +127,10 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: true
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ ColumnLayout {
|
||||
spacing: 4
|
||||
Layout.maximumWidth: wizardController.wizardSubViewWidth
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
text: title
|
||||
Layout.fillWidth: true
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
@@ -55,19 +55,13 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: true
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
visible: parent.subtitle !== ""
|
||||
@@ -84,14 +78,8 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: true
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,12 +149,10 @@ Rectangle {
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
visible: !persistentSettings.customDecorations
|
||||
small: true
|
||||
text: qsTr("Change language") + translationManager.emptyString
|
||||
|
||||
onClicked: {
|
||||
wizardController.wizardStackView.backTransition = false;
|
||||
appWindow.toggleLanguageView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ Rectangle {
|
||||
width: parent.width - 100
|
||||
anchors.horizontalCenter: parent.horizontalCenter;
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
text: qsTr("Language settings") + translationManager.emptyString
|
||||
Layout.fillWidth: true
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
@@ -80,19 +80,13 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: true
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
visible: parent.subtitle !== ""
|
||||
|
||||
@@ -108,15 +102,9 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: true
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
|
||||
Flow {
|
||||
@@ -190,7 +178,7 @@ Rectangle {
|
||||
// set wizard language settings
|
||||
wizard.language_locale = locale;
|
||||
wizard.language_wallet = wallet_language;
|
||||
wizard.language_language = display_name + " (" + locale_spl[1] + ") ";
|
||||
wizard.language_language = display_name;
|
||||
|
||||
appWindow.showStatusMessage(qsTr("Language changed."), 3);
|
||||
appWindow.toggleLanguageView();
|
||||
|
||||
@@ -57,7 +57,7 @@ Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
id: textWelcome
|
||||
opacity: 0
|
||||
Layout.preferredWidth: parent.width / 1.3
|
||||
@@ -69,12 +69,9 @@ Rectangle {
|
||||
font.bold: true
|
||||
font.pixelSize: 18
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
selectByMouse: false
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
readOnly: true
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
|
||||
@@ -138,13 +138,13 @@ Rectangle {
|
||||
|
||||
WizardNav {
|
||||
Layout.topMargin: 5
|
||||
btnPrevText: qsTr("Change language") + translationManager.emptyString
|
||||
btnPrevText: qsTr("Back to menu") + translationManager.emptyString
|
||||
btnNext.visible: false
|
||||
progressSteps: 0
|
||||
|
||||
onPrevClicked: {
|
||||
wizardController.wizardStackView.backTransition = true;
|
||||
wizardController.wizardState = 'wizardLanguage';
|
||||
wizardController.wizardStackView.backTransition = wizardController.wizardStatePrevious.viewName == 'wizardLanguage';
|
||||
wizardController.wizardState = wizardController.wizardStatePrevious.viewName == 'wizardLanguage' ? 'wizardLanguage' : 'wizardHome';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ Rectangle {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
text: {
|
||||
// truncate on window width
|
||||
var maxLength = wizardController.layoutScale <= 1 ? 12 : 16
|
||||
@@ -214,19 +214,13 @@ Rectangle {
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.pixelSize: 16
|
||||
|
||||
selectionColor: MoneroComponents.Style.dimmedFontColor
|
||||
selectedTextColor: MoneroComponents.Style.defaultFontColor
|
||||
|
||||
selectByMouse: false
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: networktype !== -1 ? 8 : 4
|
||||
bottomPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
|
||||
TextArea {
|
||||
Text {
|
||||
visible: networktype !== -1
|
||||
Layout.preferredHeight: 24
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
@@ -236,16 +230,10 @@ Rectangle {
|
||||
color: MoneroComponents.Style.dimmedFontColor
|
||||
font.pixelSize: 14
|
||||
|
||||
selectionColor: MoneroComponents.Style.textSelectionColor
|
||||
selectedTextColor: MoneroComponents.Style.textSelectedColor
|
||||
|
||||
selectByMouse: false
|
||||
wrapMode: Text.WordWrap
|
||||
textMargin: 0
|
||||
leftPadding: 0
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
readOnly: true
|
||||
}
|
||||
|
||||
Item {
|
||||
|
||||
@@ -213,7 +213,7 @@ Rectangle {
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
text: qsTr("Enter your 25 (or 24) word mnemonic seed") + translationManager.emptyString
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
visible: !seedInput.text && !parent.focus
|
||||
visible: !seedInput.text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user