Browse Source

Remove the un-necessary fees section from the send tab

import_zecw
Aditya Kulkarni 6 years ago
parent
commit
0a14fbc911
  1. 52
      src/mainwindow.ui
  2. 13
      src/sendtab.cpp
  3. 41
      src/ui_mainwindow.h

52
src/mainwindow.ui

@ -245,7 +245,7 @@
<item>
<widget class="QLabel" name="sendAddressBalanceUSD">
<property name="text">
<string> </string>
<string/>
</property>
</widget>
</item>
@ -302,7 +302,7 @@
<x>0</x>
<y>0</y>
<width>841</width>
<height>288</height>
<height>321</height>
</rect>
</property>
<layout class="QVBoxLayout" name="sendToLayout">
@ -472,53 +472,6 @@
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Fee</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="sendTxFees">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="sendTxFeesUSD">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
@ -760,7 +713,6 @@
<tabstop>Amount1</tabstop>
<tabstop>Max1</tabstop>
<tabstop>addAddressButton</tabstop>
<tabstop>sendTxFees</tabstop>
<tabstop>sendTransactionButton</tabstop>
<tabstop>cancelSendButton</tabstop>
<tabstop>balancesTable</tabstop>

13
src/sendtab.cpp

@ -55,19 +55,6 @@ void MainWindow::setupSendTab() {
QFont f = ui->Address1->font();
f.setPointSize(f.pointSize() - 1);
ui->MemoTxt1->setFont(f);
// Set up focus enter to set fees
QObject::connect(ui->tabWidget, &QTabWidget::currentChanged, [=] (int pos) {
if (pos == 1) {
// Set the fees
ui->sendTxFees->setText(QString::number(Utils::getTotalFee(), 'g', 8) %
" " % Utils::getTokenName());
ui->sendTxFeesUSD->setText(Settings::getInstance()->getUSDFormat(Utils::getTotalFee()));
// Set focus to the first address box
ui->Address1->setFocus();
}
});
}
void MainWindow::setDefaultPayFrom() {

41
src/ui_mainwindow.h

@ -105,11 +105,6 @@ public:
QPushButton *addAddressButton;
QSpacerItem *horizontalSpacer_3;
QSpacerItem *verticalSpacer_2;
QHBoxLayout *horizontalLayout_14;
QLabel *label_7;
QLineEdit *sendTxFees;
QLabel *sendTxFeesUSD;
QSpacerItem *horizontalSpacer_5;
QHBoxLayout *horizontalLayout_6;
QSpacerItem *horizontalSpacer;
QPushButton *sendTransactionButton;
@ -362,7 +357,7 @@ public:
sendToScrollArea->setWidgetResizable(true);
sendToWidgets = new QWidget();
sendToWidgets->setObjectName(QStringLiteral("sendToWidgets"));
sendToWidgets->setGeometry(QRect(0, 0, 841, 288));
sendToWidgets->setGeometry(QRect(0, 0, 841, 321));
sendToLayout = new QVBoxLayout(sendToWidgets);
sendToLayout->setSpacing(6);
sendToLayout->setContentsMargins(11, 11, 11, 11);
@ -468,34 +463,6 @@ public:
verticalLayout_4->addWidget(groupBox_3);
horizontalLayout_14 = new QHBoxLayout();
horizontalLayout_14->setSpacing(6);
horizontalLayout_14->setObjectName(QStringLiteral("horizontalLayout_14"));
label_7 = new QLabel(tab_2);
label_7->setObjectName(QStringLiteral("label_7"));
horizontalLayout_14->addWidget(label_7);
sendTxFees = new QLineEdit(tab_2);
sendTxFees->setObjectName(QStringLiteral("sendTxFees"));
sizePolicy.setHeightForWidth(sendTxFees->sizePolicy().hasHeightForWidth());
sendTxFees->setSizePolicy(sizePolicy);
sendTxFees->setReadOnly(true);
horizontalLayout_14->addWidget(sendTxFees);
sendTxFeesUSD = new QLabel(tab_2);
sendTxFeesUSD->setObjectName(QStringLiteral("sendTxFeesUSD"));
horizontalLayout_14->addWidget(sendTxFeesUSD);
horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout_14->addItem(horizontalSpacer_5);
verticalLayout_4->addLayout(horizontalLayout_14);
horizontalLayout_6 = new QHBoxLayout();
horizontalLayout_6->setSpacing(6);
horizontalLayout_6->setObjectName(QStringLiteral("horizontalLayout_6"));
@ -642,8 +609,7 @@ public:
QWidget::setTabOrder(Address1, Amount1);
QWidget::setTabOrder(Amount1, Max1);
QWidget::setTabOrder(Max1, addAddressButton);
QWidget::setTabOrder(addAddressButton, sendTxFees);
QWidget::setTabOrder(sendTxFees, sendTransactionButton);
QWidget::setTabOrder(addAddressButton, sendTransactionButton);
QWidget::setTabOrder(sendTransactionButton, cancelSendButton);
QWidget::setTabOrder(cancelSendButton, balancesTable);
QWidget::setTabOrder(balancesTable, rdioZAddr);
@ -707,9 +673,6 @@ public:
MemoBtn1->setText(QApplication::translate("MainWindow", "Memo", nullptr));
MemoTxt1->setText(QString());
addAddressButton->setText(QApplication::translate("MainWindow", "Add Address", nullptr));
label_7->setText(QApplication::translate("MainWindow", "Fee", nullptr));
sendTxFees->setText(QString());
sendTxFeesUSD->setText(QApplication::translate("MainWindow", "TextLabel", nullptr));
sendTransactionButton->setText(QApplication::translate("MainWindow", "Send", nullptr));
cancelSendButton->setText(QApplication::translate("MainWindow", "Cancel", nullptr));
tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Send", nullptr));

Loading…
Cancel
Save