mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 17:14:00 +02:00
* Don't be offended, this is work in progress. Please be advised to wear a hard hat.
This commit is contained in:
@@ -54,6 +54,11 @@ PlaylistManager::PlaylistManager( QObject* parent )
|
|||||||
m_topbar = new TopBar();
|
m_topbar = new TopBar();
|
||||||
m_stack = new QStackedWidget();
|
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 = new AnimatedSplitter();
|
||||||
m_splitter->setOrientation( Qt::Vertical );
|
m_splitter->setOrientation( Qt::Vertical );
|
||||||
m_splitter->setChildrenCollapsible( false );
|
m_splitter->setChildrenCollapsible( false );
|
||||||
@@ -70,6 +75,7 @@ PlaylistManager::PlaylistManager( QObject* parent )
|
|||||||
|
|
||||||
m_widget->layout()->setMargin( 0 );
|
m_widget->layout()->setMargin( 0 );
|
||||||
m_widget->layout()->addWidget( m_topbar );
|
m_widget->layout()->addWidget( m_topbar );
|
||||||
|
m_widget->layout()->addWidget( line );
|
||||||
m_widget->layout()->addWidget( m_splitter );
|
m_widget->layout()->addWidget( m_splitter );
|
||||||
|
|
||||||
m_superCollectionView = new CollectionView();
|
m_superCollectionView = new CollectionView();
|
||||||
@@ -267,6 +273,7 @@ PlaylistManager::show( const Tomahawk::collection_ptr& collection )
|
|||||||
CollectionView* view = new CollectionView();
|
CollectionView* view = new CollectionView();
|
||||||
CollectionFlatModel* model = new CollectionFlatModel();
|
CollectionFlatModel* model = new CollectionFlatModel();
|
||||||
view->setModel( model );
|
view->setModel( model );
|
||||||
|
view->setFrameShape( QFrame::NoFrame );
|
||||||
model->addCollection( collection );
|
model->addCollection( collection );
|
||||||
|
|
||||||
m_currentInterface = view->proxyModel();
|
m_currentInterface = view->proxyModel();
|
||||||
|
@@ -25,6 +25,8 @@ TopBar::TopBar( QWidget* parent )
|
|||||||
{
|
{
|
||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
|
|
||||||
|
setAutoFillBackground( true );
|
||||||
|
|
||||||
ui->statsLabelNumTracks->setFormat( "%L1 " + tr( "Tracks" ) );
|
ui->statsLabelNumTracks->setFormat( "%L1 " + tr( "Tracks" ) );
|
||||||
ui->statsLabelNumArtists->setFormat( "%L1 " + tr( "Artists" ) );
|
ui->statsLabelNumArtists->setFormat( "%L1 " + tr( "Artists" ) );
|
||||||
connect( ui->filterEdit, SIGNAL( textChanged( QString ) ), SIGNAL( filterTextChanged( QString ) ) );
|
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
|
void
|
||||||
TopBar::fadeInDude( unsigned int i )
|
TopBar::fadeInDude( unsigned int i )
|
||||||
{
|
{
|
||||||
|
@@ -41,6 +41,7 @@ public slots:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent( QEvent* e );
|
void changeEvent( QEvent* e );
|
||||||
|
void resizeEvent( QResizeEvent* e );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fadeOutDude( unsigned int i );
|
void fadeOutDude( unsigned int i );
|
||||||
|
@@ -43,6 +43,9 @@ SourceTreeView::SourceTreeView( QWidget* parent )
|
|||||||
, m_collectionModel( new CollectionModel( this ) )
|
, m_collectionModel( new CollectionModel( this ) )
|
||||||
, m_dragging( false )
|
, m_dragging( false )
|
||||||
{
|
{
|
||||||
|
setFrameShape( QFrame::NoFrame );
|
||||||
|
setContentsMargins( 0, 0, 0, 0 );
|
||||||
|
|
||||||
setHeaderHidden( true );
|
setHeaderHidden( true );
|
||||||
setRootIsDecorated( false );
|
setRootIsDecorated( false );
|
||||||
setExpandsOnDoubleClick( false );
|
setExpandsOnDoubleClick( false );
|
||||||
|
@@ -25,13 +25,6 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="layoutWidget">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="statusButton">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="AnimatedSplitter" name="sidebarSplitter">
|
<widget class="AnimatedSplitter" name="sidebarSplitter">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -49,6 +42,13 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="statusButton">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="playlistWidget" native="true"/>
|
<widget class="QWidget" name="playlistWidget" native="true"/>
|
||||||
|
Reference in New Issue
Block a user