mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
chore: Make desktop controls more consistent
This commit is contained in:
parent
39547163c3
commit
c9ce5b9b90
2 changed files with 7 additions and 2 deletions
|
|
@ -362,7 +362,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer)
|
||||
if (AdaptiveLayout.isDesktop(context))
|
||||
Tooltip(
|
||||
message: context.localized.stop,
|
||||
child: IconButton(
|
||||
|
|
@ -379,7 +379,7 @@ class _DesktopControlsState extends ConsumerState<DesktopControls> {
|
|||
),
|
||||
),
|
||||
},
|
||||
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer &&
|
||||
if (AdaptiveLayout.isDesktop(context) &&
|
||||
AdaptiveLayout.viewSizeOf(context) > ViewSize.phone) ...[
|
||||
VideoVolumeSlider(
|
||||
onChanged: () => resetTimer(),
|
||||
|
|
|
|||
|
|
@ -93,6 +93,11 @@ class AdaptiveLayout extends InheritedWidget {
|
|||
return result?.data.controller[tab] ?? ScrollController();
|
||||
}
|
||||
|
||||
static bool isDesktop(BuildContext context) {
|
||||
final AdaptiveLayout? result = maybeOf(context);
|
||||
return result?.data.isDesktop ?? false;
|
||||
}
|
||||
|
||||
static EdgeInsets adaptivePadding(BuildContext context, {double horizontalPadding = 16}) {
|
||||
final viewPadding = MediaQuery.paddingOf(context);
|
||||
final padding = viewPadding.copyWith(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue