mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-25 05:27:07 +01:00
Compare commits
9 Commits
copilot/fi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d34109ba61 | ||
|
|
ad9de0b54b | ||
|
|
1a2b4e2f3e | ||
|
|
5feab1c9f1 | ||
|
|
7b413375aa | ||
|
|
abc574d486 | ||
|
|
f97d680fb1 | ||
|
|
94887b0ebb | ||
|
|
14a45e3e8c |
1
.github/actions/spell-check/allow/code.txt
vendored
1
.github/actions/spell-check/allow/code.txt
vendored
@@ -94,6 +94,7 @@ onefuzzingestionpreparationtool
|
||||
OTP
|
||||
Yubi
|
||||
Yubico
|
||||
Perplexity
|
||||
svgl
|
||||
|
||||
# KEYS
|
||||
|
||||
2
.github/actions/spell-check/allow/names.txt
vendored
2
.github/actions/spell-check/allow/names.txt
vendored
@@ -29,6 +29,8 @@ shortcutguide
|
||||
|
||||
# 8LWXpg is user name but user folder causes a flag
|
||||
LWXpg
|
||||
# 0x6f677548 is user name but user folder causes a flag
|
||||
x6f677548
|
||||
Adoumie
|
||||
Advaith
|
||||
alekhyareddy
|
||||
|
||||
@@ -73,4 +73,5 @@ Below are community created plugins that target a website or software. They are
|
||||
| [YubicoOauthOTP](https://github.com/dlnilsson/Community.PowerToys.Run.Plugin.YubicoOauthOTP) | [dlnilsson](https://github.com/dlnilsson) | Display generated codes from OATH accounts stored on the YubiKey in powerToys Run |
|
||||
| [Firefox Bookmark](https://github.com/8LWXpg/PowerToysRun-FirefoxBookmark) | [8LWXpg](https://github.com/8LWXpg) | Open bookmarks in Firefox based browser |
|
||||
| [Linear](https://github.com/vednig/powertoys-linear) | [vednig](https://github.com/vednig) | Create Linear Issues directly from Powertoys Run |
|
||||
| [PerplexitySearchShortcut](https://github.com/0x6f677548/PowerToys-Run-PerplexitySearchShortcut) | [0x6f677548](https://github.com/0x6f677548) | Search Perplexity |
|
||||
| [SpeedTest](https://github.com/ruslanlap/PowerToysRun-SpeedTest) | [ruslanlap](https://github.com/ruslanlap) | One-command internet speed tests with real-time results, modern UI, and shareable links. |
|
||||
|
||||
@@ -20,10 +20,10 @@ namespace
|
||||
bool isLayoutDefault(const LayoutData& layout)
|
||||
{
|
||||
return layout.type == FancyZonesDataTypes::ZoneSetLayoutType::PriorityGrid &&
|
||||
layout.zoneCount == 3 &&
|
||||
layout.spacing == 16 &&
|
||||
layout.showSpacing == true &&
|
||||
layout.sensitivityRadius == 20;
|
||||
layout.zoneCount == DefaultValues::ZoneCount &&
|
||||
layout.spacing == DefaultValues::Spacing &&
|
||||
layout.showSpacing == DefaultValues::ShowSpacing &&
|
||||
layout.sensitivityRadius == DefaultValues::SensitivityRadius;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@ namespace DefaultValues
|
||||
{
|
||||
const int ZoneCount = 3;
|
||||
const bool ShowSpacing = true;
|
||||
const int Spacing = 16;
|
||||
const int Spacing = 4;
|
||||
const int SensitivityRadius = 20;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,31 @@
|
||||
|
||||
#include <common/logger/logger.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
int AdjustSpacingForRegistry(int originalSpacing)
|
||||
{
|
||||
// Check Windows DWM ColorPrevalence setting
|
||||
// When ColorPrevalence = 0 (accent color not shown), subtract 1 from spacing
|
||||
HKEY hKey;
|
||||
DWORD dwValue = 1; // Default to 1 (accent color shown)
|
||||
DWORD dwSize = sizeof(DWORD);
|
||||
|
||||
if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\DWM", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
||||
{
|
||||
RegQueryValueExW(hKey, L"ColorPrevalence", nullptr, nullptr, reinterpret_cast<LPBYTE>(&dwValue), &dwSize);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
// Apply -1 margin when ColorPrevalence = 0 (accent color not shown)
|
||||
if (dwValue == 0)
|
||||
{
|
||||
return originalSpacing - 1;
|
||||
}
|
||||
return originalSpacing;
|
||||
}
|
||||
}
|
||||
|
||||
namespace ZoneSelectionAlgorithms
|
||||
{
|
||||
constexpr int OVERLAPPING_CENTERS_SENSITIVITY = 75;
|
||||
@@ -128,6 +153,7 @@ bool Layout::Init(const FancyZonesUtils::Rect& workArea, HMONITOR monitor) noexc
|
||||
}
|
||||
|
||||
auto spacing = m_data.showSpacing ? m_data.spacing : 0;
|
||||
spacing = AdjustSpacingForRegistry(spacing);
|
||||
|
||||
switch (m_data.type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user