mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
[Mouse Highlighter]Change opacity setting to 1-100 (#20964)
* mouse highlighter opacity 1-100
This commit is contained in:
committed by
GitHub
parent
982415f578
commit
a2638d01dc
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "pch.h"
|
||||
|
||||
constexpr int MOUSE_HIGHLIGHTER_DEFAULT_OPACITY = 160;
|
||||
constexpr int MOUSE_HIGHLIGHTER_DEFAULT_OPACITY = 65;
|
||||
const winrt::Windows::UI::Color MOUSE_HIGHLIGHTER_DEFAULT_LEFT_BUTTON_COLOR = winrt::Windows::UI::ColorHelper::FromArgb(MOUSE_HIGHLIGHTER_DEFAULT_OPACITY, 255, 255, 0);
|
||||
const winrt::Windows::UI::Color MOUSE_HIGHLIGHTER_DEFAULT_RIGHT_BUTTON_COLOR = winrt::Windows::UI::ColorHelper::FromArgb(MOUSE_HIGHLIGHTER_DEFAULT_OPACITY, 0, 0, 255);
|
||||
constexpr int MOUSE_HIGHLIGHTER_DEFAULT_RADIUS = 20;
|
||||
|
||||
@@ -215,6 +215,13 @@ public:
|
||||
{
|
||||
Logger::warn("Failed to initialize Opacity from settings. Will use default value");
|
||||
}
|
||||
|
||||
// Convert % to uint8_t
|
||||
if ((std::wstring)settingsObject.GetNamedString(L"version") != L"1.0")
|
||||
{
|
||||
opacity = opacity * 255 / 100;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Parse left button click color
|
||||
|
||||
Reference in New Issue
Block a user