feat(ags osk): move exclusive toggle to thingy

This commit is contained in:
matt1432 2023-11-28 16:29:17 -05:00
parent a82c8617c1
commit 4a892528ff
2 changed files with 34 additions and 36 deletions

View file

@ -23,9 +23,34 @@ export default (window) => Box({
background-color: ${COLOR};
`),
center_widget: Box({
center_widget: CenterBox({
class_name: 'thingy',
css: `background: ${COLOR};`,
center_widget: Box({
hpack: 'center',
class_name: 'settings',
children: [
ToggleButton({
cursor: 'pointer',
class_name: 'button',
active: true,
vpack: 'center',
connections: [['toggled', (self) => {
self.toggleClassName(
'toggled',
self.get_active(),
);
window.exclusivity = self.get_active() ?
'exclusive' :
'normal';
}]],
child: Label('Exclusive'),
}),
],
}),
}),
end_widget: RoundedCorner('bottomleft', `
@ -70,30 +95,6 @@ export default (window) => Box({
vpack: 'center',
children: [
Box({
class_name: 'settings',
children: [
ToggleButton({
cursor: 'pointer',
class_name: 'button',
active: true,
vpack: 'center',
connections: [['toggled', (self) => {
self.toggleClassName(
'toggled',
self.get_active(),
);
window.exclusivity = self.get_active() ?
'exclusive' :
'normal';
}]],
child: Label('Exclusive'),
}),
],
}),
],
}),

View file

@ -2,29 +2,26 @@
border-radius: 2rem 2rem 0 0;
min-height: 2.7rem;
min-width: 20rem;
}
.osk {
padding-top: 4px;
border-radius: 10px 10px 0;
.settings {
background-color: $bg;
border: 0.08rem solid $darkbg;
border-radius: 0.7rem;
padding: 0.6rem;
padding: 0.5rem;
.button {
background-color: $bgfull;
border: 0.08rem solid $darkbg;
border: 0.1rem solid $darkbg;
border-radius: 0.7rem;
padding: 0.5rem;
padding: 0.3rem;
&.toggled {
background-color: $contrast-bg;
}
}
}
}
.osk {
padding-top: 4px;
border-radius: 10px 10px 0;
.side {
.key {