Skip to content

Commit

Permalink
fixed: white screen (GUI crash)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed Nov 3, 2024
1 parent 4d5924f commit 5c4cc90
Show file tree
Hide file tree
Showing 38 changed files with 194 additions and 17,995 deletions.
120 changes: 54 additions & 66 deletions FileSets/PatchSource/main.qml-v3.50
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ PageStackWindow {
property bool completed: false
property bool alarm: alarmNotification.valid ? alarmNotification.value : 0
property bool showAlert: alertNotification.valid ? alertNotification.value : 0
//////// modified for GuiMods flow pages
property bool overviewsLoaded: defaultOverview.valid && generatorOverview.valid && mobileOverview.valid && tanksOverview.valid && startWithMenu.valid && mobileOverviewEnhanced.valid && guiModsFlowOverview.valid && generatorOverviewEnhanced.valid
property string bindPrefix: "com.victronenergy.settings"

Expand All @@ -44,13 +43,6 @@ PageStackWindow {
//////// modified for OverviewHubEnhanced page
onShowInputLoadsChanged: selectHubOverview ()

VBusItem
{
id: guiModsFlowOverview
bind: "com.victronenergy.settings/Settings/GuiMods/FlowOverview"
onValueChanged: selectHubOverview ()
}

////// GuiMods — DarkMode
property VBusItem darkModeItem: VBusItem { bind: "com.victronenergy.settings/Settings/GuiMods/DarkMode" }
property bool darkMode: darkModeItem.valid && darkModeItem.value == 1
Expand Down Expand Up @@ -358,76 +350,73 @@ PageStackWindow {
}
}

Item {
anchors.verticalCenter: parent.verticalCenter
anchors.left: mbTools.left
height: mbTools.height
width: 200

MouseArea {
anchors.fill: parent
onClicked: {
if (pageStack.currentPage)
pageStack.currentPage.toolbarHandler.leftAction(true)
}
}

Row {
anchors.centerIn: parent
Item {
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
width: mbTools.width - pagesItem.width - menusItem.width - centerScrollIndicator.width

MbIcon {
anchors.verticalCenter: parent.verticalCenter
iconId: pageStack.currentPage ? pageStack.currentPage.leftIcon : ""
MouseArea
{
anchors.fill: parent
onClicked:
{
if (darkModeItem.valid)
darkModeItem.setValue (! darkMode)
}
}

Text {
anchors.verticalCenter: parent.verticalCenter
text: pageStack.currentPage ? pageStack.currentPage.leftText : ""
Text
{
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
text: qsTr ("change to") + "\n" + (darkMode ? qsTr ("Light mode") : qsTr ("Dark mode"))
color: "white"
font.bold: true
font.pixelSize: 16
font.pixelSize: 12
visible: darkModeItem.valid
}
}
}

MbIcon {
id: centerScrollIndicator

anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: mbTools.verticalCenter
}
iconId: pageStack.currentPage ? pageStack.currentPage.scrollIndicator : ""
}

Item {
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
anchors.right: mbTools.right
width: 200

MouseArea {
anchors.fill: parent
onClicked: {
if (pageStack.currentPage)
pageStack.currentPage.toolbarHandler.rightAction(true)
Item
{
id: centerScrollIndicator
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
width: 20
MbIcon {
anchors.verticalCenter: parent.verticalCenter
iconId: pageStack.currentPage ? pageStack.currentPage.scrollIndicator : ""
}
}

Row {
anchors.centerIn: parent
Item {
id: menusItem
anchors.verticalCenter: parent.verticalCenter
height: mbTools.height
width: pagesItem.width

MbIcon {
iconId: pageStack.currentPage ? pageStack.currentPage.rightIcon : ""
anchors.verticalCenter: parent.verticalCenter
MouseArea {
anchors.fill: parent
onClicked: {
if (pageStack.currentPage)
pageStack.currentPage.toolbarHandler.rightAction(true)
}
}

Text {
text: pageStack.currentPage ? pageStack.currentPage.rightText : ""
anchors.verticalCenter: parent.verticalCenter
color: "white"
font.bold: true
font.pixelSize: 16
Row {
anchors.centerIn: parent

MbIcon {
iconId: pageStack.currentPage ? pageStack.currentPage.rightIcon : ""
anchors.verticalCenter: parent.verticalCenter
}

Text {
text: pageStack.currentPage ? pageStack.currentPage.rightText : ""
anchors.verticalCenter: parent.verticalCenter
color: "white"
font.bold: true
font.pixelSize: 16
}
}
}
}
Expand Down Expand Up @@ -557,7 +546,6 @@ PageStackWindow {
overviewModel.append({"pageSource": newPage})
}


// Central mover for the ball animation on the overviews
// Instead of using a timer per line, using a central one
// reduces the CPU usage a little bit and makes the animations
Expand Down
Loading

0 comments on commit 5c4cc90

Please sign in to comment.