UI Nits: Named Search Input Box

The named search dialog box uses the same style sheet as
the search box, which looks odd in a dialog box.

This patch ensures the stylesheet is only applied to the
search box and not any children.
This commit is contained in:
Mark Liversedge
2012-11-06 13:26:40 +00:00
parent fa03fdeeb4
commit c02f124272

View File

@@ -66,21 +66,22 @@ SearchBox::SearchBox(MainWindow *main, QWidget *parent)
#ifdef Q_OS_MAC
setAttribute(Qt::WA_MacShowFocusRect, 0);
#endif
setObjectName("SearchBox");
setStyleSheet(QString( //"QLineEdit { padding-right: %1px; } "
"QLineEdit {"
"QLineEdit#SearchBox {"
" selection-color: white; "
//" border: 0px groove gray;"
" border-radius: 5px;"
" padding: 0px %1px;"
"}"
"QLineEdit:focus {"
"QLineEdit#SearchBox:focus {"
" selection-color: white; "
//" border: 0px groove gray;"
" border-radius: 5px;"
" padding: 0px %1px;"
"}"
""
"QLineEdit:edit-focus {"
"QLineEdit#SearchBox:edit-focus {"
" selection-color: white; "
//" border: 0px groove gray;"
" border-radius: 5px;"