1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Port from deprecated QLineEdit::getTextMargins() > QLineEdit::textMargins()

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-12-31 12:04:22 +01:00
parent cf6a0b46ef
commit 6c56304aed
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -678,11 +678,12 @@ void LocationBar::paintEvent(QPaintEvent* event)
QStyleOptionFrame option;
initStyleOption(&option);
int lm, tm, rm, bm;
getTextMargins(&lm, &tm, &rm, &bm);
QMargins margins = textMargins();
QRect contentsRect = style()->subElementRect(QStyle::SE_LineEditContents, &option, this);
contentsRect.adjust(lm, tm, -rm, -bm);
contentsRect.adjust(
margins.left(), margins.top(), -margins.right(), -margins.bottom()
);
QColor bg = m_progressColor;
if (!bg.isValid() || bg.alpha() == 0) {