Hide colon option.

pull/1851/head
David Peer 2022-05-20 07:47:35 +02:00
parent c95103946e
commit 9dcd43f343
4 changed files with 17 additions and 1 deletions

View File

@ -5,4 +5,4 @@
0.05: Included icons for information.
0.06: Design and usability improvements.
0.07: Improved positioning.
0.08: Select the color of widgets correctly.
0.08: Select the color of widgets correctly. Additional settings to hide colon.

View File

@ -8,6 +8,7 @@
- Enable / disable lock icon in the settings.
- If the "sched" app is installed tab top / bottom of the screen to set the timer.
- The design is adapted to the theme of your bangle.
- The colon (e.g. 7:35 = 735) can be hidden now in the settings.
## Thanks to
<a href="https://www.flaticon.com/free-icons/" title="Icons">Icons created by Flaticon</a>

View File

@ -18,6 +18,7 @@ const H = g.getHeight();
let settings = {
fullscreen: false,
showLock: true,
hideColon: false,
showInfo: 0,
};
@ -302,7 +303,12 @@ function drawTime(){
// Draw time
g.setColor(g.theme.bg);
g.setFontAlign(0,0);
var timeStr = locale.time(date,1);
if(settings.hideColon){
timeStr = timeStr.replace(":", "");
}
y += parseInt((H - y)/2) + 5;
var infoEntry = getInfoEntry();

View File

@ -6,6 +6,7 @@
let settings = {
fullscreen: false,
showLock: true,
hideColon: false,
};
let saved_settings = storage.readJSON(SETTINGS_FILE, 1) || settings;
for (const key in saved_settings) {
@ -35,6 +36,14 @@
settings.showLock = !settings.showLock;
save();
},
},
'Hide Colon': {
value: settings.hideColon,
format: () => (settings.hideColon ? 'Yes' : 'No'),
onchange: () => {
settings.hideColon = !settings.hideColon;
save();
},
}
});
})