2014-09-22 17:02:10 +02:00
|
|
|
import QtQuick 2.0
|
|
|
|
|
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
import QtQuick.Controls 1.2
|
2015-09-15 14:25:20 +02:00
|
|
|
import QtQuick.Layouts 1.2
|
2014-09-22 17:02:10 +02:00
|
|
|
|
|
|
|
Rectangle
|
|
|
|
{
|
|
|
|
width: 500
|
2015-10-19 00:52:00 +02:00
|
|
|
height: 500
|
2014-09-22 17:02:10 +02:00
|
|
|
color: "white"
|
|
|
|
|
2015-09-12 22:25:53 +02:00
|
|
|
Grid {
|
2014-09-22 17:02:10 +02:00
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 20
|
|
|
|
spacing: 20
|
2015-09-12 22:25:53 +02:00
|
|
|
columns: 2
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "icon + text"
|
|
|
|
}
|
2014-09-22 17:02:10 +02:00
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
iconSource: "list-remove"
|
|
|
|
text: "test"
|
|
|
|
}
|
2015-09-12 22:25:53 +02:00
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "icon alone, should look small and square"
|
|
|
|
}
|
|
|
|
|
2014-09-22 17:02:10 +02:00
|
|
|
PlasmaComponents.Button {
|
|
|
|
iconSource: "list-remove"
|
|
|
|
}
|
2015-09-12 22:25:53 +02:00
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "text alone, should be about 12 chars wide"
|
|
|
|
}
|
|
|
|
|
2014-09-22 17:02:10 +02:00
|
|
|
PlasmaComponents.Button {
|
|
|
|
text: "test"
|
|
|
|
}
|
|
|
|
|
2015-09-12 22:25:53 +02:00
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "long text, should expand to fit"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
iconSource: "list-remove"
|
|
|
|
text: "This is a really really really really long button"
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "long text but constrained, should be 150px and elided"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
iconSource: "list-remove"
|
|
|
|
text: "This is a really really really really long button"
|
|
|
|
width: 150
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "button with menu"
|
|
|
|
}
|
|
|
|
|
|
|
|
PlasmaComponents.Button {
|
2014-09-22 17:02:10 +02:00
|
|
|
text: "test"
|
|
|
|
menu: Menu {
|
|
|
|
MenuItem {
|
|
|
|
text: "Cut"
|
|
|
|
shortcut: "Ctrl+X"
|
|
|
|
}
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
text: "Copy"
|
|
|
|
shortcut: "Ctrl+C"
|
|
|
|
}
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
text: "Paste"
|
|
|
|
shortcut: "Ctrl+V"
|
|
|
|
}
|
|
|
|
|
|
|
|
MenuSeparator { }
|
|
|
|
|
|
|
|
Menu {
|
|
|
|
title: "More Stuff"
|
|
|
|
|
|
|
|
MenuItem {
|
|
|
|
text: "Do Nothing"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-09-15 14:25:20 +02:00
|
|
|
|
|
|
|
Label {
|
2019-05-13 10:54:44 +02:00
|
|
|
text: "button (with or without icon) and textfield should have the same height"
|
2015-09-15 14:25:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
text: "test"
|
|
|
|
}
|
2019-05-13 10:54:44 +02:00
|
|
|
PlasmaComponents.Button {
|
|
|
|
iconSource: "application-menu"
|
|
|
|
text: "test"
|
|
|
|
}
|
2015-09-15 14:25:20 +02:00
|
|
|
PlasmaComponents.TextField {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-19 00:52:00 +02:00
|
|
|
Label {
|
|
|
|
text: "minimum width property. Should be two letters wide"
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
PlasmaComponents.Button {
|
|
|
|
text: "AA"
|
|
|
|
implicitWidth: minimumWidth
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-22 17:02:10 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|