1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

* Fixed search-input layout on non-OSX.

This commit is contained in:
Christian Muehlhaeuser 2011-09-05 10:56:29 +02:00
parent b9d6548243
commit c9c99d58ab
3 changed files with 10 additions and 3 deletions

View File

@ -71,7 +71,7 @@ InfoBar::InfoBar( QWidget* parent )
ui->imageLabel->setText( QString() );
m_searchWidget = new QSearchField( this );
m_searchWidget->setPlaceholderText( "Filter..." );
m_searchWidget->setPlaceholderText( tr( "Filter..." ) );
m_searchWidget->setMinimumWidth( 180 );
connect( m_searchWidget, SIGNAL( textChanged( QString ) ), this, SLOT( onFilterEdited() ) );

View File

@ -51,10 +51,17 @@ QSearchField::QSearchField(QWidget *parent) : QWidget(parent)
TomahawkUtils::unmarginLayout(layout);
setContentsMargins(0, 0, 0, 0);
lineEdit->setStyleSheet( "QLineEdit { border: 1px solid gray; border-radius: 6px; margin-right: 2px; }" );
lineEdit->setStyleSheet( "QLineEdit { border: 1px solid gray; border-radius: 6px; }" );
#ifdef Q_OS_MAC
lineEdit->setContentsMargins(0, 0, 0, 0);
lineEdit->setMinimumHeight(27);
setFixedHeight(27);
#else
lineEdit->setContentsMargins(2, 2, 2, 2);
lineEdit->setMinimumHeight(27);
#endif
}
void QSearchField::setText(const QString &text)

View File

@ -193,7 +193,7 @@ TomahawkWindow::setupSideBar()
m_sidebar->setChildrenCollapsible( false );
m_searchWidget = new QSearchField( m_sidebar );
m_searchWidget->setPlaceholderText( "Global Search..." );
m_searchWidget->setPlaceholderText( tr( "Global Search..." ) );
connect( m_searchWidget, SIGNAL( returnPressed() ), this, SLOT( onFilterEdited() ) );
m_sourcetree = new SourceTreeView();