diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 8c094cb..3f70687 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -28,18 +28,6 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : tab(tab) { ui->setupUi(this); - GUI20Skin& gui20Skin = GUI20Skin::Instance(); - ui->exportButton->setStyleSheet("background-color: rgb (" + QString::number( gui20Skin.GetColorToolbarMainGradientBegin().red() ) + - ", " + QString::number( gui20Skin.GetColorToolbarMainGradientBegin().green() ) + - ", " + QString::number( gui20Skin.GetColorToolbarMainGradientBegin().blue() ) + - ");" \ - "color: rgb(255, 255, 255);" \ - "pressed" \ - "{" \ - "background-color: rgb(170, 28, 33);" \ - "}" - ); - qDebug() << ui->exportButton->styleSheet(); #ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac ui->newAddress->setIcon(QIcon()); ui->copyAddress->setIcon(QIcon()); diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc index a68e3ee..65a9830 100644 --- a/src/qt/bitcoin.qrc +++ b/src/qt/bitcoin.qrc @@ -59,6 +59,12 @@ res/icons/GUI20_mainToolBar_contacts.png res/icons/GUI20_mainToolBar_contacts_hover.png res/icons/prypto.png + res/icons/checkbox_tick.png + res/icons/adverts_arrow_bottom_hover.png + res/icons/adverts_arrow_bottom.png + res/icons/adverts_arrow_top.png + res/icons/adverts_arrow_top_hover.png + res/icons/radiobutton_tick.png res/images/about.png diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index d2198e6..9891334 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -74,6 +74,8 @@ BitcoinGUI::BitcoinGUI(QWidget *parent) : rpcConsole(0), prevBlocks(0) { + QApplication::setStyle(new CSCFusionStyle); + restoreWindowGeometry(); setWindowTitle(tr("CasinoCoin") + " - " + tr("Wallet")); #ifndef Q_OS_MAC @@ -167,7 +169,6 @@ BitcoinGUI::BitcoinGUI(QWidget *parent) : // Initially wallet actions should be disabled setWalletActionsEnabled(false); - QApplication::setStyle(new CSCFusionStyle); } BitcoinGUI::~BitcoinGUI() diff --git a/src/qt/cscfusionstyle.cpp b/src/qt/cscfusionstyle.cpp index a589bde..ebceaa4 100644 --- a/src/qt/cscfusionstyle.cpp +++ b/src/qt/cscfusionstyle.cpp @@ -1,43 +1,3 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - #include #include "cscfusionstyle.h" @@ -139,6 +99,22 @@ int CSCFusionStyle::pixelMetric(PixelMetric metric, { return 8; } + case PM_IndicatorHeight: + { + return 18; + } + case PM_IndicatorWidth: + { + return 18; + } + case PM_ExclusiveIndicatorWidth: + { + return 18; + } + case PM_ExclusiveIndicatorHeight: + { + return 18; + } case PM_ScrollBarExtent: { return QProxyStyle::pixelMetric(metric, option, widget) + 4; @@ -168,9 +144,9 @@ int CSCFusionStyle::styleHint(StyleHint hint, const QStyleOption *option, { return int(true); } - case SH_ComboBox_Popup: + case SH_ScrollView_FrameOnlyAroundContents: { - qDebug() << "yep, there are some comboboxes!"; + return int(true); } default: { @@ -184,6 +160,8 @@ void CSCFusionStyle::drawPrimitive(PrimitiveElement element, QPainter *painter, const QWidget *widget) const { + GUI20Skin& skin = GUI20Skin::Instance(); + switch (element) { case PE_FrameDefaultButton: @@ -196,9 +174,6 @@ void CSCFusionStyle::drawPrimitive(PrimitiveElement element, } case PE_PanelItemViewRow: { - int x, y, width, height; - option->rect.getRect(&x, &y, &width, &height); - QPainterPath roundRect = roundRectPath(option->rect, 0); QBrush brush = option->palette.base(); @@ -208,6 +183,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" ); + } + + 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: @@ -224,6 +239,55 @@ void CSCFusionStyle::drawPrimitive(PrimitiveElement element, painter->restore(); break; } + case PE_IndicatorRadioButton: + { + int x, y, width, height; + option->rect.getRect(&x, &y, &width, &height); + + QPainterPath roundRect = roundRectPath( QRect( x + 1, y + 1, width - 1, height - 1 ), ( width -1 ) / 2); + QPen pen( skin.GetColorToolbarMainGradientBegin(), 2 ); + painter->save(); + painter->setPen( pen ); + painter->setRenderHint(QPainter::Antialiasing, true); + painter->drawPath( roundRect ); + if ( option->state & QStyle::State_Off ) + { + } + else if ( option->state & QStyle::State_On ) + { + QImage checkboxTick( ":/icons/radiobuttonTick" ); + checkboxTick = checkboxTick.scaled( 10, 10 ); + int iTopLeftX = x + ( ( ( width - checkboxTick.width() ) / 2 ) ); + int iTopLeftY = y + ( ( ( height - checkboxTick.height() ) / 2 ) ); + painter->drawImage( QPoint( iTopLeftX, iTopLeftY ), checkboxTick ); + } + painter->restore(); + break; + } + case PE_IndicatorCheckBox: + { + int x, y, width, height; + option->rect.getRect(&x, &y, &width, &height); + + QPainterPath roundRect = roundRectPath( QRect( x + 1, y + 1, width - 1, height - 1 ), 2 ); + QPen pen( skin.GetColorToolbarMainGradientBegin(), 2 ); + painter->save(); + painter->setPen( pen ); + painter->setRenderHint(QPainter::Antialiasing, true); + painter->drawPath( roundRect ); + if ( option->state & QStyle::State_Off ) + { + } + else if ( option->state & QStyle::State_On ) + { + QImage checkboxTick( ":/icons/checkboxTick" ); + int iTopLeftX = x + ( ( ( width - checkboxTick.width() ) / 2 ) ); + int iTopLeftY = y + ( ( ( height - checkboxTick.height() ) / 2 ) ); + painter->drawImage( QPoint( iTopLeftX, iTopLeftY ), checkboxTick ); + } + painter->restore(); + break; + } case PE_PanelButtonTool: case PE_PanelButtonCommand: { @@ -237,9 +301,9 @@ void CSCFusionStyle::drawPrimitive(PrimitiveElement element, int x, y, width, height; option->rect.getRect(&x, &y, &width, &height); - QPainterPath roundRect = roundRectPath(option->rect, 5 ); - int radius = 5; + QPainterPath roundRect = roundRectPath( QRect( x + 1, y + 1, width - 1, height - 1 ), radius ); + QBrush brush; @@ -377,5 +441,4 @@ QPainterPath CSCFusionStyle::roundRectPath(const QRect &rect, int radius) path.closeSubpath(); return path; } -//! [40] diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index 90865ad..d298937 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -119,7 +119,12 @@ false - + background-color: rgb(170, 28, 33); +color: rgb(255, 255, 255); +pressed +{ +background-color: rgb(170, 28, 33); +} &Export diff --git a/src/qt/forms/infopage.ui b/src/qt/forms/infopage.ui index 9f9e6d4..acef11b 100644 --- a/src/qt/forms/infopage.ui +++ b/src/qt/forms/infopage.ui @@ -139,414 +139,478 @@ QFrame::Sunken - - - - 10 - 41 - 351 - 192 - - - - - 15 - - - 10 - - - 10 - - - 10 - - - 10 - - - 10 - - - - - color: rgb(0, 0, 0); - - - Current number of blocks + + + + + + MS Shell Dlg 2 + 10 + 75 + true + + + + color: rgb(166, 27, 31); + + + Information + + + + + + + + 0 + 0 + + + + Qt::ScrollBarAlwaysOn + + + Qt::ScrollBarAsNeeded + + + true + + + + + 0 + 0 + 343 + 217 + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + 15 + + + 10 + + + 10 + + + 10 + + + 10 + + + 10 + + + + + + + + Current number of blocks + + + true + + + + + + + + 75 + true + + + + + + + - + + + true + + + + + + + + + + Last block time + + + true + + + + + + + + 75 + true + + + + + + + - + + + true + + + + + + + + + + Coin Supply + + + true + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 75 + true + + + + + + + - + + + true + + + + + + + + + + Number of connections + + + true + + + + + + + + 75 + true + + + + + + + - + + + true + + + + + + + + + + Difficulty + + + true + + + + + + + + 75 + true + + + + + + + - + + + true + + + + + + + + + + Network Hashrate + + + true + + + + + + + + 75 + true + + + + + + + - + + + true + + + + + + + + + + Transactions + + + true + + + + + + + + 75 + true + + + + + + + - + + + true + + + + + + - - - - - color: rgb(0, 0, 0); - - - Last block time - - - - - - - color: rgb(0, 0, 0); - - - Coin Supply - - - - - - - color: rgb(0, 0, 0); - - - Number of connections - - - - - - - color: rgb(0, 0, 0); - - - Difficulty - - - - - - - - 75 - true - - - - color: rgb(0, 0, 0); - - - - - - - - - - - - 75 - true - - - - color: rgb(0, 0, 0); - - - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 75 - true - - - - color: rgb(0, 0, 0); - - - - - - - - - - - - 75 - true - - - - color: rgb(0, 0, 0); - - - - - - - - - - - - 75 - true - - - - color: rgb(0, 0, 0); - - - - - - - - - - - color: rgb(0, 0, 0); - - - Network Hashrate - - - - - - - - 75 - true - - - - color: rgb(0, 0, 0); - - - - - - - - - - - color: rgb(0, 0, 0); - - - Transactions - - - - - - - - 75 - true - - - - color: rgb(0, 0, 0); - - - - - - - - - - - - - 20 - 10 - 341 - 21 - - - - - MS Shell Dlg 2 - 10 - 75 - true - - - - color: rgb(166, 27, 31); - - - Information - - + + + diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui index a29b13f..cce8ecd 100644 --- a/src/qt/forms/optionsdialog.ui +++ b/src/qt/forms/optionsdialog.ui @@ -16,8 +16,8 @@ true - - + + QTabWidget::North @@ -31,59 +31,73 @@ - - - Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. - - - Qt::PlainText - - - true - + + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + Qt::PlainText + + + true + + + + - - - - - Pay transaction &fee - - - Qt::PlainText - - - transactionFee - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + + + Pay transaction &fee + + + Qt::PlainText + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - - - Automatically start CasinoCoin after logging in to the system. - - - &Start CasinoCoin on system login - + + + + + + Automatically start CasinoCoin after logging in to the system. + + + + + + &Start CasinoCoin on system login + + + + @@ -100,34 +114,36 @@ - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Reset all client options to default. - - - &Reset Options - - - false - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Reset all client options to default. + + + &Reset Options + + + false + + + + + @@ -137,114 +153,113 @@ - - - Automatically open the CasinoCoin client port on the router. This only works when your router supports UPnP and it is enabled. - - - Map port using &UPnP - + + + + + + Connect to the CasinoCoin network through a SOCKS proxy (e.g. when connecting through Tor). + + + &Connect through SOCKS proxy: + + + + + + + Automatically open the CasinoCoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + Map port using &UPnP + + + + - - - Connect to the CasinoCoin network through a SOCKS proxy (e.g. when connecting through Tor). - - - &Connect through SOCKS proxy: - + + + + + + Proxy &IP: + + + Qt::PlainText + + + + + + + &Port: + + + Qt::PlainText + + + + + + + SOCKS &Version: + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + SOCKS version of the proxy (e.g. 5) + + + + + + + + 140 + 16777215 + + + + IP address of the proxy (e.g. 127.0.0.1) + + + + + + + + 55 + 16777215 + + + + Port of the proxy (e.g. 9050) + + + + - - - - - - Proxy &IP: - - - Qt::PlainText - - - proxyIp - - - - - - - - 140 - 16777215 - - - - IP address of the proxy (e.g. 127.0.0.1) - - - - - - - &Port: - - - Qt::PlainText - - - proxyPort - - - - - - - - 55 - 16777215 - - - - Port of the proxy (e.g. 9050) - - - - - - - SOCKS &Version: - - - Qt::PlainText - - - socksVersion - - - - - - - SOCKS version of the proxy (e.g. 5) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -266,23 +281,29 @@ - - - Show only a tray icon after minimizing the window. - - - &Minimize to the tray instead of the taskbar - - - - - - - Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu. - - - M&inimize on close - + + + + + + Show only a tray icon after minimizing the window. + + + &Minimize to the tray instead of the taskbar + + + + + + + Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu. + + + M&inimize on close + + + + @@ -304,231 +325,196 @@ &Display - - - - 10 - 100 - 491 - 20 - - - - Whether to show CasinoCoin addresses in the transaction list or not. - - - &Display addresses in transaction list - - - - - - 10 - 130 - 491 - 20 - - - - Whether to show coin control features or not. - - - Display coin &control features (experts only!) - - - - - - 10 - 70 - 491 - 29 - - - - - - - Currency to show amounts in: - - - Qt::PlainText - - - currency - - - - - - - Choose the default currency in which to show your total coin value. - - - - - - - - - 11 - 11 - 491 - 29 - - - - - QLayout::SetMaximumSize - - - - - User Interface &language: - - - Qt::PlainText - - - lang - - - - - - - The user interface language can be set here. This setting will take effect after restarting CasinoCoin. - - - - - - - - - 11 - 42 - 491 - 29 - - - - - - - &Unit to show amounts in: - - - Qt::PlainText - - - unit - - - - - - - Choose the default subdivision unit to show in the interface and when sending coins. - - - - - - - - - 10 - 160 - 491 - 20 - - - - Whether to show casino promotions on the overview page or not. - - - Display casino promotions - - + + + + + + + + QLayout::SetMaximumSize + + + + + User Interface &language: + + + Qt::PlainText + + + + + + + The user interface language can be set here. This setting will take effect after restarting CasinoCoin. + + + + + + + + + + + &Unit to show amounts in: + + + Qt::PlainText + + + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + + + + + + + Currency to show amounts in: + + + Qt::PlainText + + + + + + + Choose the default currency in which to show your total coin value. + + + + + + + + + + + + + + + Whether to show CasinoCoin addresses in the transaction list or not. + + + &Display addresses in transaction list + + + + + + + Whether to show coin control features or not. + + + Display coin &control features (experts only!) + + + + + + + Whether to show casino promotions on the overview page or not. + + + Display casino promotions + + + + + + + - - - - - - Qt::Horizontal - - - - 40 - 48 - - - - - - - - - 75 - true - - - - - - - Qt::PlainText - - - true - - - - - - - Qt::Horizontal - - - - 40 - 48 - - - - - - - - &OK - - - - - - - &Cancel - - - false - - - - - - - &Apply - - - false - - - - + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + + 75 + true + + + + + + + Qt::PlainText + + + true + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + &OK + + + + + + + &Cancel + + + false + + + + + + + &Apply + + + false + + + + + diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui index d1bde90..41a04b3 100644 --- a/src/qt/forms/sendcoinsentry.ui +++ b/src/qt/forms/sendcoinsentry.ui @@ -49,9 +49,6 @@ - - - @@ -177,6 +174,16 @@ + + + + + 0 + 0 + + + + diff --git a/src/qt/res/icons/GUI20_mainToolBar_redeemprypto.png b/src/qt/res/icons/GUI20_mainToolBar_redeemprypto.png index 3c3631c..ec992c4 100644 Binary files a/src/qt/res/icons/GUI20_mainToolBar_redeemprypto.png and b/src/qt/res/icons/GUI20_mainToolBar_redeemprypto.png differ diff --git a/src/qt/res/icons/adverts_arrow_bottom.png b/src/qt/res/icons/adverts_arrow_bottom.png new file mode 100644 index 0000000..a4a181f Binary files /dev/null and b/src/qt/res/icons/adverts_arrow_bottom.png differ diff --git a/src/qt/res/icons/adverts_arrow_bottom_hover.png b/src/qt/res/icons/adverts_arrow_bottom_hover.png new file mode 100644 index 0000000..7e1907c Binary files /dev/null and b/src/qt/res/icons/adverts_arrow_bottom_hover.png differ diff --git a/src/qt/res/icons/adverts_arrow_top.png b/src/qt/res/icons/adverts_arrow_top.png new file mode 100644 index 0000000..de85a9f Binary files /dev/null and b/src/qt/res/icons/adverts_arrow_top.png differ diff --git a/src/qt/res/icons/adverts_arrow_top_hover.png b/src/qt/res/icons/adverts_arrow_top_hover.png new file mode 100644 index 0000000..77848e5 Binary files /dev/null and b/src/qt/res/icons/adverts_arrow_top_hover.png differ diff --git a/src/qt/res/icons/checkbox_tick.png b/src/qt/res/icons/checkbox_tick.png new file mode 100644 index 0000000..cf704d4 Binary files /dev/null and b/src/qt/res/icons/checkbox_tick.png differ diff --git a/src/qt/res/icons/radiobutton_tick.png b/src/qt/res/icons/radiobutton_tick.png new file mode 100644 index 0000000..012c097 Binary files /dev/null and b/src/qt/res/icons/radiobutton_tick.png differ