mirror of
https://github.com/developersu/ClearClock.git
synced 2025-05-15 03:30:26 +03:00
Fixed Layout to automatically recenter
This commit is contained in:
parent
94d85dbcc4
commit
7137c24b20
1 changed files with 4 additions and 2 deletions
|
@ -45,6 +45,8 @@ PlasmoidItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
fullRepresentation: ColumnLayout {
|
fullRepresentation: ColumnLayout {
|
||||||
|
width: childrenRect.width + 20
|
||||||
|
height: childrenRect.height + 20
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: -20
|
spacing: -20
|
||||||
|
|
||||||
|
@ -68,7 +70,7 @@ PlasmoidItem {
|
||||||
Item {
|
Item {
|
||||||
width: Math.max(textMetricsClockLabel.width, textMetricsDayLabel.width)
|
width: Math.max(textMetricsClockLabel.width, textMetricsDayLabel.width)
|
||||||
height: Math.max(textMetricsClockLabel.height, textMetricsDayLabel.height)
|
height: Math.max(textMetricsClockLabel.height, textMetricsDayLabel.height)
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: clockLabel
|
id: clockLabel
|
||||||
|
@ -129,7 +131,7 @@ PlasmoidItem {
|
||||||
Text {
|
Text {
|
||||||
id: dateLabel
|
id: dateLabel
|
||||||
visible: plasmoid.configuration.showDateDisplay
|
visible: plasmoid.configuration.showDateDisplay
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
text: Qt.formatDate(currentDateTime, plasmoid.configuration.dateCustomDateFormat)
|
text: Qt.formatDate(currentDateTime, plasmoid.configuration.dateCustomDateFormat)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue