-
-
Notifications
You must be signed in to change notification settings - Fork 365
Fix Preview in Welcome Window & Wallpaper Retriever Improvement #3398
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
Fix Preview in Welcome Window & Wallpaper Retriever Improvement #3398
Conversation
- Adjust BG Color - Fix aspect ratio wallpaper bitmap
🥷 Code experts: Jack251970 Jack251970 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
This comment has been minimized.
This comment has been minimized.
📝 WalkthroughWalkthroughThis pull request updates the wallpaper retrieval logic and several XAML files. In the wallpaper retrieval class, the condition checking an invalid wallpaper path has been inverted, logging has been added for cache usage and error conditions, and bitmap scaling is now computed using a maximum size constraint while preserving aspect ratio. Additionally, the Welcome pages have been modified to update gradient colors and orientation, and a style reference has been changed on one page. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller
participant WP as WallpaperPathRetrieval
participant Cache as Cache Manager
participant Loader as Bitmap Loader
participant Logger as Logger
Caller->>WP: Request wallpaper image
alt Invalid wallpaper path
WP->>Logger: Log invalid path
WP-->>Caller: Return solid color brush
else Valid wallpaper path
WP->>Cache: Check for cached wallpaper
alt Cached wallpaper exists
WP->>Logger: Log cache usage
WP-->>Caller: Return cached wallpaper
else
WP->>Loader: Load bitmap from path
Loader-->>WP: Return bitmap
WP->>Logger: Log error if bitmap dimensions zero
WP->>WP: Calculate dimensions (max 800x600, preserve aspect ratio)
WP->>Cache: Cache the processed wallpaper
WP-->>Caller: Return scaled wallpaper
end
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Pull Request Overview
Fixes issues with the wallpaper preview in the welcome window by ensuring a valid wallpaper is used and properly scaled while also improving error logging when parsing wallpaper colors.
- Early exit with a fallback solid color brush when the wallpaper path is invalid.
- Implements aspect ratio–preserving scaling for wallpaper bitmap decoding.
- Enhances exception logging in wallpaper color parsing.
Files not reviewed (3)
- Flow.Launcher/Resources/Pages/WelcomePage1.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage2.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage5.xaml: Language not supported
Comments suppressed due to low confidence (1)
Flow.Launcher/Helper/WallpaperPathRetrieval.cs:29
- The condition has been inverted to check for invalid wallpaper paths early. Please verify that this change correctly handles all scenarios expected from the original logic.
if (string.IsNullOrEmpty(wallpaperPath) || !File.Exists(wallpaperPath))
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
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.
Good
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.
Pull Request Overview
This PR fixes issues related to the welcome window preview and enhances the wallpaper retrieval functionality by refactoring caching, improving error handling, and adjusting image scaling for proper aspect ratio.
- Renames caching constants and variables to follow coding conventions.
- Adds improved validation and logging for wallpaper path errors.
- Updates bitmap scaling logic to preserve the aspect ratio and refines registry access for wallpaper color retrieval.
Files not reviewed (3)
- Flow.Launcher/Resources/Pages/WelcomePage1.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage2.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage5.xaml: Language not supported
Comments suppressed due to low confidence (1)
Flow.Launcher/Helper/WallpaperPathRetrieval.cs:49
- The fileStream variable is opened but not used when initializing BitmapImage with UriSource. Consider removing this unused fileStream to clean up the code.
using var fileStream = File.OpenRead(wallpaperPath);
What's the PR