[pim/kmail] src/configuredialog: Fix option button position

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8bc0db2bc23fcc54fa1792945cb469e2c3ca048e by Laurent Montel.
Committed on 28/07/2026 at 06:38.
Pushed by mlaurent into branch 'master'.

Fix option button position

M  +1    -7    src/configuredialog/configagentdelegate.cpp

https://invent.kde.org/pim/kmail/-/commit/8bc0db2bc23fcc54fa1792945cb469e2c3ca048e

diff --git a/src/configuredialog/configagentdelegate.cpp b/src/configuredialog/configagentdelegate.cpp
index 452d79733..09388bcab 100644
--- a/src/configuredialog/configagentdelegate.cpp
+++ b/src/configuredialog/configagentdelegate.cpp
@@ -214,15 +214,9 @@ QStyleOptionButton ConfigAgentDelegate::buttonOption(const QStyleOptionViewItem
 {
     const QString label = i18n("Retrieval Options");
     QStyleOptionButton buttonOpt;
-    QRect buttonRect = option.rect;
     const int height = option.rect.height() / 2;
     const int width = 22 + option.fontMetrics.boundingRect(label).width() + 40; // icon size + label size + arrow and padding
-    buttonRect.setTop(0);
-    buttonRect.setHeight(height);
-    buttonRect.setLeft(option.rect.right() - width);
-    buttonRect.setWidth(width);
-
-    buttonOpt.rect = buttonRect;
+    buttonOpt.rect = QRect(option.rect.width() - width, 0, width, height);
     buttonOpt.state = option.state;
     buttonOpt.text = label;
     buttonOpt.palette = option.palette;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.