Set initial window size.

This commit is contained in:
Dain Nilsson 2021-12-07 12:41:32 +01:00
parent 9700a2d896
commit f90f513ca0
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
2 changed files with 4 additions and 4 deletions

View File

@ -40,14 +40,14 @@ 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, "yubico_authenticator"); gtk_header_bar_set_title(header_bar, "Yubico Authenticator");
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, "yubico_authenticator"); gtk_window_set_title(window, "Yubico Authenticator");
} }
gtk_window_set_default_size(window, 1280, 720); gtk_window_set_default_size(window, 400, 720);
gtk_widget_show(GTK_WIDGET(window)); gtk_widget_show(GTK_WIDGET(window));
g_autoptr(FlDartProject) project = fl_dart_project_new(); g_autoptr(FlDartProject) project = fl_dart_project_new();

View File

@ -46,7 +46,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(400, 720);
if (!window.CreateAndShow(L"Yubico Authenticator", origin, size)) { if (!window.CreateAndShow(L"Yubico Authenticator", origin, size)) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }