Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window Polish on Windows #10097

Merged
merged 5 commits into from
Jan 23, 2025
Merged

Window Polish on Windows #10097

merged 5 commits into from
Jan 23, 2025

Conversation

strseb
Copy link
Collaborator

@strseb strseb commented Dec 6, 2024

The Designers aren't looking quick lets change some things.

IMHO RN our Window on Windows has multiple issues:

Dark Light
old_dark old_light

❌ The Titlebar shows a very pixelated icon
❌ The Icon is not the one in our figma windows "window"
❌ The Titlebar is not responsive to neither theme / sys prefrence
❌ The Titlebar is not using the same background as the client app

Whenever this opens on windows it looks ... cheap, especially the title bar not beeing part of the client space, looks outdated. It's giving cross plattform electron app.
So today i needed a fun break.

Dark Light
new_dark new_light

So this pr adds a theme listener, that:
✅ Updates the Titlebar to the Themes BG color
✅ Render icon from the SVG, respecting the coloscheme
✅ Set that icon for the window only.

@strseb strseb changed the title basti/design nits Window Polish on Windows Dec 6, 2024
@strseb strseb marked this pull request as ready for review December 10, 2024 18:52
Copy link
Member

@lesleyjanenorton lesleyjanenorton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES!

- Added WindowsUtils.cpp and WindowsUtils.h to handle Windows-specific utilities.
- Implemented setTitleBarIcon and setDockIcon methods in WindowsUtils.cpp to set the title bar and dock icon images for the application.
- Updated Theme.cpp to handle Windows-specific theme settings.
- Added a new method getTitleBarIcon in Theme.cpp to return the title bar icon image.
- Added a new function `updateTitleBarColor` to set the title bar color based on the current theme.
- Updated `setTitleBarIcon` to use the new `updateTitleBarColor` function.
- Added a new function `forceWindowRedraw` to force a window redraw.
- Updated `setDockIcon` to use the new `forceWindowRedraw` function.
-
- Added a call to `WindowsUtils::forceWindowRedraw(window)` in the `run()` method of `CommandUI` to ensure the window is redrawn when the theme changes.
- This ensures that the window decorations are updated to match the new theme, providing a more consistent and visually appealing user experience.
@strseb strseb force-pushed the basti/design_nits branch from 0dbd01f to c822e65 Compare January 21, 2025 12:49
@strseb strseb merged commit 971e551 into main Jan 23, 2025
120 checks passed
@strseb strseb deleted the basti/design_nits branch January 23, 2025 11:43
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.

2 participants