mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Fix for different per-monitor scaling (#657)
* Use DPIAware::DEFAULT_DPI * Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI. * Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls * Increase PCH memory limit for settings project * Address review issues * Draw zoneWindows properly scaled
This commit is contained in:
@@ -23,6 +23,9 @@ namespace FancyZonesEditor
|
||||
/// </summary>
|
||||
public partial class MainWindow : MetroWindow
|
||||
{
|
||||
// TODO: share the constants b/w C# Editor and FancyZoneLib
|
||||
public static int MAX_ZONES = 40;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -57,7 +60,7 @@ namespace FancyZonesEditor
|
||||
|
||||
private void IncrementZones_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_settings.ZoneCount < 40)
|
||||
if (_settings.ZoneCount < MAX_ZONES)
|
||||
{
|
||||
_settings.ZoneCount++;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ namespace FancyZonesEditor
|
||||
// 1 = unique key for per-monitor settings
|
||||
// 2 = layoutid used to generate current layout (used to pick the default layout to show)
|
||||
// 3 = handle to monitor (passed back to engine to persist data)
|
||||
// 4 = X_Y_Width_Height (where EditorOverlay shows up)
|
||||
// 4 = X_Y_Width_Height in a dpi-scaled-but-unaware coords (where EditorOverlay shows up)
|
||||
// 5 = resolution key (passed back to engine to persist data)
|
||||
// 6 = monitor DPI (float)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user