From 773258af99e295d8203a90e2649bb90b88606d10 Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Sat, 11 Jan 2014 12:56:39 -0800 Subject: [PATCH] Both cases move the clear button to the same position --- src/widgets/lineedit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/lineedit.cpp b/src/widgets/lineedit.cpp index 3cf1262a8..718627e4a 100644 --- a/src/widgets/lineedit.cpp +++ b/src/widgets/lineedit.cpp @@ -128,11 +128,11 @@ void ExtendedEditor::Resize() { const int frame_width = widget_->style()->pixelMetric(QStyle::PM_DefaultFrameWidth); const int y = (widget_->rect().height() - sz.height()) / 2; + clear_button_->move(frame_width, y); + if (!is_rtl_) { - clear_button_->move(frame_width, y); reset_button_->move(widget_->width() - frame_width - sz.width() - extra_right_padding_, y); } else { - clear_button_->move(frame_width, y); reset_button_->move((has_clear_button() ? sz.width() + 4 : 0) + frame_width, y); } }