https://bugs.kde.org/show_bug.cgi?id=445033
Bug ID: 445033
Summary: Button content is always centered when button is
forced to be wider than its implicit width
Product: frameworks-qqc2-desktop-style
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Target Milestone: ---
Created attachment 143252
--> https://bugs.kde.org/attachment.cgi?id=143252&action=edit
Ugly centered content
Consider the following code:
import QtQuick 2.15
import QtQuick.Controls 2.5 as QQC2
import QtQuick.Layouts 1.1
import org.kde.kirigami 2.5 as Kirigami
Item {
implicitWidth: 400
implicitHeight: 100
QQC2.ToolBar {
anchors.centerIn: parent
width: 300
contentItem: RowLayout {
QQC2.ToolButton {
icon.name: "go-previous-symbolic"
text: "back"
Layout.fillWidth: true
}
QQC2.ToolButton {
icon.name: "application-menu"
}
}
}
}
The "Back" toolbutton is intentionally wider than normal, but this results in
its content being centered within the button, rather than left-aligned, which
would look better here. See attached screenshot.
We have a use case for this in System Settings, for the subcategory header's
back button. Using a standard toolbutton is nicer than the fake button we
currently use, but porting to it exposes this problem.
--
You are receiving this mail because:
You are watching all bug changes.