mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-01-30 17:07:02 +00:00
Add text wrap toggle to logs screen
This commit is contained in:
parent
5afc1ef692
commit
a1df22ae75
1 changed files with 25 additions and 0 deletions
|
@ -45,6 +45,31 @@ class _SiteLogsScreenState extends State<SiteLogsScreen> {
|
||||||
|
|
||||||
return SimplePage(
|
return SimplePage(
|
||||||
title: title,
|
title: title,
|
||||||
|
trailingActions: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 8),
|
||||||
|
child: IconButton.filledTonal(
|
||||||
|
// Fixes enormous button on iOS, this *should* be the default, but it seems to be overridden.
|
||||||
|
iconSize: 24,
|
||||||
|
style: Platform.isIOS
|
||||||
|
? IconButton.styleFrom(
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
|
// Match background when not selected on iOS
|
||||||
|
backgroundColor: settings.logWrap ? null : Colors.transparent,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
isSelected: settings.logWrap,
|
||||||
|
tooltip: "Turn ${settings.logWrap ? "off" : "on"} text wrapping",
|
||||||
|
selectedIcon: const Icon(Icons.wrap_text_outlined),
|
||||||
|
icon: const Icon(Icons.wrap_text),
|
||||||
|
onPressed: () => {
|
||||||
|
setState(() {
|
||||||
|
settings.logWrap = !settings.logWrap;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
scrollable: SimpleScrollable.both,
|
scrollable: SimpleScrollable.both,
|
||||||
scrollController: controller,
|
scrollController: controller,
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
|
|
Loading…
Reference in a new issue