mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Fix compiler warning (#1492)
This commit is contained in:
@@ -224,7 +224,7 @@ namespace ZoneWindowDrawUtils
|
||||
RGB(175, 175, 185),
|
||||
};
|
||||
|
||||
// { fillAlpha, fill, borderAlpha, border, thickness }
|
||||
// ColorSetting { fillAlpha, fill, borderAlpha, border, thickness }
|
||||
ColorSetting const colorHints{ 225, RGB(81, 92, 107), 255, RGB(104, 118, 138), -2 };
|
||||
ColorSetting colorViewer{ OpacitySettingToAlpha(highlightOpacity), 0, 255, RGB(40, 50, 60), -2 };
|
||||
ColorSetting colorHighlight{ OpacitySettingToAlpha(highlightOpacity), 0, 255, 0, -2 };
|
||||
|
||||
@@ -140,10 +140,10 @@ inline void ParseDeviceId(PCWSTR deviceId, PWSTR parsedId, size_t size)
|
||||
}
|
||||
}
|
||||
|
||||
inline int OpacitySettingToAlpha(int opacity)
|
||||
inline unsigned char OpacitySettingToAlpha(int opacity)
|
||||
{
|
||||
// convert percentage to a 0-255 alpha value
|
||||
return static_cast<int>(opacity * 2.55);
|
||||
return static_cast<unsigned char>(opacity * 2.55);
|
||||
}
|
||||
|
||||
UINT GetDpiForMonitor(HMONITOR monitor) noexcept;
|
||||
Reference in New Issue
Block a user