-
-
Notifications
You must be signed in to change notification settings - Fork 952
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
[Editor / Launcher] UI fixes and theme enhancements #667
Conversation
- Globally enable snapping subpixel elements to pixel grid to not make them smear between two pixels. - AvalonDock windows additionally require layout bounds to be snapped to pixel grid as they would still cause blurred controls otherwise. Does not fix (bitmap) icons which are rendered at a size not matching their native resolution; I will attempt to fix this later by updating / replacing icons and optimizing menu / toolbar rendering / layouts.
Cool, thanks for the good work! Especially the extensive commit message. :) From what I read, this PR seems to try to do a lot of things at once, I think it could be broken up into a few separate ones. If the first two commits already improve something, there is no need to wait for the other features artificially. I've also seen screenshots from your work on Discord, maybe add them here as well. |
I also thought of creating separate PRs, but eventually decided to put it into one, as "fixing blurry things" spans multiple parts (not only snapping controls to pixel grid, but also updating blurry caption bar glyphs, and thus updating the title bar, and thus updating the theme slightly to be in line with Blend...). I'll add screenshots soon as I ported the changes over to the current master (need to recheck things after the new theming feature was added yesterday). |
Yes, that makes sense! Looking forward to the next commits :) |
The issue of UI improvements shouldn't be underestimated, thank you for bringing this up, I look forward to examples! |
- New editor icon (filled logo). - New caption button glyphs. - Double clicking the window icon now closes the window. - Slightly adjusted theme colors. - Make PrivacyPolicyWindow non-resizable. Removes unnecessary caption buttons and fixes bug with with window chrome showing black borders at the right and bottom. - Modify / add app manifests to use consistent DPI scaling. Also use Windows visual styles; system message boxes look better then (one appears when declining the privacy policy window).
- Removes the Vista/7-esque fade animations (goodbye storyboards). - Also suffixes the brushes I introduced in the last commit with "Brush" to make their keys unique.
"Dark Steel" is not meant to be a VS-like theme; it is meant to be something like Unity / Unreal. |
@RayKoopa nice PR, thanks! Since you mentioned some areas are still in progress, I converted PR status as "draft". |
@xen2 The only thing I originally planned for this PR was to update the Launcher icons to become vectorized, due to missing sources I postponed that. Of course, if there's something I mentioned for another PR which should be in this one before merging it, let me know! |
What xen2 means that if you're still adding commits to this PR, then it's better to leave it in draft mode so he doesn't try to merge this, since you might end up changing stuff while he's merging obsoleting code. |
Yep, I'm done pushing to the branch I'm PRing from; that's why I marked it as ready for review. |
Ah, I suppose xen2 got confused on the timeline. You mentioned WIP, but you did mark for review later, but you didn't actually comment that you're done so he probably missed that. |
Ah sorry about it then. I thought he meant the postponed changes I would like to handle in later PRs as I don't know for how long they'll be postponed. Everything checked off at the top is done! This PR is ready to be merged from my side. |
@RayKoopa OK understood, sorry for the misunderstanding. Maybe I didn't see the part where you said "I removed that task for this PR." for the vector icons. |
Alright, I try to be more clear next time :D |
@RayKoopa No worries, it was my fault :) |
I asked @Kryptos-FR for a review, then LGTM (conceptually) for merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit concerned about the extensive use of dynamic resource binding.
<Border x:Name="ContentBorder" Background="{TemplateBinding Background}" BorderBrush="{DynamicResource MainWindowActiveDefaultBorderBrush}" BorderThickness="1" IsHitTestVisible="True"> | ||
<DockPanel> | ||
<DockPanel x:Name="TitleBar" DockPanel.Dock="Top" VerticalAlignment="Top" WindowChrome.IsHitTestVisibleInChrome="False" Height="32"> | ||
<Button Style="{DynamicResource MainWindowButtonStyle}" DockPanel.Dock="Right" Content="{me:Image {StaticResource VectorCloseWindow}, 12, 12}" x:Name="CloseButton" Command="{x:Static cmd:SystemCommands.CloseWindowCommand}"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reasons for these to use dynamic resource binding? Dynamic resources are more expensive as they can't be cached and affect dramatically the performance. As much as possible, static resources should be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going with static resources first, but then thought about the possibility of changing themes at runtime later on (as in VS). Right now you'd have to restart the editor.
I can change it to static resources so the change to dynamic resources can be made when it's required. I'll probably have to reorder some definitions then to appear in front of where they're used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please assume live theme switching won't be supported anytime soon (seems too heavy because of dynamic resources) and switch back to StaticResource.
We can always change it back if we decide to allow live theme switching, but it seems highly unlikely so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I should also switch to static color resources in the AvalonDock theme then (which I'm updating right now in another branch to the most recent version) to make it consistent.
From what I know, colors are typically dynamic resources to also reflect system color changes (which became kinda rare, to be fair), but styles should indeed be static, unlike done above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, restart for theme change is totally fine... Great to set this morning forward!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I know, colors are typically dynamic resources to also reflect system color changes (which became kinda rare, to be fair), but styles should indeed be static, unlike done above.
That's a good point. I'm wondering if we should also change them to be static. It probably needs some testing and performance comparison especially when working on a big project with lots of resources/assets and entities in a scene to see if it has any impact.
Let's keep the new resources in the theme static, and the color dynamic when they already were for now. We can review it later.
… reordering of styles / templates to be declared before usage.
I changed the newly introduced |
@Kryptos-FR with the latest changes (Dynamic to Static), it should be OK to merge? |
@xen2 Yes. LGTM. |
PR Details
This PR fixes or updates the look-and-feel of some UI elements which seem blurry or outdated.
Description
Window.ResizeMode
is set toNoResize
.Launcher dialog?(postponed, will do in later PR, missing vector sources yet)Related Issue
None
Motivation and Context
Controls should not be blurry throughout the Launcher and Editor / Game Studio. Images should not pixelate on high DPI. Colors should not make text hard to read (blue highlight is too bright and mismatches Blend theme, especially affecting white text on it).
Types of changes
Checklist