x:100
width:root.width/2
height: root.height/10
- styleHints: {"color": "yellow","pressedColor": "red"}
+ styleHints: {"color": "orange","pressedColor": "red"}
LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Tizen 1.0
-import QtQuick.Controls.Styles.Tizen 1.0
import QtQuick.Layouts 1.0
Item {
id: themePanel
x:15
width: root.width-30
- onPressedChanged: {
- if (pressed)
+ active: false
+ onActiveChanged: {
+ if (active)
themeCheckBoxPanel.show()
else
themeCheckBoxPanel.hide()
fontSizeMode: Text.Fit
MouseArea {
anchors.fill: parent
- onClicked: themePanel.pressed = !themePanel.pressed
+ onClicked: themePanel.active = !themePanel.active
}
}
}
name:"visible"
PropertyChanges {
target: themeCheckBoxPanel
- //visible: true
width: root.width -30
height: checkBoxWhite.implicitHeight + spacing + checkBoxBlack.implicitHeight
}
Transition {
from: "*"
to: "*"
- NumberAnimation {
- target: themeCheckBoxPanel
- properties: "width,height"
- duration: 200
+ ParallelAnimation {
+ NumberAnimation {
+ target: themeCheckBoxPanel
+ properties: "width,height"
+ duration: 200
+ }
}
}
]
}
property string theme: TizenControls.currentTheme
+
onThemeChanged: {
checkBoxWhite.checked = TizenControls.currentTheme === "white"
checkBoxBlack.checked = TizenControls.currentTheme === "black"
contentOrientation: Screen.orientation
property bool pageCurlEffectEnabled: false
-
+ Component.onCompleted: TizenControls.changeTheme("white")
Item {
id: rotatedItem
anchors.fill: parent
--- /dev/null
+/*
+ * Copyright (C) 2013 Tomasz Olszak <olszak.tomasz@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 2.1
+import QtQuick.Controls.Private 1.0
+
+Control {
+ id: root
+ property color color
+ property bool active: false
+ style: Qt.createComponent(Settings.style + "/PanelStyle.qml", root)
+}
TimeEdit.qml \
TitleBar.qml \
ToolBar.qml \
- View.qml
+ View.qml \
+ Panel.qml
CONFIG += force_independent
property QtObject pal: QtObject {
readonly property color foreground: TizenConfig.colors.foreground
readonly property color background: TizenConfig.colors.background
+ readonly property color active: TizenConfig.panel.color.pressed
}
}
TimeEdit 1.0 TimeEdit.qml
ToolBar 1.0 ToolBar.qml
View 1.0 View.qml
+Panel 1.0 Panel.qml
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Styles.Tizen 1.0
+import "private"
CheckBoxStyle {
id: checkboxStyle
}
- background: Panel {
+ background: PrivatePanel {
id:panel
pressed: control.pressed
property var pressedColor: control.styleHints && control.styleHints["pressedColor"] ? control.styleHints["pressedColor"]: TizenConfig.panel.color.pressed
--- /dev/null
+/*
+ * Copyright (C) 2013 Tomasz Olszak <olszak.tomasz@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 2.1
+import QtQuick.Controls.Private 1.0
+import QtQuick.Controls.Styles.Tizen 1.0
+import "private"
+
+Style {
+ id:style
+
+ property Component panel: PrivatePanel {
+ anchors.fill: parent
+ Binding {
+ target: control
+ property: "color"
+ value: control.active ? TizenConfig.panel.color.pressed : TizenConfig.panel.color.normal
+ }
+ backgroundColor: control.color
+ }
+
+}
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Styles.Tizen 1.0
+import "private"
TabViewStyle {
id:root
tabsAlignment: Qt.AlignLeft
tabOverlap: 0
frameOverlap: 0
- frame: Panel {
+ frame: PrivatePanel {
anchors.fill: parent
}
}
"
}
+ onStatusChanged: {
+ if (status == BorderImage.Error) {
+ console.log("Error while loading BorderImage:"+source)
+ }
+ }
}
BorderImage {
id:effect
}
"
}
+ onStatusChanged: {
+ if (status == BorderImage.Error) {
+ console.log("Error while loading BorderImage:"+source)
+ }
+ }
}
}
TizenBorderImage {
implicitWidth: 200
implicitHeight: 100
- property bool pressed:false
- source: pressed ? TizenConfig.panel.source.pressed : TizenConfig.panel.source.normal
- effectSource: pressed ? TizenConfig.panel.effectSource.pressed : (activeFocus ? TizenConfig.panel.effectSource.selected : TizenConfig.panel.effectSource.normal)
+ property bool pressed: false
+ source: "../" + (pressed ? TizenConfig.panel.source.pressed : TizenConfig.panel.source.normal)
+ effectSource: "../" + (pressed ? TizenConfig.panel.effectSource.pressed : (activeFocus ? TizenConfig.panel.effectSource.selected : TizenConfig.panel.effectSource.normal))
backgroundColor: pressed ? TizenConfig.panel.color.pressed: TizenConfig.panel.color.normal
}
ButtonStyle 1.0 ButtonStyle.qml
SliderStyle 1.0 SliderStyle.qml
TizenBorderImage 1.0 TizenBorderImage.qml
-Panel 1.0 Panel.qml
+PanelStyle 1.0 PanelStyle.qml
Floater 1.0 Floater.qml
SwitchStyle 1.0 SwitchStyle.qml
DetailButtonStyle 1.0 DetailButtonStyle.qml
DateEditStyle.qml\
TimeEditStyle.qml \
ToolBarStyle.qml \
- ToolBarButton.qml
+ ToolBarButton.qml \
+ PanelStyle.qml
QML_FILES += \
private/DateEditField.qml\
- private/DateEditBarPicker.qml
+ private/DateEditBarPicker.qml \
+ private/PrivatePanel.qml
# Images
QML_FILES += \