mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
Merge branch 'feat/desktop-webview' into dev
This commit is contained in:
commit
0d9fb1d388
@ -1,4 +1,4 @@
|
||||
{
|
||||
"flutterSdkVersion": "3.22.1",
|
||||
"flutterSdkVersion": "3.22.3",
|
||||
"flavors": {}
|
||||
}
|
2
.github/workflows/spotube-release-binary.yml
vendored
2
.github/workflows/spotube-release-binary.yml
vendored
@ -20,7 +20,7 @@ on:
|
||||
description: Dry run without uploading to release
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: 3.19.6
|
||||
FLUTTER_VERSION: 3.22.3
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
21
lib/hooks/configurators/use_fix_window_stretching.dart
Normal file
21
lib/hooks/configurators/use_fix_window_stretching.dart
Normal file
@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:spotube/utils/platform.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
void useFixWindowStretching() {
|
||||
useEffect(() {
|
||||
if (!kIsWindows) return;
|
||||
WidgetsBinding.instance.addPostFrameCallback((Duration timeStamp) async {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 100), () {
|
||||
windowManager.getSize().then((Size value) {
|
||||
windowManager.setSize(
|
||||
Size(value.width + 1, value.height + 1),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return null;
|
||||
}, []);
|
||||
}
|
@ -19,6 +19,7 @@ import 'package:spotube/collections/intents.dart';
|
||||
import 'package:spotube/hooks/configurators/use_close_behavior.dart';
|
||||
import 'package:spotube/hooks/configurators/use_deep_linking.dart';
|
||||
import 'package:spotube/hooks/configurators/use_disable_battery_optimizations.dart';
|
||||
import 'package:spotube/hooks/configurators/use_fix_window_stretching.dart';
|
||||
import 'package:spotube/hooks/configurators/use_get_storage_perms.dart';
|
||||
import 'package:spotube/models/database/database.dart';
|
||||
import 'package:spotube/provider/audio_player/audio_player_streams.dart';
|
||||
@ -143,6 +144,7 @@ class Spotube extends HookConsumerWidget {
|
||||
ref.listen(serverProvider, (_, __) {});
|
||||
ref.listen(trayManagerProvider, (_, __) {});
|
||||
|
||||
useFixWindowStretching();
|
||||
useDisableBatteryOptimizations();
|
||||
useDeepLinking(ref);
|
||||
useCloseBehavior(ref);
|
||||
|
@ -19,14 +19,13 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||
|
||||
flutter::DartProject project(L"data");
|
||||
|
||||
std::vector<std::string> command_line_arguments =
|
||||
GetCommandLineArguments();
|
||||
std::vector<std::string> command_line_arguments = GetCommandLineArguments();
|
||||
|
||||
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
||||
|
||||
FlutterWindow window(project);
|
||||
Win32Window::Point origin(10, 10);
|
||||
Win32Window::Size size(1280, 720);
|
||||
Win32Window::Size size(1200, 800);
|
||||
if (!window.CreateAndShow(L"spotube", origin, size)) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user