Bug 493663

Summary: Dialog does not consider footer buttons when determining its minimum width
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Nate Graham <nate>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: notmart
Priority: NOR    
Version: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=493581
Latest Commit: Version Fixed In: 6.7
Sentry Crash Report:

Description Nate Graham 2024-09-25 23:39:48 UTC
To reproduce, run the following test code:


import QtQuick
import QtQuick.Controls as QQC2
import org.kde.kirigami as Kirigami

Item {
    width: 500
    height: 400

    QQC2.Button {
        anchors.centerIn: parent
        text: "open the dialog"
        icon.name: "dialog-messages"
        onClicked: dialog.open()
    }

    Kirigami.Dialog {
        id: dialog

        title: "Hi"

        customFooterActions: [
            Kirigami.Action {
                text: "Do something"
                icon.name: "edit-bomb"
            },
            Kirigami.Action {
                text: "Cry in the corner"
                icon.name: "face-crying"
            }
        ]
    }
}
Comment 1 Nate Graham 2024-09-26 14:13:28 UTC
Fixed by Akseli Lahtinen with https://invent.kde.org/frameworks/kirigami/-/commit/4fb4d656dfa5161ac4676d278bcd7cb08327a753 for Frameworks 6.7!