mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-27 18:31:25 -05:00
Added a find Icon Button for the class LineEditClear
Removed all not needed find icons from the Dialogs. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5727 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9ea1a7ab24
commit
c7c695600f
@ -538,7 +538,7 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
@ -553,16 +553,6 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="images.qrc">:/images/find-16.png</pixmap>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="LineEditClear" name="filterLineEdit">
|
<widget class="LineEditClear" name="filterLineEdit">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -581,8 +571,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font/>
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
|
@ -372,16 +372,6 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="images.qrc">:/images/find-16.png</pixmap>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="LineEditClear" name="filterLineEdit"/>
|
<widget class="LineEditClear" name="filterLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
|
@ -175,16 +175,6 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="images.qrc">:/images/find-16.png</pixmap>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="LineEditClear" name="filterLineEdit">
|
<widget class="LineEditClear" name="filterLineEdit">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -203,8 +193,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font/>
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
|
@ -172,31 +172,6 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="searchLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="images.qrc">:/images/find-16.png</pixmap>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="LineEditClear" name="lineEdit">
|
<widget class="LineEditClear" name="lineEdit">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Enter a keyword here (at least 3 char long)</string>
|
<string>Enter a keyword here (at least 3 char long)</string>
|
||||||
@ -319,13 +294,6 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="images.qrc">:/images/find-16.png</pixmap>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="LineEditClear" name="filterLineEdit">
|
<widget class="LineEditClear" name="filterLineEdit">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -28,6 +28,13 @@
|
|||||||
LineEditClear::LineEditClear(QWidget *parent)
|
LineEditClear::LineEditClear(QWidget *parent)
|
||||||
: QLineEdit(parent)
|
: QLineEdit(parent)
|
||||||
{
|
{
|
||||||
|
findButton = new QToolButton(this);
|
||||||
|
QPixmap findPixmap(":/images/find-16.png");
|
||||||
|
findButton->setIcon(QIcon(findPixmap));
|
||||||
|
findButton->setIconSize(findPixmap.size());
|
||||||
|
findButton->setCursor(Qt::ArrowCursor);
|
||||||
|
findButton->setStyleSheet("QToolButton { border: none; padding: 0px; }");
|
||||||
|
|
||||||
clearButton = new QToolButton(this);
|
clearButton = new QToolButton(this);
|
||||||
clearButton->setFixedSize(16, 16);
|
clearButton->setFixedSize(16, 16);
|
||||||
clearButton->setIconSize(QSize(16, 16));
|
clearButton->setIconSize(QSize(16, 16));
|
||||||
@ -42,7 +49,9 @@ LineEditClear::LineEditClear(QWidget *parent)
|
|||||||
connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateCloseButton(const QString&)));
|
connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateCloseButton(const QString&)));
|
||||||
|
|
||||||
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
||||||
setStyleSheet(QString("QLineEdit { padding-right: %1px; } ").arg(clearButton->sizeHint().width() + frameWidth + 1));
|
setStyleSheet(QString("QLineEdit { padding-right: %1px; padding-left: %2px; } ").
|
||||||
|
arg(clearButton->sizeHint().width() + frameWidth + 1).
|
||||||
|
arg(findButton->sizeHint().width() + frameWidth + 1));
|
||||||
QSize msz = minimumSizeHint();
|
QSize msz = minimumSizeHint();
|
||||||
setMinimumSize(qMax(msz.width(), clearButton->sizeHint().height() + frameWidth * 2), qMax(msz.height(), clearButton->sizeHint().height() + frameWidth * 2));
|
setMinimumSize(qMax(msz.width(), clearButton->sizeHint().height() + frameWidth * 2), qMax(msz.height(), clearButton->sizeHint().height() + frameWidth * 2));
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QToolButton *clearButton;
|
QToolButton *clearButton;
|
||||||
|
QToolButton *findButton;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LINEEDITCLEAR_H
|
#endif // LINEEDITCLEAR_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user