mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Spelling: ... fancyzones (#3777)
* spelling: defined * spelling: excluded * spelling: guid * spelling: highlight * spelling: original * spelling: nonexistent
This commit is contained in:
@@ -146,7 +146,7 @@ public:
|
||||
GetZoneHighlightColor() noexcept
|
||||
{
|
||||
// Skip the leading # and convert to long
|
||||
const auto color = m_settings->GetSettings()->zoneHightlightColor;
|
||||
const auto color = m_settings->GetSettings()->zoneHighlightColor;
|
||||
const auto tmp = std::stol(color.substr(1), nullptr, 16);
|
||||
const auto nR = (tmp & 0xFF0000) >> 16;
|
||||
const auto nG = (tmp & 0xFF00) >> 8;
|
||||
|
||||
@@ -261,10 +261,10 @@ namespace JSONHelpers
|
||||
return it != end(deviceInfoMap) ? std::optional{ it->second } : std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<CustomZoneSetData> FancyZonesData::FindCustomZoneSet(const std::wstring& guuid) const
|
||||
std::optional<CustomZoneSetData> FancyZonesData::FindCustomZoneSet(const std::wstring& guid) const
|
||||
{
|
||||
std::scoped_lock lock{ dataLock };
|
||||
auto it = customZoneSetsMap.find(guuid);
|
||||
auto it = customZoneSetsMap.find(guid);
|
||||
return it != end(customZoneSetsMap) ? std::optional{ it->second } : std::nullopt;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace JSONHelpers
|
||||
|
||||
std::optional<DeviceInfoData> FindDeviceInfo(const std::wstring& zoneWindowId) const;
|
||||
|
||||
std::optional<CustomZoneSetData> FindCustomZoneSet(const std::wstring& guuid) const;
|
||||
std::optional<CustomZoneSetData> FindCustomZoneSet(const std::wstring& guid) const;
|
||||
|
||||
inline const std::wstring GetActiveDeviceId() const
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
|
||||
const std::wstring m_zoneColorName = L"fancyzones_zoneColor";
|
||||
const std::wstring m_zoneBorderColorName = L"fancyzones_zoneBorderColor";
|
||||
const std::wstring m_zoneHiglightName = L"fancyzones_zoneHighlightColor";
|
||||
const std::wstring m_zoneHighlightName = L"fancyzones_zoneHighlightColor";
|
||||
const std::wstring m_editorHotkeyName = L"fancyzones_editor_hotkey";
|
||||
const std::wstring m_excludedAppsName = L"fancyzones_excluded_apps";
|
||||
const std::wstring m_zoneHighlightOpacity = L"fancyzones_highlight_opacity";
|
||||
@@ -84,13 +84,13 @@ IFACEMETHODIMP_(bool) FancyZonesSettings::GetConfig(_Out_ PWSTR buffer, _Out_ in
|
||||
settings.add_bool_toggle(setting.name, setting.resourceId, *setting.value);
|
||||
}
|
||||
|
||||
settings.add_color_picker(m_zoneHiglightName, IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, m_settings.zoneHightlightColor);
|
||||
settings.add_color_picker(m_zoneHighlightName, IDS_SETTING_DESCRIPTION_ZONEHIGHLIGHTCOLOR, m_settings.zoneHighlightColor);
|
||||
settings.add_color_picker(m_zoneColorName, IDS_SETTING_DESCRIPTION_ZONECOLOR, m_settings.zoneColor);
|
||||
settings.add_color_picker(m_zoneBorderColorName, IDS_SETTING_DESCRIPTION_ZONE_BORDER_COLOR, m_settings.zoneBorderColor);
|
||||
|
||||
settings.add_int_spinner(m_zoneHighlightOpacity, IDS_SETTINGS_HIGHLIGHT_OPACITY, m_settings.zoneHighlightOpacity, 0, 100, 1);
|
||||
|
||||
settings.add_multiline_string(m_excludedAppsName, IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION, m_settings.excludedApps);
|
||||
settings.add_multiline_string(m_excludedAppsName, IDS_SETTING_EXCLUDED_APPS_DESCRIPTION, m_settings.excludedApps);
|
||||
|
||||
return settings.serialize_to_buffer(buffer, buffer_size);
|
||||
}
|
||||
@@ -144,9 +144,9 @@ void FancyZonesSettings::LoadSettings(PCWSTR config, bool fromFile) noexcept try
|
||||
m_settings.zoneBorderColor = std::move(*val);
|
||||
}
|
||||
|
||||
if (auto val = values.get_string_value(m_zoneHiglightName))
|
||||
if (auto val = values.get_string_value(m_zoneHighlightName))
|
||||
{
|
||||
m_settings.zoneHightlightColor = std::move(*val);
|
||||
m_settings.zoneHighlightColor = std::move(*val);
|
||||
}
|
||||
|
||||
if (const auto val = values.get_json(m_editorHotkeyName))
|
||||
@@ -195,7 +195,7 @@ void FancyZonesSettings::SaveSettings() noexcept try
|
||||
|
||||
values.add_property(m_zoneColorName, m_settings.zoneColor);
|
||||
values.add_property(m_zoneBorderColorName, m_settings.zoneBorderColor);
|
||||
values.add_property(m_zoneHiglightName, m_settings.zoneHightlightColor);
|
||||
values.add_property(m_zoneHighlightName, m_settings.zoneHighlightColor);
|
||||
values.add_property(m_zoneHighlightOpacity, m_settings.zoneHighlightOpacity);
|
||||
values.add_property(m_editorHotkeyName, m_settings.editorHotkey.get_json());
|
||||
values.add_property(m_excludedAppsName, m_settings.excludedApps);
|
||||
|
||||
@@ -19,7 +19,7 @@ struct Settings
|
||||
bool makeDraggedWindowTransparent = true;
|
||||
std::wstring zoneColor = L"#F5FCFF";
|
||||
std::wstring zoneBorderColor = L"#FFFFFF";
|
||||
std::wstring zoneHightlightColor = L"#008CFF";
|
||||
std::wstring zoneHighlightColor = L"#008CFF";
|
||||
int zoneHighlightOpacity = 50;
|
||||
PowerToysSettings::HotkeyObject editorHotkey = PowerToysSettings::HotkeyObject::from_settings(true, false, false, false, VK_OEM_3);
|
||||
std::wstring excludedApps = L"";
|
||||
|
||||
@@ -166,7 +166,7 @@ void WindowMoveHandlerPrivate::MoveSizeStart(HWND window, HMONITOR monitor, POIN
|
||||
}
|
||||
else if (m_zoneWindowMoveSize)
|
||||
{
|
||||
m_zoneWindowMoveSize->RestoreOrginalTransparency();
|
||||
m_zoneWindowMoveSize->RestoreOriginalTransparency();
|
||||
m_zoneWindowMoveSize = nullptr;
|
||||
for (auto [keyMonitor, zoneWindow] : zoneWindowMap)
|
||||
{
|
||||
@@ -200,7 +200,7 @@ void WindowMoveHandlerPrivate::MoveSizeUpdate(HMONITOR monitor, POINT const& ptS
|
||||
{
|
||||
if (zoneWindow)
|
||||
{
|
||||
zoneWindow->RestoreOrginalTransparency();
|
||||
zoneWindow->RestoreOriginalTransparency();
|
||||
zoneWindow->HideZoneWindow();
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,7 @@ void WindowMoveHandlerPrivate::MoveSizeUpdate(HMONITOR monitor, POINT const& ptS
|
||||
if (iter->second != m_zoneWindowMoveSize)
|
||||
{
|
||||
// The drag has moved to a different monitor.
|
||||
m_zoneWindowMoveSize->RestoreOrginalTransparency();
|
||||
m_zoneWindowMoveSize->RestoreOriginalTransparency();
|
||||
|
||||
if (!m_settings->GetSettings()->showZonesOnAllMonitors)
|
||||
{
|
||||
|
||||
@@ -575,12 +575,12 @@ bool ZoneSet::CalculateUniquePriorityGridLayout(Rect workArea, int zoneCount, in
|
||||
|
||||
bool ZoneSet::CalculateCustomLayout(Rect workArea, int spacing) noexcept
|
||||
{
|
||||
wil::unique_cotaskmem_string guuidStr;
|
||||
if (SUCCEEDED_LOG(StringFromCLSID(m_config.Id, &guuidStr)))
|
||||
wil::unique_cotaskmem_string guidStr;
|
||||
if (SUCCEEDED_LOG(StringFromCLSID(m_config.Id, &guidStr)))
|
||||
{
|
||||
const std::wstring guuid = guuidStr.get();
|
||||
const std::wstring guid = guidStr.get();
|
||||
|
||||
const auto zoneSetSearchResult = JSONHelpers::FancyZonesDataInstance().FindCustomZoneSet(guuid);
|
||||
const auto zoneSetSearchResult = JSONHelpers::FancyZonesDataInstance().FindCustomZoneSet(guid);
|
||||
|
||||
if (!zoneSetSearchResult.has_value())
|
||||
{
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
IFACEMETHODIMP MoveSizeUpdate(POINT const& ptScreen, bool dragEnabled) noexcept;
|
||||
IFACEMETHODIMP MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept;
|
||||
IFACEMETHODIMP_(void)
|
||||
RestoreOrginalTransparency() noexcept;
|
||||
RestoreOriginalTransparency() noexcept;
|
||||
IFACEMETHODIMP_(bool)
|
||||
IsDragEnabled() noexcept { return m_dragEnabled; }
|
||||
IFACEMETHODIMP_(void)
|
||||
@@ -402,7 +402,7 @@ IFACEMETHODIMP ZoneWindow::MoveSizeUpdate(POINT const& ptScreen, bool dragEnable
|
||||
|
||||
IFACEMETHODIMP ZoneWindow::MoveSizeEnd(HWND window, POINT const& ptScreen) noexcept
|
||||
{
|
||||
RestoreOrginalTransparency();
|
||||
RestoreOriginalTransparency();
|
||||
|
||||
if (m_windowMoveSize != window)
|
||||
{
|
||||
@@ -425,7 +425,7 @@ IFACEMETHODIMP ZoneWindow::MoveSizeEnd(HWND window, POINT const& ptScreen) noexc
|
||||
}
|
||||
|
||||
IFACEMETHODIMP_(void)
|
||||
ZoneWindow::RestoreOrginalTransparency() noexcept
|
||||
ZoneWindow::RestoreOriginalTransparency() noexcept
|
||||
{
|
||||
if (m_host->isMakeDraggedWindowTransparentActive() && draggedWindow != nullptr)
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ interface __declspec(uuid("{7F017528-8110-4FB3-BE41-F472969C2560}")) IZoneWindow
|
||||
/**
|
||||
* Restore original transaprency of dragged window.
|
||||
*/
|
||||
IFACEMETHOD_(void, RestoreOrginalTransparency) () = 0;
|
||||
IFACEMETHOD_(void, RestoreOriginalTransparency) () = 0;
|
||||
/**
|
||||
* Save information about zone in which window was assigned, when closing the window.
|
||||
* Used once we open same window again to assign it to its previous zone.
|
||||
|
||||
@@ -24,7 +24,7 @@ BEGIN
|
||||
IDS_SETTING_LAUNCH_EDITOR_BUTTON "Edit zones"
|
||||
IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION "To launch the zone editor, select the Edit zones button below or press the zone editor hotkey anytime"
|
||||
IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL "Configure the zone editor hotkey"
|
||||
IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings."
|
||||
IDS_SETTING_EXCLUDED_APPS_DESCRIPTION "To exclude an application from snapping to zones add its name here (one per line). Excluded apps will react to the Windows Snap regardless of all other settings."
|
||||
IDS_SETTINGS_HIGHLIGHT_OPACITY "Zone opacity (%)"
|
||||
IDS_FANCYZONES L"FancyZones"
|
||||
IDS_CANT_DRAG_ELEVATED L"We've detected an application running with administrator privileges. This blocks some functionality in PowerToys. Visit our wiki page to learn more."
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#define IDS_SETTING_LAUNCH_EDITOR_BUTTON 117
|
||||
#define IDS_SETTING_LAUNCH_EDITOR_DESCRIPTION 118
|
||||
#define IDS_SETTING_LAUNCH_EDITOR_HOTKEY_LABEL 119
|
||||
#define IDS_SETTING_EXCLCUDED_APPS_DESCRIPTION 120
|
||||
#define IDS_SETTING_EXCLUDED_APPS_DESCRIPTION 120
|
||||
#define IDS_SETTINGS_HIGHLIGHT_OPACITY 121
|
||||
#define IDS_FANCYZONES 122
|
||||
#define IDS_CANT_DRAG_ELEVATED 123
|
||||
|
||||
@@ -189,7 +189,7 @@ void Trace::SettingsChanged(const Settings& settings) noexcept
|
||||
TraceLoggingBoolean(settings.makeDraggedWindowTransparent, "MakeDraggedWindowTransparent"),
|
||||
TraceLoggingWideString(settings.zoneColor.c_str(), "ZoneColor"),
|
||||
TraceLoggingWideString(settings.zoneBorderColor.c_str(), "ZoneBorderColor"),
|
||||
TraceLoggingWideString(settings.zoneHightlightColor.c_str(), "ZoneHighlightColor"),
|
||||
TraceLoggingWideString(settings.zoneHighlightColor.c_str(), "ZoneHighlightColor"),
|
||||
TraceLoggingInt32(settings.zoneHighlightOpacity, "ZoneHighlightOpacity"),
|
||||
TraceLoggingWideString(hotkeyStr.c_str(), "Hotkey"),
|
||||
TraceLoggingInt32(static_cast<int>(settings.excludedAppsArray.size()), "ExcludedAppsCount"));
|
||||
|
||||
@@ -120,4 +120,4 @@ UINT GetDpiForMonitor(HMONITOR monitor) noexcept;
|
||||
void OrderMonitors(std::vector<std::pair<HMONITOR, RECT>>& monitorInfo);
|
||||
void SizeWindowToRect(HWND window, RECT rect) noexcept;
|
||||
|
||||
bool IsInterestingWindow(HWND window, const std::vector<std::wstring>& exludedApps) noexcept;
|
||||
bool IsInterestingWindow(HWND window, const std::vector<std::wstring>& excludedApps) noexcept;
|
||||
Reference in New Issue
Block a user