From d2bda9fff38bed561ebab27b25a44c3badc80bb6 Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 14 Feb 2010 17:58:22 +0000 Subject: [PATCH] fixed stlesheets for Search LineEdit's frame, use now 3 chars for search git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2323 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/SearchDialog.cpp | 10 +++++----- retroshare-gui/src/gui/SearchDialog.ui | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/retroshare-gui/src/gui/SearchDialog.cpp b/retroshare-gui/src/gui/SearchDialog.cpp index c0672b7be..582c5c0dd 100644 --- a/retroshare-gui/src/gui/SearchDialog.cpp +++ b/retroshare-gui/src/gui/SearchDialog.cpp @@ -99,7 +99,7 @@ SearchDialog::SearchDialog(QWidget *parent) ui.setupUi(this); ui.lineEdit->setFocus(); - ui.lineEdit->setToolTip(tr("Enter a keyword here (at least 4 char long)")); + ui.lineEdit->setToolTip(tr("Enter a keyword here (at least 3 char long)")); /* initialise the filetypes mapping */ if (!SearchDialog::initialised) @@ -186,14 +186,14 @@ SearchDialog::SearchDialog(QWidget *parent) void SearchDialog::checkText(const QString& txt) { - if(txt.length() < 4) + if(txt.length() < 3) { std::cout << "setting palette 1" << std::endl ; - ui.lineEdit->setStyleSheet("QLineEdit { background-color: gray; }"); + ui.frame_2->setStyleSheet("QFrame{ border: 2px solid #079E00; background-color: #DBDBDB; }"); } else { - ui.lineEdit->setStyleSheet("QLineEdit { background-color: white; }"); + ui.frame_2->setStyleSheet("QFrame { border: 2px solid #079E00; background-color: white; }"); std::cout << "setting palette 2" << std::endl ; } } @@ -541,7 +541,7 @@ void SearchDialog::searchKeywords() QString qTxt = ui.lineEdit->text(); std::string txt = qTxt.toStdString(); - if(txt.length() < 4) + if(txt.length() < 3) return ; std::cerr << "SearchDialog::searchKeywords() : " << txt << std::endl; diff --git a/retroshare-gui/src/gui/SearchDialog.ui b/retroshare-gui/src/gui/SearchDialog.ui index 7c0802066..b1afd9073 100644 --- a/retroshare-gui/src/gui/SearchDialog.ui +++ b/retroshare-gui/src/gui/SearchDialog.ui @@ -734,7 +734,7 @@ border-image: url(:/images/btn_26_pressed.png) 4; - border: 1px solid #8B8B8B; + border: 2px solid #079E00; background: white;