Commit 5a109618 authored by Jakob Leben's avatar Jakob Leben

Qt: couple of minor corrections

- searchLineEdit: proper clearing
- locationBar content will not affect searchLineEdit size
parent 367c7701
...@@ -76,26 +76,24 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -76,26 +76,24 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
lastActivatedId = -1; lastActivatedId = -1;
locationBar = new LocationBar( model ); locationBar = new LocationBar( model );
locationBar->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ); locationBar->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Preferred );
layout->addWidget( locationBar, 0, 0 ); layout->addWidget( locationBar, 0, 0 );
layout->setColumnStretch( 0, 100 ); layout->setColumnStretch( 0, 5 );
CONNECT( locationBar, invoked( const QModelIndex & ), CONNECT( locationBar, invoked( const QModelIndex & ),
this, browseInto( const QModelIndex & ) ); this, browseInto( const QModelIndex & ) );
layout->setColumnStretch( 1, 1 );
searchEdit = new SearchLineEdit( this ); searchEdit = new SearchLineEdit( this );
searchEdit->setMaximumWidth( 250 ); searchEdit->setMaximumWidth( 250 );
searchEdit->setMinimumWidth( 80 ); searchEdit->setMinimumWidth( 80 );
layout->addWidget( searchEdit, 0, 3 ); layout->addWidget( searchEdit, 0, 2 );
CONNECT( searchEdit, textChanged( const QString& ), CONNECT( searchEdit, textChanged( const QString& ),
this, search( const QString& ) ); this, search( const QString& ) );
layout->setColumnStretch( 3, 50 ); layout->setColumnStretch( 2, 3 );
/* Button to switch views */ /* Button to switch views */
QToolButton *viewButton = new QToolButton( this ); QToolButton *viewButton = new QToolButton( this );
viewButton->setIcon( style()->standardIcon( QStyle::SP_FileDialogDetailedView ) ); viewButton->setIcon( style()->standardIcon( QStyle::SP_FileDialogDetailedView ) );
layout->addWidget( viewButton, 0, 2 ); layout->addWidget( viewButton, 0, 1 );
/* View selection menu */ /* View selection menu */
viewSelectionMapper = new QSignalMapper( this ); viewSelectionMapper = new QSignalMapper( this );
...@@ -468,6 +466,7 @@ void LocationBar::setIndex( const QModelIndex &index ) ...@@ -468,6 +466,7 @@ void LocationBar::setIndex( const QModelIndex &index )
buttons.clear(); buttons.clear();
QModelIndex i = index; QModelIndex i = index;
bool bold = true; bool bold = true;
box->addStretch();
while( true ) while( true )
{ {
PLItem *item = model->getItem( i ); PLItem *item = model->getItem( i );
......
...@@ -152,7 +152,7 @@ SearchLineEdit::SearchLineEdit( QWidget *parent ) : QLineEdit( parent ) ...@@ -152,7 +152,7 @@ SearchLineEdit::SearchLineEdit( QWidget *parent ) : QLineEdit( parent )
void SearchLineEdit::clear() void SearchLineEdit::clear()
{ {
QLineEdit::clear(); setText( QString() );
clearButton->hide(); clearButton->hide();
setMessageVisible( true ); setMessageVisible( true );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment