Skip to content

Commit

Permalink
Add StatusBarAlarmIndicator to the StatusBar
Browse files Browse the repository at this point in the history
Part of #1492
  • Loading branch information
MikeTrahearn-Qinetic committed Dec 12, 2024
1 parent e1f6245 commit 81e6171
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ set (VENUS_QML_MODULE_SOURCES
components/SolarYieldModel.qml
components/SplashView.qml
components/StatusBar.qml
components/StatusBarAlarmIndicator.qml
components/SwipePageModel.qml
components/SwipeViewPage.qml
components/SystemReason.qml
Expand Down
2 changes: 2 additions & 0 deletions components/StatusBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,6 @@ Rectangle {
onClicked: Global.screenBlanker.setDisplayOff()
}
}

StatusBarAlarmIndicator { }
}
21 changes: 21 additions & 0 deletions components/StatusBarAlarmIndicator.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
** Copyright (C) 2023 Victron Energy B.V.
** See LICENSE.txt for license information.
*/

import QtQuick
import Victron.VenusOS

Rectangle {

width: parent.width
height: 5
color: Theme.color_critical
opacity: Global.notifications.alarm ? 1 : 0

Behavior on opacity {
OpacityAnimator {
duration: Theme.animation_page_fade_duration
}
}
}

0 comments on commit 81e6171

Please sign in to comment.