refactor(ags): separate tablet toggle from bar.js
This commit is contained in:
parent
ac869537e7
commit
a47507b171
2 changed files with 21 additions and 17 deletions
|
@ -1,10 +1,11 @@
|
||||||
const { Window, CenterBox, Box } = ags.Widget;
|
const { Window, CenterBox, Box } = ags.Widget;
|
||||||
|
|
||||||
import { Separator, EventBox } from '../common.js';
|
import { Separator } from '../common.js';
|
||||||
import { CurrentWindow } from './current-window.js';
|
import { CurrentWindow } from './current-window.js';
|
||||||
import { Workspaces } from './workspaces.js';
|
import { Workspaces } from './workspaces.js';
|
||||||
import { OskToggle } from './osk-toggle.js'
|
import { OskToggle } from './osk-toggle.js';
|
||||||
import { Heart } from './heart.js'
|
import { Heart } from './heart.js';
|
||||||
|
import { TabletToggle } from './tablet-toggle.js';
|
||||||
|
|
||||||
export const Bar = Window({
|
export const Bar = Window({
|
||||||
name: 'left-bar',
|
name: 'left-bar',
|
||||||
|
@ -29,18 +30,7 @@ export const Bar = Window({
|
||||||
|
|
||||||
Separator(12),
|
Separator(12),
|
||||||
|
|
||||||
EventBox({
|
TabletToggle,
|
||||||
className: 'toggle-off',
|
|
||||||
onPrimaryClickRelease: '',
|
|
||||||
child: ags.Widget.Box({
|
|
||||||
className: 'tablet-toggle',
|
|
||||||
vertical: false,
|
|
||||||
|
|
||||||
child: ags.Widget.Label({
|
|
||||||
label: " ",
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
|
|
||||||
Separator(12),
|
Separator(12),
|
||||||
|
|
||||||
|
@ -59,6 +49,7 @@ export const Bar = Window({
|
||||||
// Right
|
// Right
|
||||||
Box({
|
Box({
|
||||||
halign: 'end',
|
halign: 'end',
|
||||||
|
children: [],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
|
13
config/ags/js/bar/tablet-toggle.js
Normal file
13
config/ags/js/bar/tablet-toggle.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { EventBox } from '../common.js';
|
||||||
|
|
||||||
|
export const TabletToggle = EventBox({
|
||||||
|
className: 'toggle-off',
|
||||||
|
onPrimaryClickRelease: '',
|
||||||
|
child: ags.Widget.Box({
|
||||||
|
className: 'tablet-toggle',
|
||||||
|
vertical: false,
|
||||||
|
child: ags.Widget.Label({
|
||||||
|
label: " ",
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
});
|
Loading…
Reference in a new issue