adding fancy zone opacity setting, enhancement #631 (#1008)

* adding fancy zone opacity setting, enhancement #631

* applying zone opacity setting to all zones during zone selection

* changing opacity setting to percentage
This commit is contained in:
Yosef Durr
2020-01-06 09:59:18 -08:00
committed by Clint Rutkas
parent 3ffd007cc0
commit a2a683d31e
9 changed files with 29 additions and 4 deletions

View File

@@ -68,6 +68,10 @@ public:
}
return GUID_NULL;
}
IFACEMETHODIMP_(int) GetZoneHighlightOpacity() noexcept
{
return m_settings->GetSettings().zoneHighlightOpacity;
}
LRESULT WndProc(HWND, UINT, WPARAM, LPARAM) noexcept;
void OnDisplayChange(DisplayChangeType changeType) noexcept;
@@ -321,7 +325,6 @@ void FancyZones::ToggleEditor() noexcept
monitor = MonitorFromWindow(foregroundWindow, MONITOR_DEFAULTTOPRIMARY);
}
if (!monitor)
{
return;
@@ -352,7 +355,7 @@ void FancyZones::ToggleEditor() noexcept
const auto taskbar_x_offset = MulDiv(mi.rcWork.left - mi.rcMonitor.left, DPIAware::DEFAULT_DPI, dpi_x);
const auto taskbar_y_offset = MulDiv(mi.rcWork.top - mi.rcMonitor.top, DPIAware::DEFAULT_DPI, dpi_y);
// Do not scale window params by the dpi, that will be done in the editor - see LayoutModel.Apply
const auto x = mi.rcMonitor.left + taskbar_x_offset;
const auto y = mi.rcMonitor.top + taskbar_y_offset;