mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55: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,22 +208,24 @@ class SidebarHeader extends HookWidget {
|
||||
);
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
if (kIsMacOS) const SizedBox(height: 25),
|
||||
Row(
|
||||
children: [
|
||||
Sidebar.brandLogo(),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Spotube",
|
||||
style: theme.textTheme.titleLarge,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
return DragToMoveArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
if (kIsMacOS) const SizedBox(height: 25),
|
||||
Row(
|
||||
children: [
|
||||
Sidebar.brandLogo(),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Spotube",
|
||||
style: theme.textTheme.titleLarge,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -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