Optional disable high contrast mode

This commit is contained in:
Mr. Stallion 2021-12-29 13:22:48 -06:00
parent 08a1cf5690
commit 94d5b8e327
7 changed files with 28 additions and 2 deletions

View File

@ -199,6 +199,13 @@
</label>
</div>
<div class="form-group">
<label class="control-label" for="risingDisableWindowsHighContrast">
<input type="checkbox" id="risingDisableWindowsHighContrast" v-model="risingDisableWindowsHighContrast"/>
Disable high-contrast mode (Windows)
</label>
</div>
</div>
<div v-show="selectedTab === '3'">
<template v-if="hidden.length">
@ -268,6 +275,7 @@
risingShowUnreadOfflineCount!: boolean;
risingColorblindMode!: boolean;
risingDisableWindowsHighContrast!: boolean;
async load(): Promise<void> {
@ -305,6 +313,7 @@
this.risingShowUnreadOfflineCount = settings.risingShowUnreadOfflineCount;
this.risingColorblindMode = settings.risingColorblindMode;
this.risingDisableWindowsHighContrast = settings.risingDisableWindowsHighContrast;
}
async doImport(): Promise<void> {
@ -359,7 +368,8 @@
risingComparisonInSearch: this.risingComparisonInSearch,
risingShowUnreadOfflineCount: this.risingShowUnreadOfflineCount,
risingColorblindMode: this.risingColorblindMode
risingColorblindMode: this.risingColorblindMode,
risingDisableWindowsHighContrast: this.risingDisableWindowsHighContrast
};
if(this.notifications) await core.notifications.requestPermission();
}

View File

@ -54,6 +54,7 @@ export class Settings implements ISettings {
risingShowUnreadOfflineCount = true;
risingColorblindMode = false;
risingDisableWindowsHighContrast: false;
}

View File

@ -221,6 +221,7 @@ export namespace Settings {
readonly risingShowUnreadOfflineCount: boolean;
readonly risingColorblindMode: boolean;
readonly risingDisableWindowsHighContrast: boolean;
}
}

View File

@ -489,7 +489,8 @@
try {
return {
[`theme-${this.settings.theme}`]: true,
colorblindMode: core.state.settings.risingColorblindMode
colorblindMode: core.state.settings.risingColorblindMode,
disableWindowsHighContrast: core.state.settings.risingDisableWindowsHighContrast
};
} catch(err) {
return { [`theme-${this.settings.theme}`]: true };

View File

@ -40,3 +40,7 @@
--#{$varName}: #{$value};
}
}
.disableWindowsHighContrast {
forced-colors-adjust: none !important;
}

View File

@ -41,6 +41,11 @@
}
}
.disableWindowsHighContrast {
forced-colors-adjust: none !important;
}
//@import "../../util/accecss";
//
//@include accecss(

View File

@ -40,3 +40,7 @@
--#{$varName}: #{$value};
}
}
.disableWindowsHighContrast {
forced-colors-adjust: none !important;
}