add setting for showing minimize button
This commit is contained in:
parent
66cfb0e2c6
commit
9c83ae573a
3 changed files with 44 additions and 15 deletions
|
|
@ -77,6 +77,40 @@ class SettingsSectionsController
|
|||
title: "Behavior",
|
||||
icon: Icons.psychology,
|
||||
settings: .new([
|
||||
.new(
|
||||
title: "All Rooms In Home",
|
||||
description: "Show all rooms in home, instead of just ones that aren't in spaces",
|
||||
icon: Icons.home,
|
||||
builder: (title, description, icon) => SwitchListTile(
|
||||
title: Text(title),
|
||||
subtitle: Text(description),
|
||||
secondary: Icon(icon),
|
||||
value: settings.showAllInHome,
|
||||
onChanged: (value) => ref
|
||||
.watch(SettingsController.provider.notifier)
|
||||
.set(settings.copyWith(showAllInHome: value))
|
||||
.onError(showError),
|
||||
),
|
||||
),
|
||||
if (!Platform.isAndroid && !Platform.isIOS)
|
||||
.new(
|
||||
title: "Show Minimize Button",
|
||||
description:
|
||||
"Enable this to add a minimize button to the appbar",
|
||||
icon: Icons.minimize,
|
||||
builder: (title, description, icon) => SwitchListTile(
|
||||
title: Text(title),
|
||||
subtitle: Text(description),
|
||||
secondary: Icon(icon),
|
||||
value: settings.showMinimizeButton,
|
||||
onChanged: Platform.isLinux
|
||||
? (value) => ref
|
||||
.watch(SettingsController.provider.notifier)
|
||||
.set(settings.copyWith(showMinimizeButton: value))
|
||||
.onError(showError)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
.new(
|
||||
title: "Linux Mobile Mode",
|
||||
description: "Enables some fixes for Linux mobile, e.g. disabling dragging appbar for moving window.",
|
||||
|
|
@ -94,23 +128,6 @@ class SettingsSectionsController
|
|||
: null,
|
||||
),
|
||||
),
|
||||
.new(
|
||||
title: "All Rooms In Home",
|
||||
description: "Show all rooms in home, instead of just ones that aren't in spaces",
|
||||
icon: Icons.home,
|
||||
builder: (title, description, icon) => SwitchListTile(
|
||||
title: Text(title),
|
||||
subtitle: Text(description),
|
||||
secondary: Icon(icon),
|
||||
value: settings.showAllInHome,
|
||||
onChanged: Platform.isLinux
|
||||
? (value) => ref
|
||||
.watch(SettingsController.provider.notifier)
|
||||
.set(settings.copyWith(showAllInHome: value))
|
||||
.onError(showError)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue