Files
scheincommander/IconChooserDelegateLayout.qml

30 lines
708 B
QML
Raw Permalink Normal View History

2023-02-18 22:46:16 +01:00
import QtQuick
import QtQuick.Controls.Material
import QtQuick.Layouts
RowLayout {
property string text
property string iconSource
2023-02-23 00:34:31 +01:00
property bool isInsideMaterialComboBox: false
2023-02-18 22:46:16 +01:00
id: layout
Image {
2023-02-23 00:34:31 +01:00
Layout.topMargin: isInsideMaterialComboBox ? 15 : 9
Layout.bottomMargin: isInsideMaterialComboBox ? 15 : 9
2023-02-18 22:46:16 +01:00
Layout.fillHeight: true
source: layout.iconSource
fillMode: Image.PreserveAspectFit
}
Label {
2023-02-19 04:37:03 +01:00
Layout.preferredHeight: layout.height
2023-02-18 22:46:16 +01:00
text: layout.text
2023-02-19 04:37:03 +01:00
verticalAlignment: Label.AlignVCenter
fontSizeMode: Text.VerticalFit
font.pixelSize: 20
2023-02-18 22:46:16 +01:00
}
Item {
Layout.fillWidth: true
}
}