updates
This commit is contained in:
@@ -6,7 +6,7 @@ import Quickshell.Io
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
property string shortDate: Qt.formatDate(new Date(), "ddd, dd.MM.yyyy - ")
|
||||
property string shortDate: Qt.formatDate(new Date(), "dd.MM.yyyy - ")
|
||||
property string fullDate: Qt.formatDate(new Date(), "dddd, MMMM d, yyyy")
|
||||
property string currentTime: Qt.formatTime(new Date(), "hh:mm:ss")
|
||||
property string uptime: "Uptime: ..."
|
||||
@@ -26,7 +26,7 @@ QtObject {
|
||||
repeat: true
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
root.shortDate = Qt.formatDate(new Date(), "ddd, dd.MM.yyyy - ")
|
||||
root.shortDate = Qt.formatDate(new Date(), "dd.MM.yyyy - ")
|
||||
root.fullDate = Qt.formatDate(new Date(), "dddd, MMMM d, yyyy")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,15 +7,18 @@ PopupWindow {
|
||||
|
||||
property Item anchorItem
|
||||
property bool anchorHovered: false
|
||||
property int popupWidth: 300
|
||||
property int minpopupWidth: 300
|
||||
property int minpopupHeight: 50
|
||||
property int popupVerticalOffset: 0
|
||||
property int spacingValue: 12
|
||||
property int radiusValue: 12
|
||||
|
||||
default property alias content: contentColumn.data
|
||||
|
||||
visible: false
|
||||
color: "transparent"
|
||||
width: Math.max(300, contentColumn.implicitWidth + 2 * 12)
|
||||
height: Math.max(50, contentColumn.implicitHeight + 2 * 12)
|
||||
width: Math.max(popup.minpopupWidth, contentColumn.implicitWidth + 2 * popup.spacingValue)
|
||||
height: Math.max(popup.minpopupHeight, contentColumn.implicitHeight + 2 * popup.spacingValue)
|
||||
|
||||
onAnchorHoveredChanged: popup.updateVisibility()
|
||||
|
||||
@@ -59,7 +62,7 @@ PopupWindow {
|
||||
id: background
|
||||
anchors.fill: parent
|
||||
color: Qt.alpha(Colors.primaryContainer, 0.9)
|
||||
radius: 12
|
||||
radius: popup.radiusValue
|
||||
border {
|
||||
color: Colors.primaryContainer_fg
|
||||
width: Config.border_width
|
||||
@@ -73,9 +76,9 @@ PopupWindow {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
margins: 12
|
||||
margins: popup.spacingValue
|
||||
}
|
||||
spacing: Config.small_spacing_fun(24)
|
||||
spacing: popup.spacingValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,12 +61,21 @@ Rectangle { //workspace
|
||||
id: clockPopup
|
||||
anchorItem: clockRect
|
||||
anchorHovered: clockArea.containsMouse
|
||||
implicitWidth: Math.max(text1.width, text2.width) + (Config.spacing_fun(clockRect.height) * 3)
|
||||
implicitHeight: text1.height*3+(Config.spacing_fun(clockRect.height) * 5)
|
||||
|
||||
spacingValue: Config.spacing_fun(clockRect.height)
|
||||
radiusValue: Config.radius_fun(clockRect.height)
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: Config.spacing_fun(clockRect.height)
|
||||
spacing: parent.spacing
|
||||
Text {
|
||||
id: text0
|
||||
text: ClockState.shortDate + ClockState.currentTime
|
||||
wrapMode: Text.WordWrap
|
||||
color: Colors.primary
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: Config.font_size_tiny(bar.height)
|
||||
font.family: Config.font
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text1
|
||||
text: ClockState.fullDate
|
||||
@@ -77,6 +86,7 @@ Rectangle { //workspace
|
||||
font.family: Config.font
|
||||
}
|
||||
|
||||
|
||||
Text {
|
||||
id: text2
|
||||
text: ClockState.uptime
|
||||
|
||||
@@ -38,15 +38,11 @@ MouseArea {
|
||||
id: clockPopup
|
||||
anchorItem: networkButton
|
||||
anchorHovered: networkButton.containsMouse
|
||||
popupWidth: 500
|
||||
// property int count: 17
|
||||
// property var texts: [text1, text2, text3, text4, text5, text6, text7, text8, text9, text10, text11, text12, text13, text14, text15, text16, text17]
|
||||
// implicitWidth: Config.maxTextWidth(count, texts) + (Config.spacing_fun(networkButton.height) * 3)
|
||||
// implicitHeight: text1.height*count+(Config.spacing_fun(networkButton.height) * (count + 2))
|
||||
spacingValue: Config.spacing_fun(networkButton.height)
|
||||
radiusValue: Config.radius_fun(networkButton.height)
|
||||
|
||||
Column {
|
||||
// width: parent.width
|
||||
spacing: Config.spacing_fun(networkButton.height)
|
||||
spacing: parent.spacing
|
||||
Text {
|
||||
id: text1
|
||||
text: "interfaceName: " + NetworkState.interfaceName
|
||||
|
||||
Reference in New Issue
Block a user