1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-20 12:52:30 +02:00

* StyleHelper doesn't exist anymore.

This commit is contained in:
Christian Muehlhaeuser
2013-04-29 18:15:12 +02:00
parent 55fd82bfd4
commit 4a221a79a4
10 changed files with 29 additions and 30 deletions

View File

@@ -106,7 +106,7 @@ set( libGuiSources
utils/ShortenedLinkParser.cpp utils/ShortenedLinkParser.cpp
utils/SoundcloudParser.cpp utils/SoundcloudParser.cpp
utils/ExfmParser.cpp utils/ExfmParser.cpp
utils/StyleHelper.cpp utils/TomahawkStyle.cpp
utils/DropJobNotifier.cpp utils/DropJobNotifier.cpp
utils/ProxyStyle.cpp utils/ProxyStyle.cpp
utils/TomahawkUtilsGui.cpp utils/TomahawkUtilsGui.cpp

View File

@@ -21,7 +21,7 @@
#include <QGraphicsLinearLayout> #include <QGraphicsLinearLayout>
#include "PlaylistInterface.h" #include "PlaylistInterface.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
using namespace Tomahawk; using namespace Tomahawk;
@@ -33,8 +33,8 @@ ContextProxyPage::paint( QPainter* painter, const QStyleOptionGraphicsItem* opti
painter->save(); painter->save();
painter->setRenderHint( QPainter::Antialiasing, true ); painter->setRenderHint( QPainter::Antialiasing, true );
painter->setPen( StyleHelper::headerHighlightColor() ); painter->setPen( TomahawkStyle::headerHighlightColor() );
painter->setBrush( StyleHelper::headerHighlightColor() ); painter->setBrush( TomahawkStyle::headerHighlightColor() );
painter->drawRoundedRect( option->rect, 4.0, 4.0 ); painter->drawRoundedRect( option->rect, 4.0, 4.0 );
QFont f( font() ); QFont f( font() );

View File

@@ -31,7 +31,7 @@
#include "Source.h" #include "Source.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#define ANIMATION_TIME 450 #define ANIMATION_TIME 450

View File

@@ -19,9 +19,9 @@
#include "Breadcrumb.h" #include "Breadcrumb.h"
#include "BreadcrumbButton.h" #include "BreadcrumbButton.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include "utils/Logger.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h"
#include <QStylePainter> #include <QStylePainter>
#include <QPushButton> #include <QPushButton>
@@ -83,7 +83,7 @@ void
Breadcrumb::paintEvent( QPaintEvent* ) Breadcrumb::paintEvent( QPaintEvent* )
{ {
QStylePainter p( this ); QStylePainter p( this );
StyleHelper::horizontalHeader( &p, rect() ); TomahawkStyle::horizontalHeader( &p, rect() );
} }

View File

@@ -21,7 +21,7 @@
#include "Breadcrumb.h" #include "Breadcrumb.h"
#include "ComboBox.h" #include "ComboBox.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
@@ -107,7 +107,7 @@ BreadcrumbButton::paintEvent( QPaintEvent* )
{ {
QPainter p( this ); QPainter p( this );
StyleHelper::horizontalHeader( &p, rect() ); // draw the background TomahawkStyle::horizontalHeader( &p, rect() ); // draw the background
m_arrow->setVisible( hasChildren() ); m_arrow->setVisible( hasChildren() );
} }

View File

@@ -18,7 +18,7 @@
#include "ComboBox.h" #include "ComboBox.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
@@ -56,7 +56,7 @@ ComboBox::paintEvent( QPaintEvent* )
QRect r = cb.rect; QRect r = cb.rect;
r.setHeight( TomahawkUtils::defaultFontHeight() + 8 ); r.setHeight( TomahawkUtils::defaultFontHeight() + 8 );
StyleHelper::horizontalHeader( &p, r ); TomahawkStyle::horizontalHeader( &p, r );
if ( cb.state & QStyle::State_MouseOver ) if ( cb.state & QStyle::State_MouseOver )
{ {
@@ -68,7 +68,7 @@ ComboBox::paintEvent( QPaintEvent* )
highlightRect.setSize( hS ); highlightRect.setSize( hS );
highlightRect.translate( 0, 2 ); highlightRect.translate( 0, 2 );
p.setRenderHint( QPainter::Antialiasing ); p.setRenderHint( QPainter::Antialiasing );
p.setBrush( StyleHelper::headerHighlightColor() ); p.setBrush( TomahawkStyle::headerHighlightColor() );
p.drawRoundedRect( highlightRect, 10.0, 10.0 ); p.drawRoundedRect( highlightRect, 10.0, 10.0 );
p.restore(); p.restore();
} }
@@ -77,7 +77,7 @@ ComboBox::paintEvent( QPaintEvent* )
QTextOption to( Qt::AlignVCenter ); QTextOption to( Qt::AlignVCenter );
r.adjust( 8, 0, -8, 0 ); r.adjust( 8, 0, -8, 0 );
p.setPen( Qt::white ); p.setPen( Qt::white );
p.setBrush( StyleHelper::headerTextColor() ); p.setBrush( TomahawkStyle::headerTextColor() );
p.drawText( r, cb.currentText, to ); p.drawText( r, cb.currentText, to );
bool reverse = cb.direction == Qt::RightToLeft; bool reverse = cb.direction == Qt::RightToLeft;
@@ -88,6 +88,6 @@ ComboBox::paintEvent( QPaintEvent* )
QStyleOption arrowOpt = cb; QStyleOption arrowOpt = cb;
arrowOpt.rect = arrowRect; arrowOpt.rect = arrowRect;
StyleHelper::drawArrow( QStyle::PE_IndicatorArrowDown, &p, &arrowOpt ); TomahawkStyle::drawArrow( QStyle::PE_IndicatorArrowDown, &p, &arrowOpt );
p.restore(); p.restore();
} }

View File

@@ -23,7 +23,7 @@
#include <QMouseEvent> #include <QMouseEvent>
#include "utils/Logger.h" #include "utils/Logger.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
@@ -59,11 +59,11 @@ void
HeaderLabel::mousePressEvent( QMouseEvent* event ) HeaderLabel::mousePressEvent( QMouseEvent* event )
{ {
QFrame::mousePressEvent( event ); QFrame::mousePressEvent( event );
if ( !m_moved ) if ( !m_moved )
{ {
m_time.start(); m_time.start();
m_pressed = true; m_pressed = true;
m_dragPoint = event->pos(); m_dragPoint = event->pos();
} }
@@ -103,10 +103,10 @@ HeaderLabel::paintEvent( QPaintEvent* /* event */ )
{ {
QPainter p( this ); QPainter p( this );
QRect r = contentsRect(); QRect r = contentsRect();
StyleHelper::horizontalHeader( &p, r ); TomahawkStyle::horizontalHeader( &p, r );
QTextOption to( alignment() | Qt::AlignVCenter ); QTextOption to( alignment() | Qt::AlignVCenter );
r.adjust( 8, 0, -8, 0 ); r.adjust( 8, 0, -8, 0 );
p.setPen( StyleHelper::headerTextColor() ); p.setPen( TomahawkStyle::headerTextColor() );
p.drawText( r, text(), to ); p.drawText( r, text(), to );
} }

View File

@@ -18,7 +18,7 @@
#include "HeaderWidget.h" #include "HeaderWidget.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include <QStyle> #include <QStyle>
#include <QStylePainter> #include <QStylePainter>
@@ -42,5 +42,5 @@ HeaderWidget::paintEvent( QPaintEvent* /* event */ )
QStylePainter p( this ); QStylePainter p( this );
QRect r = rect(); QRect r = rect();
StyleHelper::horizontalHeader( &p, r ); TomahawkStyle::horizontalHeader( &p, r );
} }

View File

@@ -20,7 +20,7 @@
#include "ToggleButton.h" #include "ToggleButton.h"
#include "widgets/HeaderLabel.h" #include "widgets/HeaderLabel.h"
#include "utils/StyleHelper.h" #include "utils/TomahawkStyle.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include <QStylePainter> #include <QStylePainter>
@@ -71,12 +71,12 @@ void
ToggleButton::paintEvent( QPaintEvent* event ) ToggleButton::paintEvent( QPaintEvent* event )
{ {
Q_UNUSED( event ); Q_UNUSED( event );
QPainter p( this ); QPainter p( this );
p.save(); p.save();
QRect r = contentsRect(); QRect r = contentsRect();
StyleHelper::horizontalHeader( &p, r ); TomahawkStyle::horizontalHeader( &p, r );
p.restore(); p.restore();
p.save(); p.save();
@@ -89,15 +89,15 @@ ToggleButton::paintEvent( QPaintEvent* event )
if ( isChecked() ) if ( isChecked() )
{ {
p.setBrush( StyleHelper::headerHighlightColor() ); p.setBrush( TomahawkStyle::headerHighlightColor() );
} }
else if ( false ) else if ( false )
{ {
p.setBrush( StyleHelper::headerLowerColor() ); p.setBrush( TomahawkStyle::headerLowerColor() );
} }
else else
{ {
p.setBrush( StyleHelper::headerUpperColor() ); p.setBrush( TomahawkStyle::headerUpperColor() );
} }
p.drawRoundedRect( highlightRect, 4.0, 4.0 ); p.drawRoundedRect( highlightRect, 4.0, 4.0 );
@@ -105,7 +105,7 @@ ToggleButton::paintEvent( QPaintEvent* event )
QTextOption to( Qt::AlignCenter ); QTextOption to( Qt::AlignCenter );
r.adjust( 8, 0, -8, 0 ); r.adjust( 8, 0, -8, 0 );
p.setBrush( StyleHelper::headerTextColor() ); p.setBrush( TomahawkStyle::headerTextColor() );
p.drawText( r, text(), to ); p.drawText( r, text(), to );
p.restore(); p.restore();

View File

@@ -37,7 +37,6 @@
#include "GlobalActionManager.h" #include "GlobalActionManager.h"
#include "Pipeline.h" #include "Pipeline.h"
#include "MetaPlaylistInterface.h" #include "MetaPlaylistInterface.h"
#include "utils/StyleHelper.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"