mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-01 22:57:25 -04:00
Merge pull request #3574
eacc57f StandardDropdown: use ColumnLayout; use same height of LineEdit; include dropdownLabel (rating89us)
This commit is contained in:
@@ -669,13 +669,6 @@ Rectangle {
|
||||
spacing: 0
|
||||
visible: appWindow.walletMode >= 2
|
||||
|
||||
Label {
|
||||
id: transactionPriority
|
||||
Layout.topMargin: 0
|
||||
text: qsTr("Transaction priority") + translationManager.emptyString
|
||||
fontBold: false
|
||||
fontSize: 16
|
||||
}
|
||||
// Note: workaround for translations in listElements
|
||||
// ListElement: cannot use script for property value, so
|
||||
// code like this wont work:
|
||||
@@ -699,10 +692,11 @@ Rectangle {
|
||||
spacing: 10
|
||||
|
||||
StandardDropdown {
|
||||
Layout.preferredWidth: 200
|
||||
Layout.maximumWidth: 200
|
||||
id: priorityDropdown
|
||||
currentIndex: 0
|
||||
dataModel: priorityModelV5
|
||||
labelText: qsTr("Transaction priority") + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
|
||||
@@ -178,52 +178,34 @@ Rectangle {
|
||||
Layout.leftMargin: 36
|
||||
columnSpacing: 32
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
Layout.fillWidth: true
|
||||
MoneroComponents.StandardDropdown {
|
||||
id: fiatPriceProviderDropDown
|
||||
Layout.maximumWidth: 200
|
||||
labelText: qsTr("Price source") + translationManager.emptyString
|
||||
labelFontSize: 14
|
||||
dataModel: fiatPriceProvidersModel
|
||||
onChanged: {
|
||||
var obj = dataModel.get(currentIndex);
|
||||
persistentSettings.fiatPriceProvider = obj.data;
|
||||
|
||||
MoneroComponents.Label {
|
||||
Layout.fillWidth: true
|
||||
fontSize: 14
|
||||
text: qsTr("Price source") + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.StandardDropdown {
|
||||
id: fiatPriceProviderDropDown
|
||||
Layout.fillWidth: true
|
||||
dataModel: fiatPriceProvidersModel
|
||||
onChanged: {
|
||||
var obj = dataModel.get(currentIndex);
|
||||
persistentSettings.fiatPriceProvider = obj.data;
|
||||
|
||||
if(persistentSettings.fiatPriceEnabled)
|
||||
appWindow.fiatApiRefresh();
|
||||
}
|
||||
if(persistentSettings.fiatPriceEnabled)
|
||||
appWindow.fiatApiRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
Layout.fillWidth: true
|
||||
MoneroComponents.StandardDropdown {
|
||||
id: fiatPriceCurrencyDropdown
|
||||
Layout.maximumWidth: 100
|
||||
labelText: qsTr("Currency") + translationManager.emptyString
|
||||
labelFontSize: 14
|
||||
currentIndex: persistentSettings.fiatPriceCurrency === "xmrusd" ? 0 : 1
|
||||
dataModel: fiatPriceCurrencyModel
|
||||
onChanged: {
|
||||
var obj = dataModel.get(currentIndex);
|
||||
persistentSettings.fiatPriceCurrency = obj.data;
|
||||
|
||||
MoneroComponents.Label {
|
||||
Layout.fillWidth: true
|
||||
fontSize: 14
|
||||
text: qsTr("Currency") + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.StandardDropdown {
|
||||
id: fiatPriceCurrencyDropdown
|
||||
Layout.fillWidth: true
|
||||
currentIndex: persistentSettings.fiatPriceCurrency === "xmrusd" ? 0 : 1
|
||||
dataModel: fiatPriceCurrencyModel
|
||||
onChanged: {
|
||||
var obj = dataModel.get(currentIndex);
|
||||
persistentSettings.fiatPriceCurrency = obj.data;
|
||||
|
||||
if(persistentSettings.fiatPriceEnabled)
|
||||
appWindow.fiatApiRefresh();
|
||||
}
|
||||
if(persistentSettings.fiatPriceEnabled)
|
||||
appWindow.fiatApiRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user