2019-09-10 12:35:55 +02:00
|
|
|
import QtQuick 2.0
|
|
|
|
|
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
|
|
|
import QtQuick.Layouts 1.2
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
ComponentBase {
|
2019-09-10 12:35:55 +02:00
|
|
|
Grid {
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 20
|
|
|
|
spacing: 20
|
|
|
|
columns: 2
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
PlasmaComponents.Label {
|
2019-09-10 12:35:55 +02:00
|
|
|
text: "icon + text"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "list-remove"
|
|
|
|
text: "test"
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
PlasmaComponents.Label {
|
2019-09-10 12:35:55 +02:00
|
|
|
text: "icon alone, should look small and square"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "list-remove"
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
PlasmaComponents.Label {
|
2019-09-10 12:35:55 +02:00
|
|
|
text: "text alone, should be about 12 chars wide"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
text: "test"
|
|
|
|
}
|
|
|
|
|
2020-01-09 17:35:26 +01:00
|
|
|
PlasmaComponents.Label {
|
|
|
|
text: "This should look highlighted on load"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
text: "test"
|
|
|
|
focus: true
|
|
|
|
}
|
2019-09-10 12:35:55 +02:00
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
PlasmaComponents.Label {
|
2019-09-10 12:35:55 +02:00
|
|
|
text: "long text, should expand to fit"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "list-remove"
|
|
|
|
text: "This is a really really really really long button"
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
PlasmaComponents.Label {
|
2019-09-10 12:35:55 +02:00
|
|
|
text: "long text but constrained, should be 150px and elided"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "list-remove"
|
|
|
|
text: "This is a really really really really long button"
|
|
|
|
width: 150
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
PlasmaComponents.Label {
|
2019-09-10 12:35:55 +02:00
|
|
|
text: "button (with or without icon) and textfield should have the same height"
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
text: "test"
|
|
|
|
}
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "application-menu"
|
|
|
|
text: "test"
|
|
|
|
}
|
|
|
|
PlasmaComponents.TextField {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:33:23 +01:00
|
|
|
PlasmaComponents.Label {
|
2019-09-10 12:35:55 +02:00
|
|
|
text: "minimum width property. Should be two letters wide"
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
text: "AA"
|
2020-02-19 12:06:03 +01:00
|
|
|
implicitWidth: Layout.minimumWidth
|
|
|
|
}
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "application-menu"
|
|
|
|
text: "AA"
|
|
|
|
implicitWidth: Layout.minimumWidth
|
|
|
|
}
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "application-menu"
|
|
|
|
implicitWidth: Layout.minimumWidth
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Label {
|
|
|
|
text: "Display property"
|
|
|
|
}
|
|
|
|
RowLayout {
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "application-menu"
|
|
|
|
text: "Icon Only"
|
|
|
|
display: PlasmaComponents.Button.IconOnly
|
|
|
|
}
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "application-menu"
|
|
|
|
text: "Text Beside Icon"
|
|
|
|
display: PlasmaComponents.Button.TextBesideIcon
|
|
|
|
}
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "application-menu"
|
|
|
|
text: "Text Under Icon"
|
|
|
|
display: PlasmaComponents.Button.TextUnderIcon
|
|
|
|
}
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
icon.name: "application-menu"
|
|
|
|
text: "Text Only"
|
|
|
|
display: PlasmaComponents.Button.TextOnly
|
2019-09-10 12:35:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|