X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=qml%2FImageWhiteBalanceButton.qml;h=8c9827914a226b4c6e0a6d511e71344684adf864;hp=808b854017597112fdd301d157bdc01be9f32172;hb=7961e69b8f38ed0e08fedf542fc4001801a9aebc;hpb=d9b4d99d72de642bf77d5ccac0162a61a2fa6a62 diff --git a/qml/ImageWhiteBalanceButton.qml b/qml/ImageWhiteBalanceButton.qml index 808b854..8c98279 100644 --- a/qml/ImageWhiteBalanceButton.qml +++ b/qml/ImageWhiteBalanceButton.qml @@ -27,48 +27,43 @@ import "data.js" as Data CameraToolIcon { id: button - iconSource: "image://theme/" + Data.wbIcon(settings.imageWhiteBalance) + iconId: Data.wbIcon(settings.imageWhiteBalance) - property list items: [ + property CameraToolBarTools tools: CameraToolBarTools { CameraLabel { height: parent ? parent.height : 0 text: qsTr("WB") verticalAlignment: Text.AlignVCenter - }, + } + CheckButton { - normalIcon: "image://theme/" + Data.wbIcon(value) - checkedIcon: "image://theme/" + Data.wbSelectedIcon(value) - onClicked: settings.imageWhiteBalance = value - value: WhiteBalance.Auto - savedValue: settings.imageWhiteBalance - }, + iconId: Data.wbIcon(WhiteBalance.Auto) + onClicked: settings.imageWhiteBalance = WhiteBalance.Auto + checked: settings.imageWhiteBalance == WhiteBalance.Auto + } + CheckButton { - normalIcon: "image://theme/" + Data.wbIcon(value) - checkedIcon: "image://theme/" + Data.wbSelectedIcon(value) - onClicked: settings.imageWhiteBalance = value - value: WhiteBalance.Sunset - savedValue: settings.imageWhiteBalance - }, + iconId: Data.wbIcon(WhiteBalance.Sunset) + onClicked: settings.imageWhiteBalance = WhiteBalance.Sunset + checked: settings.imageWhiteBalance == WhiteBalance.Sunset + } + CheckButton { - normalIcon: "image://theme/" + Data.wbIcon(value) - checkedIcon: "image://theme/" + Data.wbSelectedIcon(value) - onClicked: settings.imageWhiteBalance = value - value: WhiteBalance.Cloudy - savedValue: settings.imageWhiteBalance - }, + iconId: Data.wbIcon(WhiteBalance.Cloudy) + onClicked: settings.imageWhiteBalance = WhiteBalance.Cloudy + checked: settings.imageWhiteBalance == WhiteBalance.Cloudy + } + CheckButton { - normalIcon: "image://theme/" + Data.wbIcon(value) - checkedIcon: "image://theme/" + Data.wbSelectedIcon(value) - onClicked: settings.imageWhiteBalance = value - value: WhiteBalance.Flourescent - savedValue: settings.imageWhiteBalance - }, + iconId: Data.wbIcon(WhiteBalance.Flourescent) + onClicked: settings.imageWhiteBalance = WhiteBalance.Flourescent + checked: settings.imageWhiteBalance == WhiteBalance.Flourescent + } + CheckButton { - normalIcon: "image://theme/" + Data.wbIcon(value) - checkedIcon: "image://theme/" + Data.wbSelectedIcon(value) - onClicked: settings.imageWhiteBalance = value - value: WhiteBalance.Tungsten - savedValue: settings.imageWhiteBalance + iconId: Data.wbIcon(WhiteBalance.Tungsten) + onClicked: settings.imageWhiteBalance = WhiteBalance.Tungsten + checked: settings.imageWhiteBalance == WhiteBalance.Tungsten } - ] + } }