Skip to content

Commit

Permalink
Merge pull request #83 from HTHcoin/code-clean-up
Browse files Browse the repository at this point in the history
Code clean up
  • Loading branch information
MichaelHDesigns committed Aug 27, 2020
2 parents bb08b9a + 911a025 commit a6a6b77
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 135 deletions.
61 changes: 0 additions & 61 deletions src/qt/forms/overviewpage.ui
Expand Up @@ -700,33 +700,6 @@ font-size: 11px;</string>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QLabel" name="labelUnconfirmed">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="toolTip">
<string>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</string>
</property>
<property name="styleSheet">
<string notr="true">font-size: 15px</string>
</property>
<property name="text">
<string notr="true">0.000 000 00</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="2" column="4">
<spacer name="horizontalSpacer_2">
<property name="orientation">
Expand All @@ -740,40 +713,6 @@ font-size: 11px;</string>
</property>
</spacer>
</item>
<item row="2" column="3">
<widget class="QLabel" name="labelWatchPending">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="toolTip">
<string>Unconfirmed transactions to watch-only addresses</string>
</property>
<property name="styleSheet">
<string notr="true">font-size: 15px</string>
</property>
<property name="text">
<string notr="true">0.000 000 00</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelPendingText">
<property name="text">
<string>Pending:</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="labelWatchImmature">
<property name="font">
Expand Down
162 changes: 95 additions & 67 deletions src/qt/forms/sendcoinsentry.ui
Expand Up @@ -16,6 +16,9 @@
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">font-color: #ff0000;</string>
</property>
<widget class="QFrame" name="SendCoins">
<property name="toolTip">
<string>This is a normal payment.</string>
Expand All @@ -36,7 +39,7 @@
<property name="verticalSpacing">
<number>8</number>
</property>
<item row="4" column="1">
<item row="5" column="1">
<widget class="QFrame" name="frameDonate">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
Expand Down Expand Up @@ -167,20 +170,20 @@ font-size: 11px;</string>
</widget>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="payToLabel">
<item row="2" column="0">
<widget class="QLabel" name="amountLabel">
<property name="text">
<string>Pay &amp;To:</string>
<string>A&amp;mount:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>payTo</cstring>
<cstring>payAmount</cstring>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="messageCaption">
<property name="text">
<string>Donate:</string>
Expand All @@ -193,59 +196,16 @@ font-size: 11px;</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labellLabel">
<item row="0" column="0">
<widget class="QLabel" name="payToLabel">
<property name="text">
<string>&amp;Label:</string>
<string>Pay &amp;To:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>addAsLabel</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayoutAmount" stretch="0,1">
<item>
<widget class="BitcoinAmountField" name="payAmount"/>
</item>
<item>
<widget class="QCheckBox" name="checkboxSubtractFeeFromAmount">
<property name="toolTip">
<string>The fee will be deducted from the amount being sent. The recipient will receive a lower amount of HTH than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</string>
</property>
<property name="text">
<string>S&amp;ubtract fee from amount</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="1">
<widget class="QLabel" name="messageTextLabel">
<property name="toolTip">
<string>A message that was attached to the HTH: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the HelpTheHomeless network.</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
<cstring>payTo</cstring>
</property>
</widget>
</item>
Expand Down Expand Up @@ -317,16 +277,46 @@ font-size: 11px;</string>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="amountLabel">
<property name="text">
<string>A&amp;mount:</string>
<item row="6" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="buddy">
<cstring>payAmount</cstring>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayoutAmount" stretch="0,1">
<item>
<widget class="BitcoinAmountField" name="payAmount"/>
</item>
<item>
<widget class="QCheckBox" name="checkboxSubtractFeeFromAmount">
<property name="toolTip">
<string>The fee will be deducted from the amount being sent. The recipient will receive a lower amount of HTH than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</string>
</property>
<property name="text">
<string>S&amp;ubtract fee from amount</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="1">
<widget class="QLabel" name="messageTextLabel">
<property name="toolTip">
<string>A message that was attached to the HTH: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the HelpTheHomeless network.</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
</widget>
</item>
Expand All @@ -341,19 +331,39 @@ font-size: 11px;</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>85</height>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="addAsLabel">
<property name="toolTip">
<string>Enter a label for this address to add it to the list of used addresses</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="1" column="0">
<widget class="QLabel" name="labellLabel">
<property name="text">
<string>&amp;Label:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>addAsLabel</cstring>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="messageLabel">
<property name="text">
<string>Message:</string>
Expand All @@ -363,10 +373,28 @@ font-size: 11px;</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="4" column="1">
<widget class="QLabel" name="infoText_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">color: red;</string>
</property>
<property name="text">
<string> WARNING!!!! DOUBLE CHECK YOUR ADDRESS BEFORE SENDING ANY TRANSACTIONS!!!!!</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
Expand Down
11 changes: 5 additions & 6 deletions src/qt/overviewpage.cpp
Expand Up @@ -150,12 +150,11 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed
currentWatchUnconfBalance = watchUnconfBalance;
currentWatchImmatureBalance = watchImmatureBalance;
ui->labelBalance->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, balance, false, BitcoinUnits::separatorAlways));
ui->labelUnconfirmed->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
ui->labelImmature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, immatureBalance, false, BitcoinUnits::separatorAlways));
ui->labelUnconfirmed->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, anonymizedBalance, false, BitcoinUnits::separatorAlways));
/* ui->labelUnconfirmed->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, anonymizedBalance, false, BitcoinUnits::separatorAlways)); */
ui->labelTotal->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
ui->labelWatchAvailable->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
ui->labelWatchPending->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
/* ui->labelWatchPending->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways)); */
ui->labelWatchImmature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
ui->labelWatchTotal->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));

Expand All @@ -177,15 +176,15 @@ void OverviewPage::updateWatchOnlyLabels(bool showWatchOnly)
ui->labelWatchonly->setVisible(showWatchOnly); // show watch-only label
ui->lineWatchBalance->setVisible(showWatchOnly); // show watch-only balance separator line
ui->labelWatchAvailable->setVisible(showWatchOnly); // show watch-only available balance
ui->labelWatchPending->setVisible(showWatchOnly); // show watch-only pending balance
/* ui->labelWatchPending->setVisible(showWatchOnly); */ // show watch-only pending balance
ui->labelWatchTotal->setVisible(showWatchOnly); // show watch-only total balance

if (!showWatchOnly){
ui->labelWatchImmature->hide();
}
else{
ui->labelBalance->setIndent(20);
ui->labelUnconfirmed->setIndent(20);
/* ui->labelUnconfirmed->setIndent(20); */
ui->labelImmatureText->setIndent(20);
ui->labelTotal->setIndent(20);
}
Expand Down Expand Up @@ -313,7 +312,7 @@ void OverviewPage::on_pushButton_Website_2_clicked() { // HTH Exchanges

void OverviewPage::on_pushButton_Website_3_clicked() { // HTH Explorer

QDesktopServices::openUrl(QUrl("https://chainz.cryptoid.info/hth", QUrl::TolerantMode));
QDesktopServices::openUrl(QUrl("https://openchains.info/coin/hth/blocks", QUrl::TolerantMode));

}

Expand Down
1 change: 0 additions & 1 deletion src/qt/res/css/drkblue.css
Expand Up @@ -84,7 +84,6 @@ font-weight: bold;
}



/* Global Push Button Style */

QPushButton {
Expand Down

0 comments on commit a6a6b77

Please sign in to comment.