Color and Transperencyof Bar, Added TODOs, Rectangle width and height depending on Text inside
This commit is contained in:
@@ -2,24 +2,35 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
|
||||
Text {
|
||||
id: timeDisplay
|
||||
Rectangle { //workspace
|
||||
width: timeDisplay.width + 16
|
||||
height: timeDisplay.height + 16
|
||||
radius: 4
|
||||
color: "#333333"
|
||||
border.color: "#555555"
|
||||
border.width: 2
|
||||
|
||||
property string currentTime: ""
|
||||
Text {
|
||||
id: timeDisplay
|
||||
|
||||
text: currentTime
|
||||
color: "#ffffff"
|
||||
font.pixelSize: 14
|
||||
font.family: "Inter, sans-serif"
|
||||
property string currentTime: ""
|
||||
|
||||
//Update time every second
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
var now = new Date()
|
||||
timeDisplay.currentTime = Qt.formatTime(now, "hh:mm:ss")
|
||||
text: currentTime
|
||||
color: "#ffffff"
|
||||
font.pixelSize: 18
|
||||
font.family: "Inter, sans-serif"
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
//Update time every second
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
var now = new Date()
|
||||
timeDisplay.currentTime = Qt.formatTime(now, "hh:mm:ss")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user