Skip to content

Commit

Permalink
torc-tv: Add CheckboxImage.qml
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Feb 8, 2014
1 parent d55a149 commit 59767da
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions programs/torc-tv/qml/CheckboxImage.qml
@@ -0,0 +1,40 @@
import QtQuick 2.0
import QtGraphicalEffects 1.0
import "base"

Checkbox {
id: checkbox
property color basecolor: '#d9d9d9'

width: 45
height: 45

Rectangle {
id: image
anchors.fill: parent
radius: 5
gradient: Gradient {
GradientStop { position: 0; color: 'white' }
GradientStop { position: 0.5; color: basecolor }
}
border.color: 'lightgray'
border.width: 1
visible: false
}

Dropshadow {
source: image
color: (hovered | activeFocus) ? "#aa000000" : dropcolor
verticalOffset: (hovered | activeFocus) ? 6 : 3
}

Text {
id: check
anchors.centerIn: parent
color: '#111111'
font.pointSize: 35
font.family: webfont.name
text: checkbox.enabled ? "\uf05d" : "\uf10c"
Behavior on text { PropertyAnimation {} }
}
}

0 comments on commit 59767da

Please sign in to comment.