Restore overviewpage (put transactions back within frame)

- Also, change "(out of sync)" to only red, instead of red and bold, which a bit more subtle
- Move label stylesheets to xml
This commit is contained in:
Wladimir J. van der Laan 2012-05-17 23:24:17 +02:00
parent f0fc95a143
commit 320fe1015a
2 changed files with 185 additions and 149 deletions

View File

@ -24,120 +24,141 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QFormLayout" name="formLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_4">
<property name="fieldGrowthPolicy"> <item>
<enum>QFormLayout::AllNonFixedFieldsGrow</enum> <layout class="QHBoxLayout" name="horizontalLayout_4">
</property> <item>
<property name="horizontalSpacing"> <widget class="QLabel" name="label_5">
<number>12</number> <property name="font">
</property> <font>
<property name="verticalSpacing"> <pointsize>11</pointsize>
<number>12</number> <weight>75</weight>
</property> <bold>true</bold>
<item row="0" column="0"> </font>
<widget class="QLabel" name="label_5"> </property>
<property name="font"> <property name="text">
<font> <string>Wallet</string>
<pointsize>11</pointsize> </property>
<weight>75</weight> </widget>
<bold>true</bold> </item>
</font> <item>
</property> <widget class="QLabel" name="labelWalletStatus">
<property name="text"> <property name="toolTip">
<string>Wallet</string> <string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string>
</property> </property>
</widget> <property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
</property>
<property name="text">
<string notr="true">(out of sync)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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>
<item row="0" column="1"> <item>
<widget class="QLabel" name="labelWalletStatus"> <layout class="QFormLayout" name="formLayout_2">
<property name="font"> <property name="fieldGrowthPolicy">
<font> <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="toolTip"> <property name="horizontalSpacing">
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string> <number>12</number>
</property> </property>
<property name="text"> <property name="verticalSpacing">
<string notr="true">(out of sync)</string> <number>12</number>
</property> </property>
</widget> <item row="0" column="0">
</item> <widget class="QLabel" name="label">
<item row="1" column="0"> <property name="text">
<widget class="QLabel" name="label"> <string>Balance:</string>
<property name="text"> </property>
<string>Balance:</string> </widget>
</property> </item>
</widget> <item row="0" column="1">
</item> <widget class="QLabel" name="labelBalance">
<item row="1" column="1"> <property name="font">
<widget class="QLabel" name="labelBalance"> <font>
<property name="font"> <weight>75</weight>
<font> <bold>true</bold>
<weight>75</weight> </font>
<bold>true</bold> </property>
</font> <property name="cursor">
</property> <cursorShape>IBeamCursor</cursorShape>
<property name="cursor"> </property>
<cursorShape>IBeamCursor</cursorShape> <property name="toolTip">
</property> <string>Your current balance</string>
<property name="toolTip"> </property>
<string>Your current balance</string> <property name="text">
</property> <string notr="true">123.456 BTC</string>
<property name="text"> </property>
<string notr="true">123.456 BTC</string> <property name="textInteractionFlags">
</property> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
<property name="textInteractionFlags"> </property>
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> </widget>
</property> </item>
</widget> <item row="1" column="0">
</item> <widget class="QLabel" name="label_3">
<item row="2" column="0"> <property name="text">
<widget class="QLabel" name="label_3"> <string>Unconfirmed:</string>
<property name="text"> </property>
<string>Unconfirmed:</string> </widget>
</property> </item>
</widget> <item row="1" column="1">
</item> <widget class="QLabel" name="labelUnconfirmed">
<item row="2" column="1"> <property name="font">
<widget class="QLabel" name="labelUnconfirmed"> <font>
<property name="font"> <weight>75</weight>
<font> <bold>true</bold>
<weight>75</weight> </font>
<bold>true</bold> </property>
</font> <property name="cursor">
</property> <cursorShape>IBeamCursor</cursorShape>
<property name="cursor"> </property>
<cursorShape>IBeamCursor</cursorShape> <property name="toolTip">
</property> <string>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</string>
<property name="toolTip"> </property>
<string>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</string> <property name="text">
</property> <string notr="true">0 BTC</string>
<property name="text"> </property>
<string notr="true">0 BTC</string> <property name="textInteractionFlags">
</property> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
<property name="textInteractionFlags"> </property>
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> </widget>
</property> </item>
</widget> <item row="2" column="0">
</item> <widget class="QLabel" name="label_2">
<item row="3" column="0"> <property name="text">
<widget class="QLabel" name="label_2"> <string>Number of transactions:</string>
<property name="text"> </property>
<string>Number of transactions:</string> </widget>
</property> </item>
</widget> <item row="2" column="1">
</item> <widget class="QLabel" name="labelNumTransactions">
<item row="3" column="1"> <property name="toolTip">
<widget class="QLabel" name="labelNumTransactions"> <string>Total number of transactions in wallet</string>
<property name="toolTip"> </property>
<string>Total number of transactions in wallet</string> <property name="text">
</property> <string notr="true">0</string>
<property name="text"> </property>
<string notr="true">0</string> </widget>
</property> </item>
</widget> </layout>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -167,52 +188,69 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item row="0" column="0"> <item>
<widget class="QLabel" name="label_4"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="text"> <item>
<string>&lt;b&gt;Recent transactions&lt;/b&gt;</string> <widget class="QLabel" name="label_4">
</property> <property name="text">
</widget> <string>&lt;b&gt;Recent transactions&lt;/b&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelTransactionsStatus">
<property name="toolTip">
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string>
</property>
<property name="styleSheet">
<string notr="true">QLabel { color: red; }</string>
</property>
<property name="text">
<string notr="true">(out of sync)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<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>
<item row="0" column="1"> <item>
<widget class="QLabel" name="labelTransactionsStatus"> <widget class="QListView" name="listTransactions">
<property name="font"> <property name="styleSheet">
<font> <string notr="true">QListView { background: transparent; }</string>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="toolTip"> <property name="frameShape">
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="text"> <property name="verticalScrollBarPolicy">
<string notr="true">(out of sync)</string> <enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QListView" name="listTransactions">
<property name="styleSheet">
<string notr="true">QListView { background: transparent; }</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="verticalSpacer_2">
<property name="orientation"> <property name="orientation">

View File

@ -108,9 +108,7 @@ OverviewPage::OverviewPage(QWidget *parent) :
// init "out of sync" warning labels // init "out of sync" warning labels
ui->labelWalletStatus->setText("(" + tr("out of sync") + ")"); ui->labelWalletStatus->setText("(" + tr("out of sync") + ")");
ui->labelWalletStatus->setStyleSheet("QLabel { color: red; }");
ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")"); ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")");
ui->labelTransactionsStatus->setStyleSheet("QLabel { color: red; }");
// start with displaying the "out of sync" warnings // start with displaying the "out of sync" warnings
showOutOfSyncWarning(true); showOutOfSyncWarning(true);