osk and cheatsheet: multimonitor

This commit is contained in:
end-4
2024-04-03 19:16:15 +07:00
parent 21cdcba7c1
commit a59fceca4c
7 changed files with 75 additions and 70 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
import { keybindList } from "./data_keybinds.js";
export const Keybinds = () => Widget.Box({
export default () => Widget.Box({
vertical: false,
className: "spacing-h-15",
homogeneous: true,
+8 -9
View File
@@ -1,11 +1,10 @@
const { Gdk, Gtk } = imports.gi;
const { Gtk } = imports.gi;
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
import Service from 'resource:///com/github/Aylur/ags/service.js';
import { Keybinds } from "./keybinds.js";
import { setupCursorHover } from "../.widgetutils/cursorhover.js";
import PopupWindow from '../.widgethacks/popupwindow.js';
import Keybinds from "./keybinds.js";
const cheatsheetHeader = () => Widget.CenterBox({
const CheatsheetHeader = () => Widget.CenterBox({
vertical: false,
startWidget: Widget.Box({}),
centerWidget: Widget.Box({
@@ -63,26 +62,26 @@ const cheatsheetHeader = () => Widget.CenterBox({
}),
});
const clickOutsideToClose = Widget.EventBox({
const ClickOutsideToClose = () => Widget.EventBox({
onPrimaryClick: () => App.closeWindow('cheatsheet'),
onSecondaryClick: () => App.closeWindow('cheatsheet'),
onMiddleClick: () => App.closeWindow('cheatsheet'),
});
export default () => PopupWindow({
name: 'cheatsheet',
export default (id) => PopupWindow({
name: `cheatsheet${id}`,
exclusivity: 'ignore',
keymode: 'exclusive',
visible: false,
child: Widget.Box({
vertical: true,
children: [
clickOutsideToClose,
ClickOutsideToClose(),
Widget.Box({
vertical: true,
className: "cheatsheet-bg spacing-v-15",
children: [
cheatsheetHeader(),
CheatsheetHeader(),
Keybinds(),
]
}),