mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-10 02:25:38 -04:00
Formatting the code.
This commit is contained in:
parent
74efc57369
commit
8324d03f0a
294 changed files with 3796 additions and 3740 deletions
|
@ -31,8 +31,8 @@ LineEdit::LineEdit(QWidget* parent)
|
|||
m_clearButton->setObjectName("clearButton");
|
||||
|
||||
QIcon icon;
|
||||
QString iconNameDirected = QString("edit-clear-locationbar-").append(
|
||||
(layoutDirection() == Qt::LeftToRight) ? "rtl" : "ltr");
|
||||
QString iconNameDirected =
|
||||
QString("edit-clear-locationbar-").append((layoutDirection() == Qt::LeftToRight) ? "rtl" : "ltr");
|
||||
icon = QIcon::fromTheme(iconNameDirected);
|
||||
if (icon.isNull()) {
|
||||
icon = QIcon::fromTheme("edit-clear");
|
||||
|
@ -48,8 +48,8 @@ LineEdit::LineEdit(QWidget* parent)
|
|||
connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clear()));
|
||||
connect(this, SIGNAL(textChanged(QString)), this, SLOT(updateCloseButton(QString)));
|
||||
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
||||
setStyleSheet(QString("QLineEdit { padding-right: %1px; } ")
|
||||
.arg(m_clearButton->sizeHint().width() + frameWidth + 1));
|
||||
setStyleSheet(
|
||||
QString("QLineEdit { padding-right: %1px; } ").arg(m_clearButton->sizeHint().width() + frameWidth + 1));
|
||||
QSize msz = minimumSizeHint();
|
||||
setMinimumSize(qMax(msz.width(), m_clearButton->sizeHint().height() + frameWidth * 2 + 2),
|
||||
qMax(msz.height(), m_clearButton->sizeHint().height() + frameWidth * 2 + 2));
|
||||
|
@ -63,8 +63,7 @@ void LineEdit::resizeEvent(QResizeEvent* event)
|
|||
|
||||
if (layoutDirection() == Qt::LeftToRight) {
|
||||
m_clearButton->move(rect().right() - frameWidth - sz.width(), y);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
m_clearButton->move(rect().left() + frameWidth, y);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue