Merge remote-tracking branch 'origin/small-fixes' into landing-silo
This commit is contained in:
commit
b03360ec22
@ -14,12 +14,14 @@ win32:Release:LIBS += -L$$top_builddir/libnymea-app-core/release \
|
|||||||
-L$$top_builddir/libnymea-common/release
|
-L$$top_builddir/libnymea-common/release
|
||||||
linux:!android:LIBS += -lavahi-client -lavahi-common
|
linux:!android:LIBS += -lavahi-client -lavahi-common
|
||||||
PRE_TARGETDEPS += ../libnymea-app-core ../libnymea-common
|
PRE_TARGETDEPS += ../libnymea-app-core ../libnymea-common
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
stylecontroller.h
|
stylecontroller.h
|
||||||
|
|
||||||
SOURCES += main.cpp \
|
SOURCES += main.cpp \
|
||||||
stylecontroller.cpp
|
stylecontroller.cpp
|
||||||
|
|
||||||
|
OTHER_FILES += $$files(*.qml, true)
|
||||||
|
|
||||||
RESOURCES += resources.qrc
|
RESOURCES += resources.qrc
|
||||||
equals(STYLES_PATH, "") {
|
equals(STYLES_PATH, "") {
|
||||||
|
|||||||
@ -78,17 +78,21 @@ Page {
|
|||||||
id: swipeView
|
id: swipeView
|
||||||
clip: true
|
clip: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
currentIndex: settings.currentMainViewIndex
|
|
||||||
onCurrentIndexChanged: settings.currentMainViewIndex = currentIndex
|
|
||||||
opacity: Engine.deviceManager.fetchingData ? 0 : 1
|
opacity: Engine.deviceManager.fetchingData ? 0 : 1
|
||||||
Behavior on opacity { NumberAnimation { duration: 300 } }
|
Behavior on opacity { NumberAnimation { duration: 300 } }
|
||||||
|
|
||||||
|
onCurrentIndexChanged: {
|
||||||
|
settings.currentMainViewIndex = currentIndex
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (Engine.jsonRpcClient.ensureServerVersion(1.6)) {
|
if (Engine.jsonRpcClient.ensureServerVersion(1.6)) {
|
||||||
swipeView.insertItem(0, favoritesViewComponent.createObject(swipeView))
|
swipeView.insertItem(0, favoritesViewComponent.createObject(swipeView))
|
||||||
} else if (settings.currentMainViewIndex === 2) {
|
|
||||||
settings.currentMainViewIndex = 0;
|
|
||||||
}
|
}
|
||||||
|
if (settings.currentMainViewIndex > swipeView.count) {
|
||||||
|
settings.currentMainViewIndex = swipeView.count - 1;
|
||||||
|
}
|
||||||
|
swipeView.currentIndex = Qt.binding(function() { return settings.currentMainViewIndex; })
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|||||||
@ -737,7 +737,7 @@ Page {
|
|||||||
model: ListModel {
|
model: ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
iconName: "../images/action.svg"
|
iconName: "../images/action.svg"
|
||||||
text: qsTr("Execute an action on of my things")
|
text: qsTr("Execute an action on one of my things")
|
||||||
method: "addRuleAction"
|
method: "addRuleAction"
|
||||||
isExitAction: false
|
isExitAction: false
|
||||||
minimumJsonRpcVersion: "1.0"
|
minimumJsonRpcVersion: "1.0"
|
||||||
@ -751,7 +751,7 @@ Page {
|
|||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
iconName: "../images/action.svg"
|
iconName: "../images/action.svg"
|
||||||
text: qsTr("Execute an action on of my things")
|
text: qsTr("Execute an action on one of my things")
|
||||||
method: "addRuleExitAction"
|
method: "addRuleExitAction"
|
||||||
isExitAction: true
|
isExitAction: true
|
||||||
minimumJsonRpcVersion: "1.0"
|
minimumJsonRpcVersion: "1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user