Skip to content

work/cblack/sizegroup

Jan Blackquill requested to merge work/cblack/sizegroup into master

Commit One: Introduce SizeGroup

SizeGroup is a utility component that makes items request the same dimensions.

import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.10
import org.kde.kirigami 2.14 as Kirigami

Kirigami.ApplicationWindow {
    Kirigami.SizeGroup {
        mode: Kirigami.SizeGroup.Width
        items: [
            boton1,
            boton2,
            boton3,
        ]
    }
    ColumnLayout {
        Button {
            id: boton1
            text: "smol"
        }
        Button {
            id: boton2
            text: "medium"
        }
        Button {
            id: boton3
            text: "superdupermegauberlarge"
        }
    }
}

Commit Two: Make ApplicationHeaders respect size and use SizeGroup

This allows ApplicationHeaders to respect their items' sizes with the help of SizeGroup for keeping all of them the same height.

Edited by Jan Blackquill

Merge request reports