mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-19 05:00:21 +02:00
Make less obvious target highlighting optional
This commit is contained in:
@@ -452,7 +452,11 @@ class AppsPageState extends State<AppsPage> {
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
color: Theme.of(context).primaryColor.withAlpha(20)),
|
||||
color: Theme.of(context).primaryColor.withAlpha(
|
||||
(settingsProvider.highlightTouchTargets &&
|
||||
showChangesFn != null)
|
||||
? 20
|
||||
: 0)),
|
||||
padding: const EdgeInsets.fromLTRB(12, 0, 12, 0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
@@ -484,6 +484,21 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
})
|
||||
],
|
||||
),
|
||||
height16,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(tr('highlightTouchTargets'))),
|
||||
Switch(
|
||||
value:
|
||||
settingsProvider.highlightTouchTargets,
|
||||
onChanged: (value) {
|
||||
settingsProvider.highlightTouchTargets =
|
||||
value;
|
||||
})
|
||||
],
|
||||
),
|
||||
height32,
|
||||
Text(
|
||||
tr('categories'),
|
||||
|
@@ -348,4 +348,13 @@ class SettingsProvider with ChangeNotifier {
|
||||
prefs?.setBool('showDebugOpts', val);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get highlightTouchTargets {
|
||||
return prefs?.getBool('highlightTouchTargets') ?? false;
|
||||
}
|
||||
|
||||
set highlightTouchTargets(bool val) {
|
||||
prefs?.setBool('highlightTouchTargets', val);
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user