fix: set size of GTK about panel icon (#18957)
This commit is contained in:
parent
2b3a256647
commit
5298358b72
2 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue