mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
* WIP: Small splitter handles, no frame around SuperCollection view.
This commit is contained in:
@@ -27,6 +27,7 @@ SET(TRIAL_LIBRARY_PATHS
|
||||
/usr/lib${LIB_SUFFIX}
|
||||
/sw/lib${LIB_SUFFIX}
|
||||
/usr/pkg/lib${LIB_SUFFIX}
|
||||
/usr/lib64
|
||||
)
|
||||
SET(TRIAL_INCLUDE_PATHS
|
||||
$ENV{CLUCENE_HOME}/include
|
||||
|
@@ -82,6 +82,7 @@ PlaylistManager::PlaylistManager( QObject* parent )
|
||||
m_superCollectionView = new CollectionView();
|
||||
m_superCollectionFlatModel = new CollectionFlatModel( m_superCollectionView );
|
||||
m_superCollectionView->setModel( m_superCollectionFlatModel );
|
||||
m_superCollectionView->setFrameShape( QFrame::NoFrame );
|
||||
|
||||
m_superAlbumView = new AlbumView();
|
||||
m_superAlbumModel = new AlbumModel( m_superAlbumView );
|
||||
|
@@ -106,9 +106,7 @@ TopBar::resizeEvent(QResizeEvent* e )
|
||||
gradient.setColorAt( 1.0, QColor( 63, 63, 63 ) );
|
||||
|
||||
QPalette p = palette();
|
||||
p.setBrush( QPalette::Background, QBrush( gradient ) );
|
||||
p.setBrush( QPalette::Window, QBrush( gradient ) );
|
||||
p.setBrush( QPalette::Base, QBrush( gradient ) );
|
||||
setPalette( p );
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,8 @@ AnimatedSplitter::AnimatedSplitter( QWidget* parent )
|
||||
, m_animateIndex( -1 )
|
||||
, m_greedyIndex( 0 )
|
||||
{
|
||||
setHandleWidth( 1 );
|
||||
|
||||
m_timeLine = new QTimeLine( ANIMATION_TIME, this );
|
||||
m_timeLine->setUpdateInterval( 5 );
|
||||
m_timeLine->setEasingCurve( QEasingCurve::OutBack );
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "proxystyle.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
#include <QWidget>
|
||||
@@ -11,3 +12,16 @@ ProxyStyle::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt, QPainte
|
||||
if ( pe != PE_FrameStatusBar )
|
||||
QProxyStyle::drawPrimitive( pe, opt, p, w );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ProxyStyle::drawControl( ControlElement ce, const QStyleOption* opt, QPainter* p, const QWidget* w ) const
|
||||
{
|
||||
if ( ce == CE_Splitter )
|
||||
{
|
||||
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
|
||||
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
|
||||
}
|
||||
else
|
||||
QProxyStyle::drawControl( ce, opt, p, w );
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@ public:
|
||||
ProxyStyle() {}
|
||||
|
||||
virtual void drawPrimitive( PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w = 0 ) const;
|
||||
virtual void drawControl( ControlElement ce, const QStyleOption *opt, QPainter *p, const QWidget *w = 0 ) const;
|
||||
};
|
||||
|
||||
#endif // PROXYSTYLE_H
|
||||
|
@@ -62,12 +62,14 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
ui->splitter->setStretchFactor( 0, 1 );
|
||||
ui->splitter->setStretchFactor( 1, 3 );
|
||||
ui->splitter->setCollapsible( 1, false );
|
||||
ui->splitter->setHandleWidth( 1 );
|
||||
|
||||
ui->sidebarSplitter->setChildrenCollapsible( false );
|
||||
ui->sidebarSplitter->setGreedyWidget( 0 );
|
||||
ui->sidebarSplitter->setStretchFactor( 0, 3 );
|
||||
ui->sidebarSplitter->setStretchFactor( 1, 1 );
|
||||
ui->sidebarSplitter->hide( 1, false );
|
||||
ui->sidebarSplitter->setHandleWidth( 1 );
|
||||
|
||||
/* QToolBar* toolbar = addToolBar( "TomahawkToolbar" );
|
||||
toolbar->setObjectName( "TomahawkToolbar" );
|
||||
|
Reference in New Issue
Block a user