Review Request 127616: Digital clock applet re-write

Daniel Faust hessijames at mailbox.org
Sat Apr 9 15:23:04 UTC 2016



> On April 9, 2016, 2:22 nachm., Kai Uwe Broulik wrote:
> > Nice cleanup work, haven't tried it so far, but a few nitpicks below.
> > 
> > Also, you did a bunch of changes that were purely code-cosmetical, those should go into separate commits imho.
> > 
> > Also, I think we should have a new "Calendar" config page where the weeknumbers thing should go and the eventual agenda config

I understand that you might not like a commit with so many changes. But I worked through the code, took it apart and put it back together, fixing problem that I could find.


> On April 9, 2016, 2:22 nachm., Kai Uwe Broulik wrote:
> > applets/digital-clock/package/contents/ui/DigitalClock.qml, line 145
> > <https://git.reviewboard.kde.org/r/127616/diff/1/?file=455802#file455802line145>
> >
> >     * 0.4?

There are multiple "fifths" eg. the height for timeLabel is 3/5 and for dateLabel 2/5.


> On April 9, 2016, 2:22 nachm., Kai Uwe Broulik wrote:
> > applets/digital-clock/package/contents/ui/DigitalClock.qml, line 366
> > <https://git.reviewboard.kde.org/r/127616/diff/1/?file=455802#file455802line366>
> >
> >     cache this:
> >     var timeZones = plasmoid.configuration.selectedTimeZones
> >     
> >     also probably the length, ie.
> >     for (var i = 0; length = timeZones.length; i < length; ++i)

I can do that, but this code only gets executed when the user scrolls over the widget and the selectedTimeZones array is probably very short.


> On April 9, 2016, 2:22 nachm., Kai Uwe Broulik wrote:
> > applets/digital-clock/package/contents/ui/DigitalClock.qml, line 488
> > <https://git.reviewboard.kde.org/r/127616/diff/1/?file=455802#file455802line488>
> >
> >     i18n("(%1)", timeZoneString)

The timeZoneString comes from TimezonesI18n.i18nCity(dataSource.data[timezone]["Timezone City"])
Is i18n really necessary?


> On April 9, 2016, 2:22 nachm., Kai Uwe Broulik wrote:
> > applets/digital-clock/package/contents/ui/DigitalClock.qml, line 490
> > <https://git.reviewboard.kde.org/r/127616/diff/1/?file=455802#file455802line490>
> >
> >     Can't you do:
> >     font: timeLabel.font
> >     and then just override the pointSize? Same below.

I can do it everywhere but there: "Property has already been assigned a value".


> On April 9, 2016, 2:22 nachm., Kai Uwe Broulik wrote:
> > applets/digital-clock/package/contents/ui/configTimeZones.qml, line 141
> > <https://git.reviewboard.kde.org/r/127616/diff/1/?file=455806#file455806line141>
> >
> >     Don't use PlasmaComponents in widget-style dialogs

I wanted to show a clear button, but I get your point.


- Daniel


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127616/#review94456
-----------------------------------------------------------


On April 9, 2016, 5:21 nachm., Daniel Faust wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127616/
> -----------------------------------------------------------
> 
> (Updated April 9, 2016, 5:21 nachm.)
> 
> 
> Review request for Plasma.
> 
> 
> Bugs: 360059
>     https://bugs.kde.org/show_bug.cgi?id=360059
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> -------
> 
> This is mostly a refactoring, removing a lot of update functions and making use of QtQuick's event-driven update logic instead.
> It leads to a lot less updates and a much easier to understand code.
> All the formatting and update functions have been reduced to what's necessary in oder to save some cpu time.
> 
> The layout has been refactored as well leading to some small changes:
> - The time label is now vertically centered without an offset
> - The size of the calendar has been reduced slightly
> - Labels can't have multiple lines in vertical panels any more
> - The timezone and date labels have been reduced to 2/3 of the time label size
> 
> The options in the config dialog have been re-ordered.
> 
> And a new feature has been implemented:
> - Seconds are always shown in the tooltip
> 
> And some more changes:
> - If the dates of time zones differ from the currently active time zone, the full date is shown for these time zones in the tooltip
>   (Currently the full date is shown for time zones if their dates differ from the local time zone)
> - Always use font.pointSize in order to get rid of pointSize vs. pixelSize warnings
> 
> 
> Diffs
> -----
> 
>   applets/digital-clock/package/contents/config/config.qml 877e40c 
>   applets/digital-clock/package/contents/ui/CalendarView.qml 381bddb 
>   applets/digital-clock/package/contents/ui/DigitalClock.qml 02d55a9 
>   applets/digital-clock/package/contents/ui/MonthMenu.qml 170ce62 
>   applets/digital-clock/package/contents/ui/Tooltip.qml 2a8dda9 
>   applets/digital-clock/package/contents/ui/configAppearance.qml fc9a09e 
>   applets/digital-clock/package/contents/ui/configTimeZones.qml 3ac84a7 
>   applets/digital-clock/package/contents/ui/main.qml b86b7fe 
> 
> Diff: https://git.reviewboard.kde.org/r/127616/diff/
> 
> 
> Testing
> -------
> 
> Tested with different configurations.
> 
> 
> File Attachments
> ----------------
> 
> Old clock on the left, new one on the right
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/04/09/d2fd6bfc-2f24-417f-a873-bc0683f6873d__clock-tooltip.png
> Tooltip with multiple time zones, current date differs from local tz date
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/04/09/4edaa035-0e69-4af2-885d-59e311ac5ac2__clock-tooltip-multi-tz.png
> Old config dialog
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/04/09/8ca78bd7-f82d-4cfa-b919-60b713d5c557__clock-config-old.png
> New config dialog
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/04/09/a69b5256-9353-40c8-989b-05575f07c15b__clock-config-new.png
> 0001-Digital-clock-applet-re-write.patch
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/04/09/1623ed2a-a8c2-49f4-86d4-d404909dd426__0001-Digital-clock-applet-re-write.patch
> 
> 
> Thanks,
> 
> Daniel Faust
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160409/724f5fe1/attachment-0001.html>


More information about the Plasma-devel mailing list