Skip to content

Commit a7da1bc

Browse files
authored
Merge pull request #3934 from RKBoss6/settingsUpdate
[Settings] Add 0 level brightness setting for LCD settings
2 parents a5e3330 + 4595680 commit a7da1bc

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

apps/setting/ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ of 'Select Clock'
8888
0.77: Save altitude calibration when user exits via reset
8989
0.78: Fix menu scroll restore on BangleJS1
9090
0.79: Ensure that tapping on pressure/altitude doesn't cause a menu to display temporarily
91+
0.80: Add option to set LCD brightness to 0, default brightness is now 0 as well.

apps/setting/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "setting",
33
"name": "Settings",
4-
"version": "0.79",
4+
"version": "0.80",
55
"description": "A menu for setting up Bangle.js",
66
"icon": "settings.png",
77
"tags": "tool,system",

apps/setting/settings.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Bangle.loadWidgets();
23
Bangle.drawWidgets();
34

@@ -474,11 +475,11 @@ function LCDMenu() {
474475
Object.assign(lcdMenu, {
475476
/*LANG*/'LCD Brightness': {
476477
value: settings.brightness,
477-
min: 0.1,
478+
min : BANGLEJS2 ? 0 : 0.1,
478479
max: 1,
479480
step: 0.1,
480481
onchange: v => {
481-
settings.brightness = v || 1;
482+
settings.brightness = v ?? 1;
482483
updateSettings();
483484
Bangle.setLCDBrightness(settings.brightness);
484485
}
@@ -1077,4 +1078,4 @@ function showAltitude() {
10771078
}
10781079

10791080
// Show the main menu
1080-
pushMenu(mainMenu());
1081+
pushMenu(mainMenu());

0 commit comments

Comments
 (0)