UI changes - Calendar widget, BitcoinAmountField styling, other minor fixes

This commit is contained in:
felixrojauro
2015-11-26 16:27:54 +01:00
parent 849a807d38
commit 18f49ef4e5
12 changed files with 781 additions and 317 deletions

View File

@@ -264,7 +264,9 @@ HEADERS += src/qt/bitcoingui.h \
src/qt/CSCPublicAPI/casinocoinwebapi.h \
src/qt/CSCPublicAPI/casinocoinwebapiparser.h \
src/qt/CSCPublicAPI/jsonactivepromotionsparser.h \
src/qt/CSCPublicAPI/jsonactiveexchangesparser.h \
src/qt/CSCPublicAPI/jsonsingleactivepromotion.h \
src/qt/CSCPublicAPI/jsonsingleactiveexchange.h \
src/qt/qtquick_controls/cpp/guibannercontrol.h \
src/qt/qtquick_controls/cpp/guibannerlistview.h \
src/qt/qtquick_controls/cpp/guibannerwidget.h \
@@ -359,7 +361,9 @@ SOURCES += src/qt/bitcoin.cpp \
src/qt/CSCPublicAPI/casinocoinwebapi.cpp \
src/qt/CSCPublicAPI/casinocoinwebapiparser.cpp \
src/qt/CSCPublicAPI/jsonactivepromotionsparser.cpp \
src/qt/CSCPublicAPI/jsonactiveexchangesparser.cpp \
src/qt/CSCPublicAPI/jsonsingleactivepromotion.cpp \
src/qt/CSCPublicAPI/jsonsingleactiveexchange.cpp \
src/qt/qtquick_controls/cpp/guibannercontrol.cpp \
src/qt/qtquick_controls/cpp/guibannerlistview.cpp \
src/qt/qtquick_controls/cpp/guibannerwidget.cpp \

View File

@@ -60,10 +60,10 @@
<file>res/icons/GUI20_mainToolBar_contacts_hover.png</file>
<file>res/icons/prypto.png</file>
<file alias="checkboxTick">res/icons/checkbox_tick.png</file>
<file alias="advertsArrowBottomHover">res/icons/adverts_arrow_bottom_hover.png</file>
<file alias="advertsArrowBottom">res/icons/adverts_arrow_bottom.png</file>
<file alias="advertsArrowTop">res/icons/adverts_arrow_top.png</file>
<file alias="advertsArrowTopHover">res/icons/adverts_arrow_top_hover.png</file>
<file alias="advertsArrowDownHover">res/icons/adverts_arrow_bottom_hover.png</file>
<file alias="advertsArrowDown">res/icons/adverts_arrow_bottom.png</file>
<file alias="advertsArrowUp">res/icons/adverts_arrow_top.png</file>
<file alias="advertsArrowUpHover">res/icons/adverts_arrow_top_hover.png</file>
<file alias="radiobuttonTick">res/icons/radiobutton_tick.png</file>
</qresource>
<qresource prefix="/images">

View File

@@ -13,19 +13,22 @@
BitcoinAmountField::BitcoinAmountField(QWidget *parent):
QWidget(parent), amount(0), currentUnit(-1)
{
unit = new QValueComboBox(this);
unit->setModel(new BitcoinUnits(this));
unit->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
amount = new QDoubleSpinBox(this);
amount->setLocale(QLocale::c());
amount->setDecimals(8);
amount->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
amount->installEventFilter(this);
amount->setMaximumWidth(170);
amount->setSingleStep(0.001);
QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(amount);
unit = new QValueComboBox(this);
unit->setModel(new BitcoinUnits(this));
layout->addWidget(unit);
layout->addStretch(1);
// layout->addStretch(1);
layout->setContentsMargins(0,0,0,0);
setLayout(layout);

View File

@@ -92,25 +92,16 @@ int CSCFusionStyle::pixelMetric(PixelMetric metric,
switch (metric)
{
case PM_DefaultFrameWidth:
{
return 8;
}
case PM_ComboBoxFrameWidth:
case PM_SpinBoxFrameWidth:
case PM_CheckBoxLabelSpacing:
case PM_HeaderMargin:
{
return 8;
}
case PM_IndicatorHeight:
{
return 18;
}
case PM_IndicatorWidth:
{
return 18;
}
case PM_ExclusiveIndicatorWidth:
{
return 18;
}
case PM_ExclusiveIndicatorHeight:
{
return 18;
@@ -144,10 +135,6 @@ int CSCFusionStyle::styleHint(StyleHint hint, const QStyleOption *option,
{
return int(true);
}
case SH_ScrollView_FrameOnlyAroundContents:
{
return int(true);
}
default:
{
return QProxyStyle::styleHint(hint, option, widget, returnData);
@@ -183,46 +170,46 @@ void CSCFusionStyle::drawPrimitive(PrimitiveElement element,
painter->restore();
break;
}
case PE_IndicatorArrowDown:
case PE_IndicatorArrowUp:
case PE_IndicatorArrowLeft:
case PE_IndicatorArrowRight:
{
int x, y, width, height;
option->rect.getRect(&x, &y, &width, &height);
painter->save();
painter->setRenderHint(QPainter::Antialiasing, true);
QImage imgArrow;
QString strPath = ":/icons/advertsArrow";
if ( element == PE_IndicatorArrowDown )
{
strPath.append( "Down" );
}
else if ( element == PE_IndicatorArrowLeft )
{
strPath.append( "Left" );
}
else if ( element == PE_IndicatorArrowUp )
{
strPath.append( "Top" );
}
else if ( element == PE_IndicatorArrowRight )
{
strPath.append( "Right" );
}
// case PE_IndicatorArrowDown:
// case PE_IndicatorArrowUp:
// case PE_IndicatorArrowLeft:
// case PE_IndicatorArrowRight:
// {
// int x, y, width, height;
// option->rect.getRect(&x, &y, &width, &height);
// painter->save();
// painter->setRenderHint(QPainter::Antialiasing, true);
// QImage imgArrow;
// QString strPath = ":/icons/advertsArrow";
// if ( element == PE_IndicatorArrowDown || PE_IndicatorSpinDown || PE_IndicatorSpinMinus )
// {
// strPath.append( "Down" );
// }
// else if ( element == PE_IndicatorArrowLeft )
// {
// strPath.append( "Left" );
// }
// else if ( element == PE_IndicatorArrowUp || PE_IndicatorSpinUp || PE_IndicatorSpinPlus )
// {
// strPath.append( "Up" );
// }
// else if ( element == PE_IndicatorArrowRight )
// {
// strPath.append( "Right" );
// }
if ( option->state & QStyle::State_MouseOver )
{
strPath.append( "Hover" );
}
qDebug() << "gonna draw: " << strPath;
imgArrow.load( strPath );
int iTopLeftX = x + ( ( ( width - imgArrow.width() ) / 2 ) );
int iTopLeftY = y + ( ( ( height - imgArrow.height() ) / 2 ) );
painter->drawImage( QPoint( iTopLeftX, iTopLeftY), imgArrow );
painter->restore();
break;
}
// if ( option->state & QStyle::State_MouseOver )
// {
// strPath.append( "Hover" );
// }
// qDebug() << "gonna draw: " << strPath;
// imgArrow.load( strPath );
// int iTopLeftX = x + ( ( ( width - imgArrow.width() ) / 2 ) );
// int iTopLeftY = y + ( ( ( height - imgArrow.height() ) / 2 ) );
// painter->drawImage( QPoint( iTopLeftX, iTopLeftY), imgArrow );
// painter->restore();
// break;
// }
case PE_FrameGroupBox:
case PE_FrameWindow:
case PE_Frame:
@@ -288,7 +275,6 @@ void CSCFusionStyle::drawPrimitive(PrimitiveElement element,
painter->restore();
break;
}
case PE_PanelButtonTool:
case PE_PanelButtonCommand:
{
GUI20Skin& skin = GUI20Skin::Instance();
@@ -304,7 +290,6 @@ void CSCFusionStyle::drawPrimitive(PrimitiveElement element,
int radius = 5;
QPainterPath roundRect = roundRectPath( QRect( x + 1, y + 1, width - 1, height - 1 ), radius );
QBrush brush;
if (option->state & (State_Sunken | State_On))

View File

@@ -123,7 +123,7 @@
color: rgb(255, 255, 255);
pressed
{
background-color: rgb(170, 28, 33);
background-color: rgb(166, 27, 31);
}</string>
</property>
<property name="text">

View File

@@ -29,15 +29,15 @@
<property name="horizontalSpacing">
<number>15</number>
</property>
<item row="1" column="1">
<widget class="QFrame" name="casinoInfoBox">
<item row="1" column="0">
<widget class="QFrame" name="exchangeInfoBox">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<widget class="QLabel" name="lblCasinosHeader">
<widget class="QLabel" name="lblExchangesHeader">
<property name="geometry">
<rect>
<x>20</x>
@@ -57,11 +57,465 @@
<string notr="true">color: rgb(166, 27, 31);</string>
</property>
<property name="text">
<string>Casinos</string>
<string>Exchanges</string>
</property>
</widget>
</widget>
</item>
<item row="0" column="0">
<widget class="QFrame" name="coinInfoBox">
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<layout class="QFormLayout" name="formCoinDetails">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="horizontalSpacing">
<number>15</number>
</property>
<property name="verticalSpacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="lblBlockHeight">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Current number of blocks</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="txtBlockHeight">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string notr="true">-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblLastBlockTime">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Last block time</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="txtLastBlockTime">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string notr="true">-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblCoinSupply">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Coin Supply</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="txtCoinSupply">
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string notr="true">-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblConnections">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Number of connections</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="txtConnections">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string notr="true">-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lblDifficulty">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Difficulty</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="txtDifficulty">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string notr="true">-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="lblHashRate">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Network Hashrate</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="txtHashRate">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string notr="true">-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lblTransactionCount">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Transactions</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="txtTransactionCount">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string notr="true">-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblCasinosHeader_2">
<property name="font">
<font>
<family>MS Shell Dlg 2</family>
<pointsize>10</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(166, 27, 31);</string>
</property>
<property name="text">
<string>Information</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QFrame" name="newsItemsBox">
<property name="frameShape">
@@ -95,15 +549,15 @@
</widget>
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="exchangeInfoBox">
<item row="1" column="1">
<widget class="QFrame" name="casinoInfoBox">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<widget class="QLabel" name="lblExchangesHeader">
<widget class="QLabel" name="lblCasinosHeader">
<property name="geometry">
<rect>
<x>20</x>
@@ -123,7 +577,7 @@
<string notr="true">color: rgb(166, 27, 31);</string>
</property>
<property name="text">
<string>Exchanges</string>
<string>Casinos</string>
</property>
</widget>
</widget>

View File

@@ -60,24 +60,14 @@
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="buddy">
<cstring>transactionFee</cstring>
</property>
</widget>
</item>
<item>
<widget class="BitcoinAmountField" name="transactionFee"/>
</item>
<item>
<spacer name="horizontalSpacer_1_Main">
<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>
</widget>
</item>
@@ -179,7 +169,7 @@
</widget>
</item>
<item>
<widget class="QFrame" name="">
<widget class="QFrame" name="frame">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="proxyIpLabel">
@@ -189,6 +179,9 @@
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="buddy">
<cstring>proxyIp</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
@@ -199,6 +192,9 @@
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="buddy">
<cstring>proxyPort</cstring>
</property>
</widget>
</item>
<item row="2" column="0">
@@ -209,6 +205,9 @@
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="buddy">
<cstring>socksVersion</cstring>
</property>
</widget>
</item>
<item row="0" column="6">
@@ -248,7 +247,7 @@
<widget class="QLineEdit" name="proxyPort">
<property name="maximumSize">
<size>
<width>55</width>
<width>140</width>
<height>16777215</height>
</size>
</property>
@@ -342,6 +341,9 @@
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="buddy">
<cstring>lang</cstring>
</property>
</widget>
</item>
<item>
@@ -363,6 +365,9 @@
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="buddy">
<cstring>unit</cstring>
</property>
</widget>
</item>
<item>

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>782</width>
<height>406</height>
<width>805</width>
<height>550</height>
</rect>
</property>
<property name="windowTitle">

View File

@@ -753,6 +753,15 @@ background-color: rgb(166, 27, 31);
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
@@ -761,12 +770,12 @@ background-color: rgb(166, 27, 31);
<rect>
<x>0</x>
<y>0</y>
<width>826</width>
<height>143</height>
<width>832</width>
<height>169</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
@@ -783,6 +792,12 @@ background-color: rgb(166, 27, 31);
</property>
<item>
<widget class="QFrame" name="entries_2">
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="entries">
<property name="spacing">
<number>6</number>

View File

@@ -20,7 +20,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabSignMessage">
<attribute name="title">

View File

@@ -25,6 +25,7 @@
#include <QMenu>
#include <QLabel>
#include <QDateTimeEdit>
#include <QCalendarWidget>
TransactionView::TransactionView(QWidget *parent) :
QWidget(parent), model(0), transactionProxyModel(0),
@@ -44,11 +45,7 @@ TransactionView::TransactionView(QWidget *parent) :
#endif
dateWidget = new QComboBox(this);
#ifdef Q_OS_MAC
dateWidget->setFixedWidth(121);
#else
dateWidget->setFixedWidth(120);
#endif
dateWidget->addItem(tr("All"), All);
dateWidget->addItem(tr("Today"), Today);
dateWidget->addItem(tr("This week"), ThisWeek);
@@ -59,11 +56,6 @@ TransactionView::TransactionView(QWidget *parent) :
hlayout->addWidget(dateWidget);
typeWidget = new QComboBox(this);
#ifdef Q_OS_MAC
typeWidget->setFixedWidth(121);
#else
typeWidget->setFixedWidth(120);
#endif
typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES);
typeWidget->addItem(tr("Received with"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) |
@@ -87,11 +79,6 @@ TransactionView::TransactionView(QWidget *parent) :
#if QT_VERSION >= 0x040700
/* Do not move this to the XML file, Qt before 4.7 will choke on it */
amountWidget->setPlaceholderText(tr("Min amount"));
#endif
#ifdef Q_OS_MAC
amountWidget->setFixedWidth(97);
#else
amountWidget->setFixedWidth(100);
#endif
amountWidget->setValidator(new QDoubleValidator(0, 1e20, 8, this));
hlayout->addWidget(amountWidget);
@@ -381,9 +368,13 @@ void TransactionView::showDetails()
QWidget *TransactionView::createDateRangeWidget()
{
QString strCalendarsStyleSheet = "QToolButton {height: 60px; width: 120px;}\
QAbstractItemView {selection-background-color: #F5E5E5;selection-color: #000000;}\
QListView {background-color:white;}\
";
dateRangeWidget = new QFrame();
dateRangeWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
dateRangeWidget->setContentsMargins(1,1,1,1);
dateRangeWidget->setStyleSheet("");
QHBoxLayout *layout = new QHBoxLayout(dateRangeWidget);
layout->setContentsMargins(0,0,0,0);
layout->addSpacing(23);
@@ -392,6 +383,9 @@ QWidget *TransactionView::createDateRangeWidget()
dateFrom = new QDateTimeEdit(this);
dateFrom->setDisplayFormat("dd/MM/yy");
dateFrom->setCalendarPopup(true);
dateFrom->calendarWidget()->setStyleSheet( strCalendarsStyleSheet );
dateFrom->setMinimumWidth(100);
dateFrom->setDate(QDate::currentDate().addDays(-7));
layout->addWidget(dateFrom);
@@ -400,6 +394,9 @@ QWidget *TransactionView::createDateRangeWidget()
dateTo = new QDateTimeEdit(this);
dateTo->setDisplayFormat("dd/MM/yy");
dateTo->setCalendarPopup(true);
dateTo->calendarWidget()->setStyleSheet( strCalendarsStyleSheet );
dateTo->setMinimumWidth(100);
dateTo->setDate(QDate::currentDate());
layout->addWidget(dateTo);

View File

@@ -47,6 +47,7 @@ WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui):
vbox->addWidget(transactionView);
QPushButton *exportButton = new QPushButton(tr("&Export"), this);
exportButton->setToolTip(tr("Export the data in the current tab to a file"));
exportButton->setStyleSheet( "background-color: rgb(170, 28, 33);\ncolor: rgb(255, 255, 255);\npressed\n{\nbackground-color: rgb(166, 27, 31);\n}" );
#ifndef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
exportButton->setIcon(QIcon(":/icons/export"));
#endif