mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
* Updated 'What's New' design.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>
|
* Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>
|
||||||
|
* Copyright 2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -30,25 +31,6 @@
|
|||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
using namespace Tomahawk::Widgets;
|
using namespace Tomahawk::Widgets;
|
||||||
|
|
||||||
const char* activeWidgetThumbStylesheet = "QWidget {"
|
|
||||||
"border-width: 2px;"
|
|
||||||
"border-style: solid;"
|
|
||||||
"border-radius: 4px;"
|
|
||||||
"border-color: white;"
|
|
||||||
"color: white;"
|
|
||||||
"border-bottom: none;"
|
|
||||||
"border-bottom-right-radius: 0px;"
|
|
||||||
"border-bottom-left-radius: 0px;"
|
|
||||||
"background-color:#292f34;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
const char* inactiveWidgetThumbStylesheet = " QWidget {"
|
|
||||||
"border-width: 2px;"
|
|
||||||
"border-style: solid;"
|
|
||||||
"border-radius: 4px;"
|
|
||||||
"border-color: grey;"
|
|
||||||
"color: grey;"
|
|
||||||
"}";
|
|
||||||
|
|
||||||
WhatsNew_0_8::WhatsNew_0_8( QWidget* parent )
|
WhatsNew_0_8::WhatsNew_0_8( QWidget* parent )
|
||||||
{
|
{
|
||||||
@@ -61,6 +43,7 @@ WhatsNew_0_8::~WhatsNew_0_8()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
WhatsNew_0_8::addPageItem() const
|
WhatsNew_0_8::addPageItem() const
|
||||||
{
|
{
|
||||||
@@ -82,17 +65,13 @@ WhatsNewWidget_0_8::WhatsNewWidget_0_8( QWidget* parent )
|
|||||||
QWidget* widget = new QWidget;
|
QWidget* widget = new QWidget;
|
||||||
ui->setupUi( widget );
|
ui->setupUi( widget );
|
||||||
|
|
||||||
ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
|
||||||
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
QScrollArea* area = new QScrollArea();
|
QScrollArea* area = new QScrollArea();
|
||||||
area->setWidgetResizable( true );
|
area->setWidgetResizable( true );
|
||||||
area->setWidget( widget );
|
area->setWidget( widget );
|
||||||
|
|
||||||
QPalette pal = palette();
|
QPalette pal = palette();
|
||||||
pal.setBrush( backgroundRole(), TomahawkStyle::HEADER_BACKGROUND );
|
pal.setBrush( backgroundRole(), Qt::white );
|
||||||
area->setPalette( pal );
|
area->setPalette( pal );
|
||||||
area->setAutoFillBackground( true );
|
area->setAutoFillBackground( true );
|
||||||
area->setFrameShape( QFrame::NoFrame );
|
area->setFrameShape( QFrame::NoFrame );
|
||||||
@@ -105,81 +84,72 @@ WhatsNewWidget_0_8::WhatsNewWidget_0_8( QWidget* parent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
QPalette pal = palette();
|
ui->inboxButton->setFixedSize( QSize( 80, 80 ) );
|
||||||
pal.setBrush( backgroundRole(), TomahawkStyle::PAGE_BACKGROUND );
|
QPixmap inboxPixmap = ImageRegistry::instance()->pixmap( ":/whatsnew_0_8/data/images/inboxbutton.png", ui->inboxButton->size() );
|
||||||
ui->widget->setPalette( pal );
|
ui->inboxButton->setPixmap( inboxPixmap );
|
||||||
ui->widget->setAutoFillBackground( true );
|
connect( ui->inboxButton, SIGNAL( clicked() ), SLOT( inboxBoxClicked() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
QPixmap inboxPixmap = ImageRegistry::instance()->pixmap( RESPATH "images/inbox.svg", QSize( 64, 64 ) );
|
ui->linkButton->setFixedSize( QSize( 80, 80 ) );
|
||||||
ui->inboxBoxImage->setPixmap( inboxPixmap );
|
QPixmap pixmap = ImageRegistry::instance()->pixmap( ":/whatsnew_0_8/data/images/connectivitybutton.png", ui->inboxButton->size() );
|
||||||
|
ui->linkButton->setPixmap( pixmap );
|
||||||
connect( ui->inboxBoxHeader, SIGNAL( clicked() ), SLOT( inboxBoxClicked() ) );
|
connect( ui->linkButton, SIGNAL( clicked() ), SLOT( urlLookupBoxClicked() ) );
|
||||||
connect( ui->inboxBoxImage, SIGNAL( clicked() ), SLOT( inboxBoxClicked() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
connect( ui->urlLookupBoxHeader, SIGNAL( clicked() ), SLOT( urlLookupBoxClicked() ) );
|
ui->beatsButton->setFixedSize( QSize( 80, 80 ) );
|
||||||
connect( ui->urlLookupBoxImage, SIGNAL( clicked() ), SLOT( urlLookupBoxClicked() ) );
|
QPixmap beatsPixmap = ImageRegistry::instance()->pixmap( ":/whatsnew_0_8/data/images/beatsbutton.png", ui->inboxButton->size() );
|
||||||
|
ui->beatsButton->setPixmap( beatsPixmap );
|
||||||
|
connect( ui->beatsButton, SIGNAL( clicked() ), SLOT( beatsBoxClicked() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
QPixmap trendingPixmap = ImageRegistry::instance()->pixmap( RESPATH "images/trending.svg", QSize( 64, 64 ) );
|
ui->googleButton->setFixedSize( QSize( 80, 80 ) );
|
||||||
ui->trendingBoxImage->setPixmap( trendingPixmap );
|
QPixmap pixmap = ImageRegistry::instance()->pixmap( ":/whatsnew_0_8/data/images/googlebutton.png", ui->inboxButton->size() );
|
||||||
|
ui->googleButton->setPixmap( pixmap );
|
||||||
connect( ui->trendingBoxHeader, SIGNAL( clicked() ), SLOT( trendingBoxClicked() ) );
|
connect( ui->googleButton, SIGNAL( clicked() ), SLOT( gmusicBoxClicked() ) );
|
||||||
connect( ui->trendingBoxImage, SIGNAL( clicked() ), SLOT( trendingBoxClicked() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
QPixmap beatsPixmap = ImageRegistry::instance()->pixmap( RESPATH "images/beatsmusic.svg", QSize( 64, 64 ) );
|
ui->androidButton->setFixedSize( QSize( 80, 80 ) );
|
||||||
ui->beatsBoxImage->setPixmap( beatsPixmap );
|
QPixmap pixmap = ImageRegistry::instance()->pixmap( ":/whatsnew_0_8/data/images/androidbutton.png", ui->inboxButton->size() );
|
||||||
|
ui->androidButton->setPixmap( pixmap );
|
||||||
connect( ui->beatsBoxHeader, SIGNAL( clicked() ), SLOT( beatsBoxClicked() ) );
|
connect( ui->androidButton, SIGNAL( clicked() ), SLOT( androidBoxClicked() ) );
|
||||||
connect( ui->beatsBoxImage, SIGNAL( clicked() ), SLOT( beatsBoxClicked() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// TODO: Add GMusic Pixmap
|
ui->networkButton->setFixedSize( QSize( 80, 80 ) );
|
||||||
|
QPixmap networkingPixmap = ImageRegistry::instance()->pixmap( ":/whatsnew_0_8/data/images/networkbutton.png", ui->inboxButton->size() );
|
||||||
connect( ui->gmusicBoxHeader, SIGNAL( clicked() ), SLOT( gmusicBoxClicked() ) );
|
ui->networkButton->setPixmap( networkingPixmap );
|
||||||
connect( ui->gmusicBoxImage, SIGNAL( clicked() ), SLOT( gmusicBoxClicked() ) );
|
connect( ui->networkButton, SIGNAL( clicked() ), SLOT( networkingBoxClicked() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
QPixmap networkingPixmap = ImageRegistry::instance()->pixmap( RESPATH "images/ipv6-logo.svg", QSize( 64, 64 ) );
|
QFont font = ui->label->font();
|
||||||
ui->networkingBoxImage->setPixmap( networkingPixmap );
|
font.setWeight( QFont::Light );
|
||||||
|
font.setPointSize( 48 );
|
||||||
connect( ui->networkingBoxHeader, SIGNAL( clicked() ), SLOT( networkingBoxClicked() ) );
|
ui->label->setFont( font );
|
||||||
connect( ui->networkingBoxImage, SIGNAL( clicked() ), SLOT( networkingBoxClicked() ) );
|
ui->label->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 60% ) }" );
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
connect( ui->designBoxHeader, SIGNAL( clicked() ), SLOT( designBoxClicked() ) );
|
|
||||||
connect( ui->designBoxImage, SIGNAL( clicked() ), SLOT( designBoxClicked() ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
connect( ui->androidBoxHeader, SIGNAL( clicked() ), SLOT( androidBoxClicked() ) );
|
|
||||||
connect( ui->androidBoxImage, SIGNAL( clicked() ), SLOT( androidBoxClicked() ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
QFont font = ui->label_2->font();
|
|
||||||
|
|
||||||
int fontSize = TomahawkUtils::defaultFontSize() + 2;
|
|
||||||
font.setPointSize( fontSize );
|
|
||||||
font.setFamily( "Titillium Web" );
|
|
||||||
|
|
||||||
|
font.setWeight( QFont::Normal );
|
||||||
|
font.setPointSize( 11 );
|
||||||
ui->label_2->setFont( font );
|
ui->label_2->setFont( font );
|
||||||
|
ui->label_2->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 30% ) }" );
|
||||||
|
|
||||||
|
font.setPointSize( 12 );
|
||||||
ui->label_3->setFont( font );
|
ui->label_3->setFont( font );
|
||||||
|
ui->label_3->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 65% ) }" );
|
||||||
ui->label_5->setFont( font );
|
ui->label_5->setFont( font );
|
||||||
|
ui->label_5->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 65% ) }" );
|
||||||
|
ui->label_6->setFont( font );
|
||||||
|
ui->label_6->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 65% ) }" );
|
||||||
ui->label_7->setFont( font );
|
ui->label_7->setFont( font );
|
||||||
|
ui->label_7->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 65% ) }" );
|
||||||
|
ui->label_8->setFont( font );
|
||||||
|
ui->label_8->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 65% ) }" );
|
||||||
ui->label_9->setFont( font );
|
ui->label_9->setFont( font );
|
||||||
ui->label_11->setFont( font );
|
ui->label_9->setStyleSheet( "QLabel { color: rgba( 0, 0, 0, 65% ) }" );
|
||||||
ui->label_13->setFont( font );
|
|
||||||
ui->label_17->setFont( font );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,56 +200,38 @@ WhatsNewWidget_0_8::changeEvent( QEvent* e )
|
|||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::inboxBoxClicked()
|
WhatsNewWidget_0_8::inboxBoxClicked()
|
||||||
{
|
{
|
||||||
activateBox( ui->inboxBox, 0 );
|
activateBox( ui->inboxCaption, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::urlLookupBoxClicked()
|
WhatsNewWidget_0_8::urlLookupBoxClicked()
|
||||||
{
|
{
|
||||||
activateBox( ui->urlLookupBox, 1 );
|
activateBox( ui->linkCaption, 1 );
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
WhatsNewWidget_0_8::trendingBoxClicked()
|
|
||||||
{
|
|
||||||
activateBox( ui->trendingBox, 2 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::beatsBoxClicked()
|
WhatsNewWidget_0_8::beatsBoxClicked()
|
||||||
{
|
{
|
||||||
activateBox( ui->beatsBox, 3 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::gmusicBoxClicked()
|
WhatsNewWidget_0_8::gmusicBoxClicked()
|
||||||
{
|
{
|
||||||
activateBox( ui->gmusicBox, 4 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::networkingBoxClicked()
|
WhatsNewWidget_0_8::networkingBoxClicked()
|
||||||
{
|
{
|
||||||
activateBox( ui->networkingBox, 5 );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
WhatsNewWidget_0_8::designBoxClicked()
|
|
||||||
{
|
|
||||||
activateBox( ui->designBox, 6 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::androidBoxClicked()
|
WhatsNewWidget_0_8::androidBoxClicked()
|
||||||
{
|
{
|
||||||
activateBox( ui->androidBox, 8 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -288,32 +240,32 @@ WhatsNewWidget_0_8::activateBox( QWidget* widget, int activeIndex )
|
|||||||
{
|
{
|
||||||
deactivateAllBoxes();
|
deactivateAllBoxes();
|
||||||
|
|
||||||
widget->layout()->setContentsMargins( 8, 8, 8, 16 );
|
/* widget->layout()->setContentsMargins( 8, 8, 8, 16 );
|
||||||
widget->setStyleSheet( activeWidgetThumbStylesheet );
|
widget->setStyleSheet( activeWidgetThumbStylesheet );
|
||||||
|
|
||||||
ui->stackedWidget->setCurrentIndex( activeIndex );
|
ui->stackedWidget->setCurrentIndex( activeIndex );*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::deactivateBox( QWidget* widget )
|
WhatsNewWidget_0_8::deactivateBox( QWidget* widget )
|
||||||
{
|
{
|
||||||
widget->layout()->setContentsMargins( 8, 8, 8, 8 );
|
/* widget->layout()->setContentsMargins( 8, 8, 8, 8 );
|
||||||
widget->setStyleSheet( inactiveWidgetThumbStylesheet );
|
widget->setStyleSheet( inactiveWidgetThumbStylesheet );*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WhatsNewWidget_0_8::deactivateAllBoxes()
|
WhatsNewWidget_0_8::deactivateAllBoxes()
|
||||||
{
|
{
|
||||||
deactivateBox( ui->inboxBox );
|
/* deactivateBox( ui->inboxBox );
|
||||||
deactivateBox( ui->urlLookupBox );
|
deactivateBox( ui->urlLookupBox );
|
||||||
deactivateBox( ui->trendingBox );
|
deactivateBox( ui->trendingBox );
|
||||||
deactivateBox( ui->beatsBox );
|
deactivateBox( ui->beatsBox );
|
||||||
deactivateBox( ui->gmusicBox );
|
deactivateBox( ui->gmusicBox );
|
||||||
deactivateBox( ui->networkingBox );
|
deactivateBox( ui->networkingBox );
|
||||||
deactivateBox( ui->designBox );
|
deactivateBox( ui->designBox );
|
||||||
deactivateBox( ui->androidBox );
|
deactivateBox( ui->androidBox );*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -57,11 +57,9 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void inboxBoxClicked();
|
void inboxBoxClicked();
|
||||||
void urlLookupBoxClicked();
|
void urlLookupBoxClicked();
|
||||||
void trendingBoxClicked();
|
|
||||||
void beatsBoxClicked();
|
void beatsBoxClicked();
|
||||||
void gmusicBoxClicked();
|
void gmusicBoxClicked();
|
||||||
void networkingBoxClicked();
|
void networkingBoxClicked();
|
||||||
void designBoxClicked();
|
|
||||||
void androidBoxClicked();
|
void androidBoxClicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -95,7 +93,7 @@ public:
|
|||||||
|
|
||||||
int sortValue() { return 1; }
|
int sortValue() { return 1; }
|
||||||
|
|
||||||
bool showInfoBar() const { return true; }
|
bool showInfoBar() const { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -12,5 +12,11 @@
|
|||||||
<file>data/images/android.png</file>
|
<file>data/images/android.png</file>
|
||||||
<file>data/images/tomahawk-android.png</file>
|
<file>data/images/tomahawk-android.png</file>
|
||||||
<file>data/images/networking.png</file>
|
<file>data/images/networking.png</file>
|
||||||
|
<file>data/images/connectivitybutton.png</file>
|
||||||
|
<file>data/images/androidbutton.png</file>
|
||||||
|
<file>data/images/googlebutton.png</file>
|
||||||
|
<file>data/images/beatsbutton.png</file>
|
||||||
|
<file>data/images/networkbutton.png</file>
|
||||||
|
<file>data/images/inboxbutton.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Reference in New Issue
Block a user