diff --git a/docs/api/app.md b/docs/api/app.md index 6492a4853213..21ed9c9824bb 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -1182,7 +1182,7 @@ Show the app's about panel options. These options can be overridden with `app.se * `credits` String (optional) - Credit information. _macOS_ * `authors` String[] (optional) - List of app authors. _Linux_ * `website` String (optional) - The app's website. _Linux_ - * `iconPath` String (optional) - Path to the app's icon. _Linux_ + * `iconPath` String (optional) - Path to the app's icon. Will be shown as 64x64 pixels while retaining aspect ratio. _Linux_ Set the about panel options. This will override the values defined in the app's `.plist` file on MacOS. See the [Apple docs][about-panel-options] for more details. On Linux, values must be set in order to be shown; there are no defaults. diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index 8689beddf6ca..6ebd6af76b62 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -167,7 +167,12 @@ void Browser::ShowAboutPanel() { } if ((str = opts.FindStringKey("iconPath"))) { GError* error = nullptr; - GdkPixbuf* icon = gdk_pixbuf_new_from_file(str->c_str(), &error); + constexpr int width = 64; // width of about panel icon in pixels + constexpr int height = 64; // height of about panel icon in pixels + + // set preserve_aspect_ratio to true + GdkPixbuf* icon = + gdk_pixbuf_new_from_file_at_size(str->c_str(), width, height, &error); if (error != nullptr) { g_warning("%s", error->message); g_clear_error(&error);