mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: make all buttons more attractive
Commit f3f7930
introduced a more attractive button style to the start page.
This patch turns it into its own type so it can easily be used everywhere.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f3f79309d3
commit
471270437b
8 changed files with 40 additions and 31 deletions
26
qt-mobile/qml/SubsurfaceButton.qml
Normal file
26
qt-mobile/qml/SubsurfaceButton.qml
Normal file
|
@ -0,0 +1,26 @@
|
|||
import QtQuick 2.5
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
|
||||
|
||||
Button {
|
||||
style: ButtonStyle {
|
||||
padding {
|
||||
top: MobileComponents.Units.smallSpacing
|
||||
left: MobileComponents.Units.smallSpacing * 2
|
||||
right: MobileComponents.Units.smallSpacing * 2
|
||||
bottom: MobileComponents.Units.smallSpacing
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue