forked from Shinonome/dots-hyprland
hourhand: parameterize hand length
This commit is contained in:
@@ -96,6 +96,7 @@ Item {
|
|||||||
// Hour hand
|
// Hour hand
|
||||||
HourHand {
|
HourHand {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
handLength: root.hourHandLength
|
||||||
handWidth: root.hourHandWidth
|
handWidth: root.hourHandWidth
|
||||||
clockHour: root.clockHour
|
clockHour: root.clockHour
|
||||||
clockMinute: root.clockMinute
|
clockMinute: root.clockMinute
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import qs
|
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
import qs.modules.common.functions
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import qs
|
|
||||||
import qs.services
|
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
|
||||||
import qs.modules.common.functions
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -13,6 +9,7 @@ Item {
|
|||||||
|
|
||||||
required property int clockHour
|
required property int clockHour
|
||||||
required property int clockMinute
|
required property int clockMinute
|
||||||
|
property real handLength: 72
|
||||||
property real handWidth: 16
|
property real handWidth: 16
|
||||||
property string style: "fill"
|
property string style: "fill"
|
||||||
property color color: Appearance.colors.colPrimary
|
property color color: Appearance.colors.colPrimary
|
||||||
@@ -38,7 +35,7 @@ Item {
|
|||||||
if (root.style === "classic") position -= 15;
|
if (root.style === "classic") position -= 15;
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
width: hourHandLength
|
width: root.handLength
|
||||||
height: root.style === "classic" ? 8 : root.handWidth
|
height: root.style === "classic" ? 8 : root.handWidth
|
||||||
|
|
||||||
radius: root.style === "classic" ? 2 : root.handWidth / 2
|
radius: root.style === "classic" ? 2 : root.handWidth / 2
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import qs
|
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import qs
|
|
||||||
import qs.services
|
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
|
||||||
import qs.modules.common.functions
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import qs
|
|
||||||
import qs.services
|
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
import qs.modules.common.widgets
|
||||||
import qs.modules.common.functions
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import qs
|
|
||||||
import qs.services
|
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import qs.modules.common.widgets
|
|
||||||
import qs.modules.common.functions
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
Reference in New Issue
Block a user