mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
[FancyZones] Update 'span zones across monitors' feature description and add message box warning accordingly (#6381)
* Update span accross monitors feature description in Settings App * Add warning if scalings are different * Address PR comments * Address comment
This commit is contained in:
@@ -700,7 +700,7 @@
|
|||||||
<value>Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity.</value>
|
<value>Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FancyZones_SpanZonesAcrossMonitorsCheckBoxControl.Content" xml:space="preserve">
|
<data name="FancyZones_SpanZonesAcrossMonitorsCheckBoxControl.Content" xml:space="preserve">
|
||||||
<value>Allow zones to span across monitors</value>
|
<value>Allow zones to span across monitors (all monitors must have the same DPI scaling)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ImageResizer_Formatting_ActualHeight.Text" xml:space="preserve">
|
<data name="ImageResizer_Formatting_ActualHeight.Text" xml:space="preserve">
|
||||||
<value>Actual height</value>
|
<value>Actual height</value>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
|
#include <common/common.h>
|
||||||
#include <common/dpi_aware.h>
|
#include <common/dpi_aware.h>
|
||||||
#include <common/on_thread_executor.h>
|
#include <common/on_thread_executor.h>
|
||||||
#include <common/window_helpers.h>
|
#include <common/window_helpers.h>
|
||||||
@@ -18,6 +19,8 @@
|
|||||||
|
|
||||||
#include <lib/SecondaryMouseButtonsHook.h>
|
#include <lib/SecondaryMouseButtonsHook.h>
|
||||||
|
|
||||||
|
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||||
|
|
||||||
enum class DisplayChangeType
|
enum class DisplayChangeType
|
||||||
{
|
{
|
||||||
WorkArea,
|
WorkArea,
|
||||||
@@ -628,6 +631,29 @@ void FancyZones::ToggleEditor() noexcept
|
|||||||
allMonitors = FancyZonesUtils::GetAllMonitorRects<&MONITORINFOEX::rcWork>();
|
allMonitors = FancyZonesUtils::GetAllMonitorRects<&MONITORINFOEX::rcWork>();
|
||||||
} }).wait();
|
} }).wait();
|
||||||
|
|
||||||
|
UINT currentDpi = 0;
|
||||||
|
for (const auto& monitor : allMonitors)
|
||||||
|
{
|
||||||
|
UINT dpiX = 0;
|
||||||
|
UINT dpiY = 0;
|
||||||
|
if (GetDpiForMonitor(monitor.first, MDT_EFFECTIVE_DPI, &dpiX, &dpiY) == S_OK)
|
||||||
|
{
|
||||||
|
if (currentDpi == 0)
|
||||||
|
{
|
||||||
|
currentDpi = dpiX;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (currentDpi != dpiX)
|
||||||
|
{
|
||||||
|
MessageBoxW(NULL,
|
||||||
|
GET_RESOURCE_STRING(IDS_SPAN_ACROSS_ZONES_WARNING).c_str(),
|
||||||
|
GET_RESOURCE_STRING(IDS_POWERTOYS_FANCYZONES).c_str(),
|
||||||
|
MB_OK | MB_ICONWARNING);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (auto& [monitor, workArea] : allMonitors)
|
for (auto& [monitor, workArea] : allMonitors)
|
||||||
{
|
{
|
||||||
const auto x = workArea.left;
|
const auto x = workArea.left;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
<value>Show zones on all monitors while dragging a window</value>
|
<value>Show zones on all monitors while dragging a window</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Setting_Description_Span_Zones_Across_Monitors" xml:space="preserve">
|
<data name="Setting_Description_Span_Zones_Across_Monitors" xml:space="preserve">
|
||||||
<value>Allow zones to span across monitors</value>
|
<value>Allow zones to span across monitors (all monitors must have the same DPI scaling)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Setting_Description_Make_Dragged_Window_Transparent" xml:space="preserve">
|
<data name="Setting_Description_Make_Dragged_Window_Transparent" xml:space="preserve">
|
||||||
<value>Make dragged window transparent</value>
|
<value>Make dragged window transparent</value>
|
||||||
@@ -213,4 +213,7 @@
|
|||||||
<data name="Powertoys_FancyZones" xml:space="preserve">
|
<data name="Powertoys_FancyZones" xml:space="preserve">
|
||||||
<value>PowerToys - FancyZones</value>
|
<value>PowerToys - FancyZones</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Span_Across_Zones_Warning" xml:space="preserve">
|
||||||
|
<value>The 'Allow zones to span across monitors' option requires all monitors to have the same DPI scaling to work properly.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user