1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-20 10:13:17 +00:00

Fixed DPI scaling of privacy bar on windows

This commit is contained in:
Bryan Roe
2022-02-09 22:47:42 -08:00
parent f13f01eef1
commit 7f7edbf0b0
3 changed files with 34 additions and 4 deletions

View File

@@ -221,6 +221,12 @@ function windows_notifybar_local(title)
monHeight = (m[i].bottom - m[i].top);
barWidth = Math.floor(monWidth * 0.30);
barHeight = Math.floor(monHeight * 0.035);
if (m[i].dpi != null)
{
barHeight = Math.floor(m[i].dpi / 3);
barWidth = Math.floor(m[i].dpi * 9);
if (barWidth > monWidth) { barWidth = monWidth; }
}
console.info1('Monitor: ' + i + ' = Width[' + (m[i].right - m[i].left) + '] BarHeight[' + barHeight + '] BarWidth[' + barWidth + ']');
offset = Math.floor(monWidth * 0.50) - Math.floor(barWidth * 0.50);