added option to disable animations for some modules
This commit is contained in:
@@ -118,9 +118,9 @@ Rectangle {
|
|||||||
font.bold: true
|
font.bold: true
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
opacity: (hoverHandler.hovered || calendarPopup.popupOpen) ? 1.0 : 0.0
|
opacity: (hoverHandler.hovered || calendarPopup.popupOpen) && Cfg.Config.clockExtendEnabled ? 1.0 : 0.0
|
||||||
visible: opacity > 0
|
visible: opacity > 0
|
||||||
Layout.preferredWidth: (hoverHandler.hovered || calendarPopup.popupOpen) ? implicitWidth : 0
|
Layout.preferredWidth: (hoverHandler.hovered || calendarPopup.popupOpen) && Cfg.Config.clockExtendEnabled ? implicitWidth : 0
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Behavior on opacity { NumberAnimation { duration: 200 } }
|
Behavior on opacity { NumberAnimation { duration: 200 } }
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler { id: hoverHandler; cursorShape: Qt.PointingHandCursor; onHoveredChanged: if (hovered) bellRingAnim.start() }
|
HoverHandler { id: hoverHandler; cursorShape: Qt.PointingHandCursor; onHoveredChanged: if (hovered && Cfg.Config.notificationShakeEnabled) bellRingAnim.start() }
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onTapped: {
|
onTapped: {
|
||||||
if (historyPopup.popupOpen) {
|
if (historyPopup.popupOpen) {
|
||||||
@@ -414,7 +414,7 @@ Rectangle {
|
|||||||
|
|
||||||
onNotification: function(notif) {
|
onNotification: function(notif) {
|
||||||
notif.tracked = true
|
notif.tracked = true
|
||||||
bellRingAnim.start()
|
if (Cfg.Config.notificationShakeEnabled) bellRingAnim.start()
|
||||||
|
|
||||||
const timeStr = new Date().toLocaleTimeString(Qt.locale(), "HH:mm")
|
const timeStr = new Date().toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||||
const toastId = notif.id + "_" + Date.now()
|
const toastId = notif.id + "_" + Date.now()
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ Rectangle {
|
|||||||
id: hoverHandler
|
id: hoverHandler
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onHoveredChanged: {
|
onHoveredChanged: {
|
||||||
if (hovered) shakeAnim.restart()
|
if (hovered && Cfg.Config.volumeShakeEnabled) shakeAnim.restart()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TapHandler { onTapped: volumePopup.toggle() }
|
TapHandler { onTapped: volumePopup.toggle() }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import "themes"
|
|||||||
QtObject {
|
QtObject {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property var theme: Tropicalnight
|
readonly property var theme: Goldencity
|
||||||
|
|
||||||
// ────────────────────────────────────────────────────────────────────────
|
// ────────────────────────────────────────────────────────────────────────
|
||||||
// Widgets
|
// Widgets
|
||||||
@@ -44,6 +44,9 @@ QtObject {
|
|||||||
property int popupBorderWidth: 1
|
property int popupBorderWidth: 1
|
||||||
property int popupAnimDuration: 500
|
property int popupAnimDuration: 500
|
||||||
|
|
||||||
|
// ── Clock Module ─────────────────────────────────────────────────────────
|
||||||
|
property bool clockExtendEnabled: true // seconds extension on hover for clock
|
||||||
|
|
||||||
// ── Timezone (IANA name, e.g. "America/New_York", "Europe/London")g ──────────
|
// ── Timezone (IANA name, e.g. "America/New_York", "Europe/London")g ──────────
|
||||||
// Leave empty to use the system timezone.
|
// Leave empty to use the system timezone.
|
||||||
property string timezone: "America/New_York"
|
property string timezone: "America/New_York"
|
||||||
@@ -68,6 +71,7 @@ QtObject {
|
|||||||
property bool statsStartExpanded: false
|
property bool statsStartExpanded: false
|
||||||
|
|
||||||
// ── Volume Module ─────────────────────────────────────────────────────────
|
// ── Volume Module ─────────────────────────────────────────────────────────
|
||||||
|
property bool volumeShakeEnabled: true // rotation shake for volume chip
|
||||||
property int volumeIconSize: 20
|
property int volumeIconSize: 20
|
||||||
property int volumeSliderHeight: 2
|
property int volumeSliderHeight: 2
|
||||||
property int volumeHandleSize: 20
|
property int volumeHandleSize: 20
|
||||||
@@ -75,6 +79,7 @@ QtObject {
|
|||||||
property int volumeOutputMax: 170
|
property int volumeOutputMax: 170
|
||||||
property int volumeInputMax: 200
|
property int volumeInputMax: 200
|
||||||
|
|
||||||
|
|
||||||
// ────────────────────────────────────────────────────────────────────────
|
// ────────────────────────────────────────────────────────────────────────
|
||||||
// FRAME
|
// FRAME
|
||||||
// ────────────────────────────────────────────────────────────────────────
|
// ────────────────────────────────────────────────────────────────────────
|
||||||
@@ -83,7 +88,7 @@ QtObject {
|
|||||||
// ────────────────────────────────────────────────────────────────────────
|
// ────────────────────────────────────────────────────────────────────────
|
||||||
// NOTIFICATIONS
|
// NOTIFICATIONS
|
||||||
// ────────────────────────────────────────────────────────────────────────
|
// ────────────────────────────────────────────────────────────────────────
|
||||||
|
property bool notificationShakeEnabled: true // bell ringing shake for notifications
|
||||||
property string notificationPosition: "topright"
|
property string notificationPosition: "topright"
|
||||||
property int notificationHistorySize: 50
|
property int notificationHistorySize: 50
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user