Use element theme by default

This commit is contained in:
Nad Chishtie 2020-07-14 13:56:24 +01:00
parent 4f466300b7
commit 5b3c3f53fe
3 changed files with 5 additions and 5 deletions

View file

@ -24,7 +24,7 @@ export default class ThemeController extends SettingController {
getValueOverride(level, roomId, calculatedValue, calculatedAtLevel) { getValueOverride(level, roomId, calculatedValue, calculatedAtLevel) {
if (!calculatedValue) return null; // Don't override null themes if (!calculatedValue) return null; // Don't override null themes
if (ThemeController.isLogin) return 'light'; if (ThemeController.isLogin) return 'element';
const themes = enumerateThemes(); const themes = enumerateThemes();
// Override in case some no longer supported theme is stored here // Override in case some no longer supported theme is stored here

View file

@ -99,7 +99,7 @@ export default class ThemeWatcher {
// controller that honours the same flag, although probablt better would be to // controller that honours the same flag, although probablt better would be to
// have the theme logic in one place rather than split between however many // have the theme logic in one place rather than split between however many
// different places. // different places.
if (ThemeController.isLogin) return 'light'; if (ThemeController.isLogin) return 'element';
// If the user has specifically enabled the system matching option (excluding default), // If the user has specifically enabled the system matching option (excluding default),
// then use that over anything else. We pick the lowest possible level for the setting // then use that over anything else. We pick the lowest possible level for the setting
@ -108,8 +108,8 @@ export default class ThemeWatcher {
SettingLevel.DEVICE, "use_system_theme", null, false, true); SettingLevel.DEVICE, "use_system_theme", null, false, true);
if (systemThemeExplicit) { if (systemThemeExplicit) {
console.log("returning explicit system theme"); console.log("returning explicit system theme");
if (this.preferDark.matches) return 'dark'; if (this.preferDark.matches) return 'element-dark';
if (this.preferLight.matches) return 'light'; if (this.preferLight.matches) return 'element';
} }
// If the user has specifically enabled the theme (without the system matching option being // If the user has specifically enabled the theme (without the system matching option being

View file

@ -17,7 +17,7 @@ limitations under the License.
import {_t} from "./languageHandler"; import {_t} from "./languageHandler";
export const DEFAULT_THEME = "light"; export const DEFAULT_THEME = "element";
import Tinter from "./Tinter"; import Tinter from "./Tinter";
import SettingsStore from "./settings/SettingsStore"; import SettingsStore from "./settings/SettingsStore";
import ThemeWatcher from "./settings/watchers/ThemeWatcher"; import ThemeWatcher from "./settings/watchers/ThemeWatcher";