subsurface/qt-mobile/qml/SubsurfaceButton.qml
Marco Martin c780cfd7ce port to Kirigami imports and new api
first quick and dirty port of the imports to Kirigami 1.0
(using system installed for now) adapt to api changes and
try out some of the proposed ui changes from the HIG

Signed-off-by: Marco Martin <notmart@gmail.com>
2016-03-08 21:26:54 +01:00

26 lines
663 B
QML

import QtQuick 2.5
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import org.kde.kirigami 1.0 as Kirigami
Button {
style: ButtonStyle {
padding {
top: Kirigami.Units.smallSpacing * 2
left: Kirigami.Units.smallSpacing * 4
right: Kirigami.Units.smallSpacing * 4
bottom: Kirigami.Units.smallSpacing * 2
}
background: Rectangle {
border.width: 1
radius: height / 3
color: control.pressed ? subsurfaceTheme.shadedColor : subsurfaceTheme.accentColor
}
label: Text{
text: control.text
color: subsurfaceTheme.accentTextColor
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
}
}