mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
fix(desktop): titlebar drag to move not working
This commit is contained in:
parent
6591ec0e1b
commit
5f280a19f4
@ -26,6 +26,7 @@ import 'package:spotube/provider/user_preferences/user_preferences_provider.dart
|
||||
import 'package:spotube/provider/user_preferences/user_preferences_state.dart';
|
||||
import 'package:spotube/utils/platform.dart';
|
||||
import 'package:spotube/utils/service_utils.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
class Sidebar extends HookConsumerWidget {
|
||||
final Widget child;
|
||||
@ -207,7 +208,8 @@ class SidebarHeader extends HookWidget {
|
||||
);
|
||||
}
|
||||
|
||||
return Padding(
|
||||
return DragToMoveArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
@ -224,6 +226,7 @@ class SidebarHeader extends HookWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,10 @@ class _PageWindowTitleBarState extends ConsumerState<PageWindowTitleBar> {
|
||||
leadingWidth: widget.leadingWidth,
|
||||
toolbarTextStyle: widget.toolbarTextStyle,
|
||||
titleTextStyle: widget.titleTextStyle,
|
||||
title: widget.title,
|
||||
title: SizedBox(
|
||||
width: double.infinity, // workaround to force dragging
|
||||
child: widget.title ?? const Text(""),
|
||||
),
|
||||
pinned: widget.pinned,
|
||||
floating: widget.floating,
|
||||
snap: widget.snap,
|
||||
@ -164,7 +167,10 @@ class _PageWindowTitleBarState extends ConsumerState<PageWindowTitleBar> {
|
||||
leadingWidth: widget.leadingWidth,
|
||||
toolbarTextStyle: widget.toolbarTextStyle,
|
||||
titleTextStyle: widget.titleTextStyle,
|
||||
title: widget.title,
|
||||
title: SizedBox(
|
||||
width: double.infinity, // workaround to force dragging
|
||||
child: widget.title ?? const Text(""),
|
||||
),
|
||||
scrolledUnderElevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
forceMaterialTransparency: true,
|
||||
|
Loading…
Reference in New Issue
Block a user