Made the settings menu significantly more responsive. (#454)
This commit is contained in:
@@ -43,40 +43,38 @@ const pagerMap: Page[] = [
|
||||
export const SettingsMenu = (): GBox => {
|
||||
return Widget.Box({
|
||||
vertical: true,
|
||||
children: CurrentPage.bind('value').as((v) => {
|
||||
return [
|
||||
Widget.Box({
|
||||
class_name: 'option-pages-container',
|
||||
hpack: 'center',
|
||||
hexpand: true,
|
||||
children: pagerMap.map((page) => {
|
||||
return Widget.Button({
|
||||
hpack: 'center',
|
||||
class_name: `pager-button ${v === page ? 'active' : ''}`,
|
||||
label: page,
|
||||
on_primary_click: () => (CurrentPage.value = page),
|
||||
});
|
||||
}),
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: 'option-pages-container',
|
||||
hpack: 'center',
|
||||
hexpand: true,
|
||||
children: pagerMap.map((page) => {
|
||||
return Widget.Button({
|
||||
hpack: 'center',
|
||||
class_name: CurrentPage.bind('value').as((v) => `pager-button ${v === page ? 'active' : ''}`),
|
||||
label: page,
|
||||
on_primary_click: () => (CurrentPage.value = page),
|
||||
});
|
||||
}),
|
||||
Widget.Stack({
|
||||
vexpand: true,
|
||||
class_name: 'themes-menu-stack',
|
||||
children: {
|
||||
General: BarGeneral(),
|
||||
Bar: BarSettings(),
|
||||
'Media Menu': MediaMenuSettings(),
|
||||
Notifications: NotificationSettings(),
|
||||
OSD: OSDSettings(),
|
||||
Volume: VolumeMenuSettings(),
|
||||
'Clock Menu': ClockMenuSettings(),
|
||||
'Dashboard Menu': DashboardMenuSettings(),
|
||||
'Custom Modules': CustomModuleSettings(),
|
||||
'Bluetooth Menu': BluetoothMenuSettings(),
|
||||
'Power Menu': PowerMenuSettings(),
|
||||
},
|
||||
shown: CurrentPage.bind('value'),
|
||||
}),
|
||||
];
|
||||
}),
|
||||
}),
|
||||
Widget.Stack({
|
||||
vexpand: true,
|
||||
class_name: 'themes-menu-stack',
|
||||
children: {
|
||||
General: BarGeneral(),
|
||||
Bar: BarSettings(),
|
||||
'Media Menu': MediaMenuSettings(),
|
||||
Notifications: NotificationSettings(),
|
||||
OSD: OSDSettings(),
|
||||
Volume: VolumeMenuSettings(),
|
||||
'Clock Menu': ClockMenuSettings(),
|
||||
'Dashboard Menu': DashboardMenuSettings(),
|
||||
'Custom Modules': CustomModuleSettings(),
|
||||
'Bluetooth Menu': BluetoothMenuSettings(),
|
||||
'Power Menu': PowerMenuSettings(),
|
||||
},
|
||||
shown: CurrentPage.bind('value'),
|
||||
}),
|
||||
],
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user