fix: unify platform window titles as Gopeed (#1494)

This commit is contained in:
Levi authored and GitHub committed 2026-09-10 23:03:43 +08:00
1 parent 0cc2b690f8
commit 5f89ae3516
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(
debugShowCheckedModeBanner: false,
disableBrowserContextMenu: false,
onGenerateTitle: (context) => context.l10n.appTitle,
title: 'Gopeed',
theme: AppTheme.light(themeColor),
darkTheme: AppTheme.dark(themeColor),
materialTheme: isLightTheme ? AppTheme.materialLight(themeColor) : AppTheme.materialDark(themeColor),
@@ -16,6 +16,7 @@ class AppWindowBootstrap {
await windowManager.ensureInitialized();
final windowOptions = WindowOptions(
title: 'Gopeed',
size: const Size(1024, 768),
center: true,
skipTaskbar: false,
@@ -74,8 +75,8 @@ class AppWindowBootstrap {
static String subWindowTitle(AppWindowType type, AppLocalizations l10n) {
return switch (type) {
AppWindowType.createTask => '${l10n.create} - Gopeed',
_ => l10n.appTitle,
AppWindowType.createTask => 'Gopeed - ${l10n.create}',
_ => 'Gopeed',
};
}
+2 -2
View File
@@ -48,11 +48,11 @@ static void my_application_activate(GApplication* application) {
if (use_header_bar) {
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
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_window_set_titlebar(window, GTK_WIDGET(header_bar));
} else {
gtk_window_set_title(window, "gopeed");
gtk_window_set_title(window, "Gopeed");
}
gtk_window_set_default_size(window, 1280, 720);
@@ -330,7 +330,7 @@
</items>
<point key="canvasLocation" x="142" y="-258"/>
</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"/>
<rect key="contentRect" x="335" y="390" width="800" height="600"/>
<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', () {
expect(
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', () {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "gopeed",
"short_name": "gopeed",
"name": "Gopeed",
"short_name": "Gopeed",
"start_url": ".",
"display": "standalone",
"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");
std::vector<std::string> command_line_arguments = GetCommandLineArguments();
if (!IsMultiWindowLaunch(command_line_arguments) &&
SendAppLinkToInstance(L"gopeed")) {
SendAppLinkToInstance(L"Gopeed")) {
return EXIT_SUCCESS;
}
@@ -71,7 +71,7 @@ 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"gopeed", origin, size)) {
if (!window.Create(L"Gopeed", origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);