Commit 6d4982eb authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

Apply patch #90196 from Maik Qualmann to fix advance rename pattern box GUI

BUGS: 336127
FIXED-IN : 4.7.0
parent 07dbe5f1
......@@ -12,4 +12,5 @@ BUGFIXES FROM KDE BUGZILLA (https://www.digikam.org/changelog):
004 ==> 342229 - Crash attempting to rotate empty (NULL) thumbnail [patch].
005 ==> 342293 - Each mouse right click creates a new Open With entry in the context menu [patch].
006 ==> 342346 - Show only vendor specific meta data which is relevant.
007 ==>
007 ==> 336127 - Rename pattern textbox not tall enough and uses hard-coded font colors [patch].
008 ==>
......@@ -85,17 +85,18 @@ AdvancedRenameLineEdit::~AdvancedRenameLineEdit()
void AdvancedRenameLineEdit::setupWidgets()
{
setStyleSheet("background:transparent");
setLineWrapMode(QPlainTextEdit::NoWrap);
setWordWrapMode(QTextOption::NoWrap);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setFocusPolicy(Qt::StrongFocus);
setFrameStyle(QFrame::NoFrame);
setPalette(kapp->palette());
setFocusPolicy(Qt::StrongFocus);
QFontMetrics fm = fontMetrics();
int widgetHeight = fm.boundingRect(DUMMY_TEXT).height();
setMinimumHeight(widgetHeight * 2);
int textHeight = fm.boundingRect(DUMMY_TEXT).height();
setFixedHeight(textHeight + fm.leading() + 8);
// --------------------------------------------------------
......@@ -347,9 +348,12 @@ void AdvancedRenameInput::setupWidgets()
d->lineEdit = new AdvancedRenameLineEdit(this);
d->proxy = new ProxyLineEdit(this);
d->proxy->setWidget(d->lineEdit);
d->proxy->setClearButtonShown(true);
d->proxy->setContentsMargins(0, -2, 0, 2);
setMinimumHeight(d->lineEdit->height() + 2);
setLineEdit(d->proxy);
}
......
......@@ -158,7 +158,7 @@ void Highlighter::setupHighlightingGrammar()
// --------------------------------------------------------
quotationFormat.setForeground(Qt::blue);
quotationFormat.setForeground(QColor("#5050ff")); // light blue
quotationFormat.setFontItalic(true);
quotationRule.pattern = QRegExp("\".*\"");
quotationRule.pattern.setMinimal(true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment