From b8aae5a4c06aa416ffdb82c894724902a96f0064 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 1 Jun 2024 21:50:24 +0800 Subject: [PATCH] :lipstick: Changes for desktop windows --- android/app/src/main/AndroidManifest.xml | 2 +- .../navigation/app_navigation_rail.dart | 1 + linux/my_application.cc | 4 +- macos/Podfile.lock | 59 +++++++++++++++++++ macos/Runner/Base.lproj/MainMenu.xib | 20 ++++--- macos/Runner/MainFlutterWindow.swift | 1 + web/index.html | 2 +- web/manifest.json | 4 +- windows/CMakeLists.txt | 2 +- windows/runner/main.cpp | 4 +- 10 files changed, 81 insertions(+), 18 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index bfd1322..8cb14fa 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -4,7 +4,7 @@ { ), ) .toList(), + groupAlignment: 0, labelType: NavigationRailLabelType.all, selectedIndex: _selectedIndex, onDestinationSelected: (idx) { diff --git a/linux/my_application.cc b/linux/my_application.cc index 33714c0..d7e8fc0 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -44,10 +44,10 @@ static void my_application_activate(GApplication* application) { gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "solian"); + gtk_window_set_title(window, "Solian"); } - gtk_window_set_default_size(window, 1280, 720); + gtk_window_set_default_size(window, 380, 600); gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new(); diff --git a/macos/Podfile.lock b/macos/Podfile.lock index efb5b01..b4474f3 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -1,46 +1,105 @@ PODS: + - connectivity_plus (0.0.1): + - Flutter + - FlutterMacOS + - device_info_plus (0.0.1): + - FlutterMacOS - file_selector_macos (0.0.1): - FlutterMacOS - flutter_local_notifications (0.0.1): - FlutterMacOS - flutter_secure_storage_macos (6.1.1): - FlutterMacOS + - flutter_webrtc (0.9.36): + - FlutterMacOS + - WebRTC-SDK (= 114.5735.10) - FlutterMacOS (1.0.0) + - livekit_client (2.1.5): + - FlutterMacOS + - WebRTC-SDK (= 114.5735.10) + - package_info_plus (0.0.1): + - FlutterMacOS - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS + - sqflite (0.0.3): + - Flutter + - FlutterMacOS - url_launcher_macos (0.0.1): - FlutterMacOS + - video_player_avfoundation (0.0.1): + - Flutter + - FlutterMacOS + - wakelock_plus (0.0.1): + - FlutterMacOS + - WebRTC-SDK (114.5735.10) DEPENDENCIES: + - connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/darwin`) + - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) - flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`) - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) + - flutter_webrtc (from `Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos`) - FlutterMacOS (from `Flutter/ephemeral`) + - livekit_client (from `Flutter/ephemeral/.symlinks/plugins/livekit_client/macos`) + - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) + - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/darwin`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) + - video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`) + - wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`) + +SPEC REPOS: + trunk: + - WebRTC-SDK EXTERNAL SOURCES: + connectivity_plus: + :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/darwin + device_info_plus: + :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos file_selector_macos: :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos flutter_local_notifications: :path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos flutter_secure_storage_macos: :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos + flutter_webrtc: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_webrtc/macos FlutterMacOS: :path: Flutter/ephemeral + livekit_client: + :path: Flutter/ephemeral/.symlinks/plugins/livekit_client/macos + package_info_plus: + :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos path_provider_foundation: :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin + sqflite: + :path: Flutter/ephemeral/.symlinks/plugins/sqflite/darwin url_launcher_macos: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos + video_player_avfoundation: + :path: Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin + wakelock_plus: + :path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos SPEC CHECKSUMS: + connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db + device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720 file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2 flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4 flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9 + flutter_webrtc: 823284e171ecb2487b7210c214886a949c122a59 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + livekit_client: ca5f0447742014b6e462c27b71d49dcf03ec0446 + package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 + video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3 + wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269 + WebRTC-SDK: 8c0edd05b880a39648118192c252667ea06dea51 PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib index 80e867a..4f389be 100644 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ b/macos/Runner/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -13,7 +13,7 @@ - + @@ -22,9 +22,9 @@ - + - + @@ -330,14 +330,16 @@ - + - - + + + - + + diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift index 3cc05eb..9215a01 100644 --- a/macos/Runner/MainFlutterWindow.swift +++ b/macos/Runner/MainFlutterWindow.swift @@ -7,6 +7,7 @@ class MainFlutterWindow: NSWindow { let windowFrame = self.frame self.contentViewController = flutterViewController self.setFrame(windowFrame, display: true) + self.minSize = NSSize(width: 380, height: 600) RegisterGeneratedPlugins(registry: flutterViewController) diff --git a/web/index.html b/web/index.html index 84d3c5e..a0246ab 100644 --- a/web/index.html +++ b/web/index.html @@ -23,7 +23,7 @@ - + diff --git a/web/manifest.json b/web/manifest.json index 2e16699..b0b0fec 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "solian", - "short_name": "solian", + "name": "Solian", + "short_name": "Solian", "start_url": ".", "display": "standalone", "background_color": "#ffffff", diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 9b9505e..eecfb06 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -4,7 +4,7 @@ project(solian LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "solian") +set(BINARY_NAME "Solian") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp index 02a014d..719caaf 100644 --- a/windows/runner/main.cpp +++ b/windows/runner/main.cpp @@ -26,8 +26,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.Create(L"solian", origin, size)) { + Win32Window::Size size(380, 600); + if (!window.Create(L"Solian", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true);