fix screen size for multimonitor and scaled screens (#417) (#424)

This commit is contained in:
end-4
2024-04-25 15:20:15 +07:00
parent 0added30e2
commit 29a66a6ede
7 changed files with 44 additions and 73 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
const { Gdk } = imports.gi;
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
import PopupWindow from '../.widgethacks/popupwindow.js';
import { SCREEN_HEIGHT, SCREEN_WIDTH } from '../../variables.js';
import { monitors } from '../.miscutils/hyprlanddata.js';
const WINDOWS_NEED_CLICK2CLOSE = [
'sideleft', 'sideright', 'overview', 'cheatsheet'
@@ -43,8 +43,8 @@ export default (monitor = 0) => PopupWindow({
child: Widget.Box({
css: `
${userOptions.appearance.layerSmoke ? 'background-color: rgba(0,0,0,' + String(userOptions.appearance.layerSmokeStrength) + ');' : ''}
min-height: ${SCREEN_HEIGHT}px;
min-width: ${SCREEN_WIDTH}px;
min-height: ${monitors[monitor].height}px;
min-width: ${monitors[monitor].width}px;
`
}),
})