fix: unify platform window titles as Gopeed

This commit is contained in:
Levi committed 2026-09-08 23:15:55 +08:00
1 parent 481675107f
commit 7c3d7269fe
7 files changed
+13 -12

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ class _GopeedAppState extends ConsumerState<GopeedApp> with WidgetsBindingObserv
return shad.ShadcnApp.router( return shad.ShadcnApp.router(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
disableBrowserContextMenu: false, disableBrowserContextMenu: false,
onGenerateTitle: (context) => context.l10n.appTitle, title: 'Gopeed',
theme: AppTheme.light(themeColor), theme: AppTheme.light(themeColor),
darkTheme: AppTheme.dark(themeColor), darkTheme: AppTheme.dark(themeColor),
materialTheme: isLightTheme ? AppTheme.materialLight(themeColor) : AppTheme.materialDark(themeColor), materialTheme: isLightTheme ? AppTheme.materialLight(themeColor) : AppTheme.materialDark(themeColor),
@@ -16,6 +16,7 @@ class AppWindowBootstrap {
await windowManager.ensureInitialized(); await windowManager.ensureInitialized();
final windowOptions = WindowOptions( final windowOptions = WindowOptions(
title: 'Gopeed',
size: const Size(1024, 768), size: const Size(1024, 768),
center: true, center: true,
skipTaskbar: false, skipTaskbar: false,
@@ -74,8 +75,8 @@ class AppWindowBootstrap {
static String subWindowTitle(AppWindowType type, AppLocalizations l10n) { static String subWindowTitle(AppWindowType type, AppLocalizations l10n) {
return switch (type) { return switch (type) {
AppWindowType.createTask => '${l10n.create} - Gopeed', AppWindowType.createTask => 'Gopeed-${l10n.create}',
_ => l10n.appTitle, _ => 'Gopeed',
}; };
} }
+2 -2
View File
@@ -48,11 +48,11 @@ static void my_application_activate(GApplication* application) {
if (use_header_bar) { if (use_header_bar) {
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar)); gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "gopeed"); gtk_header_bar_set_title(header_bar, "Gopeed");
gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
} else { } else {
gtk_window_set_title(window, "gopeed"); gtk_window_set_title(window, "Gopeed");
} }
gtk_window_set_default_size(window, 1280, 720); gtk_window_set_default_size(window, 1280, 720);
@@ -330,7 +330,7 @@
</items> </items>
<point key="canvasLocation" x="142" y="-258"/> <point key="canvasLocation" x="142" y="-258"/>
</menu> </menu>
<window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target"> <window title="Gopeed" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<rect key="contentRect" x="335" y="390" width="800" height="600"/> <rect key="contentRect" x="335" y="390" width="800" height="600"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/> <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
@@ -9,9 +9,9 @@ void main() {
test('create-task child window has a localized native title', () { test('create-task child window has a localized native title', () {
expect( expect(
AppWindowBootstrap.subWindowTitle(AppWindowType.createTask, appLocalizationsFor('en')), AppWindowBootstrap.subWindowTitle(AppWindowType.createTask, appLocalizationsFor('en')),
'Create Task - Gopeed', 'Gopeed-Create Task',
); );
expect(AppWindowBootstrap.subWindowTitle(AppWindowType.createTask, appLocalizationsFor('zh')), '创建任务 - Gopeed'); expect(AppWindowBootstrap.subWindowTitle(AppWindowType.createTask, appLocalizationsFor('zh')), 'Gopeed-创建任务');
}); });
test('create-task payload only carries initial task data', () { test('create-task payload only carries initial task data', () {
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "gopeed", "name": "Gopeed",
"short_name": "gopeed", "short_name": "Gopeed",
"start_url": ".", "start_url": ".",
"display": "standalone", "display": "standalone",
"background_color": "#0175C2", "background_color": "#0175C2",
+2 -2
View File
@@ -56,7 +56,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
flutter::DartProject project(L"data"); flutter::DartProject project(L"data");
std::vector<std::string> command_line_arguments = GetCommandLineArguments(); std::vector<std::string> command_line_arguments = GetCommandLineArguments();
if (!IsMultiWindowLaunch(command_line_arguments) && if (!IsMultiWindowLaunch(command_line_arguments) &&
SendAppLinkToInstance(L"gopeed")) { SendAppLinkToInstance(L"Gopeed")) {
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
@@ -71,7 +71,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
FlutterWindow window(project); FlutterWindow window(project);
Win32Window::Point origin(10, 10); Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720); Win32Window::Size size(1280, 720);
if (!window.Create(L"gopeed", origin, size)) { if (!window.Create(L"Gopeed", origin, size)) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
window.SetQuitOnClose(true); window.SetQuitOnClose(true);