From 2faa1a7f5d880fa627b820e6c0bc3262a4526ea3 Mon Sep 17 00:00:00 2001 From: BorysLevytskyi Date: Tue, 16 May 2023 20:11:10 +0200 Subject: [PATCH] Polish UI. Change default theme --- src/index.css | 7 ++----- src/shell/AppState.ts | 3 ++- src/shell/appStateStore.ts | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/index.css b/src/index.css index 6af4b33..d50eead 100644 --- a/src/index.css +++ b/src/index.css @@ -88,7 +88,6 @@ a.hashLink { font-size: 1.1em;} .cur { color: lightgray; } -.dim-extra-bits .extra-bit { opacity: 0.3;} button { border: none; } button.link-button {text-decoration: underline;} @@ -105,14 +104,14 @@ button.link-button {text-decoration: underline;} .solid-border { border: solid 1px rgba(255, 255, 255, 0.8);} +.zero { opacity: 0.5} +.dim-extra-bits .extra-bit { opacity: 0.1;} /* Light */ .light { background: #fafafa; } .light .solid-background {background: #fafafa;} .light .header-cmd { color: #919191 } .light a, .light a:visited, .light button { color: #222; } -.light .one { color: black; } -.light .zero { color: #888; } .light .indicator { color: #ddd; } .light .on { color: #121212; } .light .prefix { color: #888} @@ -139,7 +138,6 @@ button.link-button {text-decoration: underline;} .dark a, .dark a:visited, .dark button { color: white; } .dark .indicator { color: #555; } .dark .on { color: white; } -.dark .zero { color: #999;} .dark .prefix { color: #999} .dark .other { color: #777;} .dark .hashLink, .dark .hashLink:visited { color: #555 } @@ -162,7 +160,6 @@ button.link-button {text-decoration: underline;} .midnight a, .dark a:visited, .midnight button { color: white; } .midnight .indicator { color: #85a0ad; } .midnight .on { color: white; } -.midnight .zero { color: #85a0ad;} .midnight .prefix { color: #85a0ad} .midnight .other { color: #9FBAC7;} .midnight .accent-background { background-color: #3b5268;} diff --git a/src/shell/AppState.ts b/src/shell/AppState.ts index 2dbb0a6..bae89a8 100644 --- a/src/shell/AppState.ts +++ b/src/shell/AppState.ts @@ -28,7 +28,7 @@ export default class AppState { version: number = APP_VERSION; emphasizeBytes: boolean; debugMode: boolean = false; - uiTheme: string = 'midnight'; + uiTheme: string = 'dark'; changeHandlers: AppStateChangeHandler[] = []; commandResults: CommandResultView[] = []; persistedVersion: number; @@ -44,6 +44,7 @@ export default class AppState { this.env = env; + this.uiTheme = persistData.uiTheme; this.emphasizeBytes = !!persistData.emphasizeBytes; this.persistedVersion = persistData.version || 0.1; this.wasOldVersion = persistData.version != null && this.version > this.persistedVersion; diff --git a/src/shell/appStateStore.ts b/src/shell/appStateStore.ts index 57ff21a..27e33a2 100644 --- a/src/shell/appStateStore.ts +++ b/src/shell/appStateStore.ts @@ -3,7 +3,7 @@ import AppState, { APP_VERSION, PersistedAppData } from "./AppState"; const storeKey = 'AppState'; const DEFAULT_DATA : PersistedAppData = { - uiTheme: 'midnight', + uiTheme: 'dark', emphasizeBytes: true, version: APP_VERSION, debugMode: false,