1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

* Don't be offended, this is work in progress. Please be advised to wear a hard hat.

This commit is contained in:
Christian Muehlhaeuser
2011-02-08 11:55:22 +01:00
parent f292673622
commit 994e4802ec
5 changed files with 37 additions and 7 deletions

View File

@@ -54,6 +54,11 @@ PlaylistManager::PlaylistManager( QObject* parent )
m_topbar = new TopBar();
m_stack = new QStackedWidget();
QFrame* line = new QFrame();
line->setFrameStyle( QFrame::HLine );
line->setStyleSheet( "border: 1px solid gray;" );
line->setMaximumHeight( 1 );
m_splitter = new AnimatedSplitter();
m_splitter->setOrientation( Qt::Vertical );
m_splitter->setChildrenCollapsible( false );
@@ -70,6 +75,7 @@ PlaylistManager::PlaylistManager( QObject* parent )
m_widget->layout()->setMargin( 0 );
m_widget->layout()->addWidget( m_topbar );
m_widget->layout()->addWidget( line );
m_widget->layout()->addWidget( m_splitter );
m_superCollectionView = new CollectionView();
@@ -267,6 +273,7 @@ PlaylistManager::show( const Tomahawk::collection_ptr& collection )
CollectionView* view = new CollectionView();
CollectionFlatModel* model = new CollectionFlatModel();
view->setModel( model );
view->setFrameShape( QFrame::NoFrame );
model->addCollection( collection );
m_currentInterface = view->proxyModel();

View File

@@ -25,6 +25,8 @@ TopBar::TopBar( QWidget* parent )
{
ui->setupUi( this );
setAutoFillBackground( true );
ui->statsLabelNumTracks->setFormat( "%L1 " + tr( "Tracks" ) );
ui->statsLabelNumArtists->setFormat( "%L1 " + tr( "Artists" ) );
connect( ui->filterEdit, SIGNAL( textChanged( QString ) ), SIGNAL( filterTextChanged( QString ) ) );
@@ -94,6 +96,23 @@ TopBar::changeEvent( QEvent *e )
}
void
TopBar::resizeEvent(QResizeEvent* e )
{
QWidget::resizeEvent( e );
QLinearGradient gradient = QLinearGradient( contentsRect().topLeft(), contentsRect().bottomRight() );
gradient.setColorAt( 0.0, QColor( 80, 80, 80 ) );
gradient.setColorAt( 1.0, QColor( 43, 43, 43 ) );
QPalette p = palette();
p.setBrush( QPalette::Background, QBrush( gradient ) );
p.setBrush( QPalette::Window, QBrush( gradient ) );
p.setBrush( QPalette::Base, QBrush( gradient ) );
setPalette( p );
}
void
TopBar::fadeInDude( unsigned int i )
{

View File

@@ -41,6 +41,7 @@ public slots:
protected:
void changeEvent( QEvent* e );
void resizeEvent( QResizeEvent* e );
private:
void fadeOutDude( unsigned int i );

View File

@@ -43,6 +43,9 @@ SourceTreeView::SourceTreeView( QWidget* parent )
, m_collectionModel( new CollectionModel( this ) )
, m_dragging( false )
{
setFrameShape( QFrame::NoFrame );
setContentsMargins( 0, 0, 0, 0 );
setHeaderHidden( true );
setRootIsDecorated( false );
setExpandsOnDoubleClick( false );

View File

@@ -25,13 +25,6 @@
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="statusButton">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="AnimatedSplitter" name="sidebarSplitter">
<property name="orientation">
@@ -49,6 +42,13 @@
</widget>
</widget>
</item>
<item>
<widget class="QPushButton" name="statusButton">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="playlistWidget" native="true"/>