Add existing sources
This commit is contained in:
29
IconChooserDelegateLayout.qml
Normal file
29
IconChooserDelegateLayout.qml
Normal file
@ -0,0 +1,29 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
|
||||
RowLayout {
|
||||
property string text
|
||||
property string iconSource
|
||||
property bool isInsideMaterialComboBox: false
|
||||
|
||||
id: layout
|
||||
|
||||
Image {
|
||||
Layout.topMargin: isInsideMaterialComboBox ? 15 : 9
|
||||
Layout.bottomMargin: isInsideMaterialComboBox ? 15 : 9
|
||||
Layout.fillHeight: true
|
||||
source: layout.iconSource
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
Label {
|
||||
Layout.preferredHeight: layout.height
|
||||
text: layout.text
|
||||
verticalAlignment: Label.AlignVCenter
|
||||
fontSizeMode: Text.VerticalFit
|
||||
font.pixelSize: 20
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user