<table><tr><td style="">piotrkakol updated this revision to Diff 27024.<br />piotrkakol retitled this revision from "Changed hexadecimal system to decimal for Binary Clock widget" to "Allow users to change the format to BCD (decimal) in Binary Clock widget".<br />piotrkakol edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-wlifcu4tuq5qsg4/" rel="noreferrer">(Show Details)</a><br />piotrkakol added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10434" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Instead of changing the base to decimal I decided to allow users to choose between base 10 (BCD format) and 16 (sexagesimal format) in the config.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">Hours, minutes and seconds are in hexadecimal system. <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">I don't know if it was intended or just temporarily ported to Plasma5 that way but it's not an expected behavior from my perspective.<br />
Basically a column gets cleared if the column on the right of it is full</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">This is sexagesimal format according to [[ https://en.wikipedia.org/wiki/Binary_clock | Wikipedia ]]</span>. <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Which means that when a column reaches 16 it becomes 0 again and the column on the left is incremented by 1. And it should happen for 10,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">In Plasma4 the format was BCD (Binary-coded decimal) which means that each digit was encoded separately in decimal system.<br />
<br />
My fix allows users to choose the format in config.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">not 16</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">By default the sexagesimal format is used since that was the format after porting the widget to Plasma5</span>.<br />
<br />
Here's a screenshot of 2 widgets. On the left there's <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">my fixed </span>Binary Clock widget <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">with decimal system</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">after choosing BCD format in config</span> and on the right there's an old widget displaying time in hexadecimal form. Screenshot was taken when my Digital Clock showed: 00:19.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R114 Plasma Addons</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D10434?vs=26898&id=27024" rel="noreferrer">https://phabricator.kde.org/D10434?vs=26898&id=27024</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10434" rel="noreferrer">https://phabricator.kde.org/D10434</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>applets/binary-clock/package/contents/config/main.xml<br />
applets/binary-clock/package/contents/ui/BinaryClock.qml<br />
applets/binary-clock/package/contents/ui/DotColumn.qml<br />
applets/binary-clock/package/contents/ui/configGeneral.qml</div></div></div><br /><div><strong>To: </strong>piotrkakol<br /><strong>Cc: </strong>davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>