Skip to content

Conversation

@GeneralGDA
Copy link
Contributor

This pull request improves theme management in the desktop UI by introducing persistent theme selection and better handling of theme initialization, especially for Windows users. The changes ensure that the user's last selected theme is saved and restored, and that the UI's background color updates appropriately for light and dark themes.

Theme persistence and management improvements:

  • Added logic to store the last used theme in localStorage whenever the theme is set, and to check if the theme is unknown before determining the OS theme. (desktop/src/ui/titleBarMenu.ts, MenuBar.lastUsedThemeKey, MenuBar#setTheme, MenuBar#lastUsedThemeIsUnknown)
  • On Windows, restored the last used theme from localStorage during page load, ensuring UI consistency across sessions. (desktop/src/ui/index.ejs)
  • Refactored ThemeManager to remove the default theme from the constructor and to make theme setting static, simplifying theme updates across the app. (desktop/src/ui/titleBarMenu.ts, ThemeManager) [1] [2]

UI and style updates:

  • Updated CSS to use a new --bg-body variable for the body background color, with appropriate values for light and dark themes. (desktop/src/ui/index.ejs) [1] [2]

Initialization logic:

  • Modified theme initialization to only query the OS theme if the last used theme is unknown, preventing unnecessary overrides. (desktop/src/ui/index.ts)

Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
@huly-github-staging
Copy link

Connected to Huly®: UBERF-13962

haiodo
haiodo previously approved these changes Oct 20, 2025
aonnikov
aonnikov previously approved these changes Oct 20, 2025
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
@GeneralGDA GeneralGDA dismissed stale reviews from ArtyomSavchenko, aonnikov, and haiodo via 44dc722 October 21, 2025 03:27
@aonnikov aonnikov merged commit 925da20 into develop Oct 21, 2025
15 checks passed
@aonnikov aonnikov deleted the win-desktop-app-less-bliking-on-start branch October 21, 2025 05:05
aonnikov pushed a commit that referenced this pull request Oct 22, 2025
Signed-off-by: Denis Gladkiy <denis.gladkiy@hardcoreeng.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants