[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-workspace] applets/digital-clock/package/contents: [digital-clock] Add week numbers to calen
From:       Martin Klapetek <mklapetek () kde ! org>
Date:       2015-06-10 11:59:24
Message-ID: E1Z2efE-0005cg-3J () scm ! kde ! org
[Download RAW message or body]

Git commit a500d06431fbe795374eb746a7e64d9b4addbe2c by Martin Klapetek.
Committed on 10/06/2015 at 11:58.
Pushed by mklapetek into branch 'master'.

[digital-clock] Add week numbers to calendar

REVIEW: 124005
BUG: 338195
FIXED-IN: 5.4.0

M  +4    -1    applets/digital-clock/package/contents/config/main.xml
M  +2    -1    applets/digital-clock/package/contents/ui/CalendarView.qml
M  +6    -0    applets/digital-clock/package/contents/ui/configAppearance.qml

http://commits.kde.org/plasma-workspace/a500d06431fbe795374eb746a7e64d9b4addbe2c

diff --git a/applets/digital-clock/package/contents/config/main.xml \
b/applets/digital-clock/package/contents/config/main.xml index 5237160..8b0872b \
                100644
--- a/applets/digital-clock/package/contents/config/main.xml
+++ b/applets/digital-clock/package/contents/config/main.xml
@@ -39,6 +39,9 @@
     <entry name="displayTimezoneAsCode" type="Bool">
       <default>true</default>
     </entry>
+    <entry name="showWeekNumbers" type="Bool">
+      <default>false</default>
+    </entry>
   </group>
 
-</kcfg>
\ No newline at end of file
+</kcfg>
diff --git a/applets/digital-clock/package/contents/ui/CalendarView.qml \
b/applets/digital-clock/package/contents/ui/CalendarView.qml index 71e80ce..b52eb10 \
                100644
--- a/applets/digital-clock/package/contents/ui/CalendarView.qml
+++ b/applets/digital-clock/package/contents/ui/CalendarView.qml
@@ -35,7 +35,7 @@ Item {
     Layout.minimumHeight: _minimumHeight
 
     // The "sensible" values
-    property int _minimumWidth: Math.round(_minimumHeight * 1.5)
+    property int _minimumWidth: monthView.showWeekNumbers ? \
Math.round(_minimumHeight * 1.75) : Math.round(_minimumHeight * 1.5)  property int \
_minimumHeight: units.gridUnit * 14  Layout.preferredWidth: _minimumWidth
     Layout.preferredHeight: Math.round(_minimumHeight * 1.5)
@@ -66,6 +66,7 @@ Item {
             id: monthView
             borderOpacity: 0.25
             today: root.tzDate
+            showWeekNumbers: plasmoid.configuration.showWeekNumbers
             anchors.fill: parent
         }
 
diff --git a/applets/digital-clock/package/contents/ui/configAppearance.qml \
b/applets/digital-clock/package/contents/ui/configAppearance.qml index \
                669b1cc..ead0ad5 100644
--- a/applets/digital-clock/package/contents/ui/configAppearance.qml
+++ b/applets/digital-clock/package/contents/ui/configAppearance.qml
@@ -35,6 +35,7 @@ Item {
     property alias cfg_showLocalTimezone: showLocalTimezone.checked
     property alias cfg_displayTimezoneAsCode: timezoneCodeRadio.checked
     property alias cfg_showSeconds: showSeconds.checked
+    property alias cfg_showWeekNumbers: showWeekNumbers.checked
 
     property alias cfg_showDate: showDate.checked
     property string cfg_dateFormat: "shortDate"
@@ -70,6 +71,11 @@ Item {
                     text: i18n("Show date")
                 }
                 QtControls.CheckBox {
+                    id: showWeekNumbers
+                    text: i18n("Show week numbers in Calendar")
+                }
+
+                QtControls.CheckBox {
                     id: showSeconds
                     text: i18n("Show seconds")
                 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic