Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native Client UI Scaling
Related Issue: Issue #1198
Description
This PR introduces global UI scaling for the OpenBullet 2 Native Client. It addresses the issue of the application interface appearing too small on high-resolution displays (1440p, 4K) by allowing users to adjust the interface scale factor from 50% to 200%.
Changes
OpenBullet2.Core: Added a
UiScale
property to
CustomizationSettings
to persist the scaling factor.
OpenBullet2.Native/MainWindow.xaml: Implemented a LayoutTransform with a ScaleTransform on the Root grid, bound to the scaling setting. This ensures the entire UI scales proportionally without blurring.
OpenBullet2.Native/Views/Pages/OBSettings.xaml: Added a "UI Scale (%)" control under the Customization section in OB Settings.
OpenBullet2.Native/ViewModels/OBSettingsViewModel.cs: Added properties to manage the settings UI and trigger real-time scaling updates.
OpenBullet2.Native/MainWindow.xaml.cs: Updated the
MainWindowViewModel
to handle scaling notifications and persist the state across application restarts.
Motivation and Context
On high-DPI monitors, the default Native Client UI can be difficult to read. While system-level scaling helps, providing an in-app setting allows users to fine-tune the OpenBullet 2 interface specifically for their needs without affecting other applications.
Dependencies
None (uses existing MahApps.Metro and standard WPF transforms).