Utils: Use padding instead of margins for CrumblePathButton

Clicks on QPushButton margins are no longer detected as clicks, so
change the text alignment to be done with padding instead of margins.
See QTBUG-81452 and QTBUG-86587 for related issues.

Change-Id: I85971c4defc5d43f959095d4d8e4457804aae0f9
Fixes: QDS-3180
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2020-12-01 15:06:23 +02:00
parent 88c13153b3
commit cfacbb773b

View File

@@ -177,7 +177,7 @@ CrumblePath::CrumblePath(QWidget *parent) : QWidget(parent)
layout->setSpacing(0);
setLayout(layout);
setStyleSheet("QPushButton { margin: 12; }");
setStyleSheet("QPushButton { padding-left: 12; padding-right: 12; }");
}
CrumblePath::~CrumblePath()