Tweak default window size.

This commit is contained in:
Alexander Shaduri
2017-10-06 10:26:43 +00:00
parent 19f2bcf286
commit 9f39db9517
2 changed files with 10 additions and 6 deletions
+8 -4
View File
@@ -86,15 +86,19 @@ class GscMainWindowIconView : public Gtk::IconView {
// nothing
}
// Adwaita's drive-harddisk icons are really small at 48, so 64 is better.
// Plus, it scales well to 128 and 256 (if using GDK_SCALE).
const int icon_size = 64;
// Try XDG version first
try {
hd_icon = default_icon_theme->load_icon("drive-harddisk", 64, get_scale_factor(), Gtk::IconLookupFlags(0));
hd_icon = default_icon_theme->load_icon("drive-harddisk", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
if (!hd_icon) {
// Before gtk 3.10 it was called gtk-harddisk.
try {
hd_icon = default_icon_theme->load_icon("gtk-harddisk", 64, get_scale_factor(), Gtk::IconLookupFlags(0));
hd_icon = default_icon_theme->load_icon("gtk-harddisk", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
}
if (!hd_icon) {
@@ -109,13 +113,13 @@ class GscMainWindowIconView : public Gtk::IconView {
// Try XDG version first
try {
cddvd_icon = default_icon_theme->load_icon("media-optical", 64, get_scale_factor(), Gtk::IconLookupFlags(0));
cddvd_icon = default_icon_theme->load_icon("media-optical", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
if (!cddvd_icon) {
// Before gtk 3.10 it was called gtk-cdrom.
try {
cddvd_icon = default_icon_theme->load_icon("gtk-cdrom", 64, get_scale_factor(), Gtk::IconLookupFlags(0));
cddvd_icon = default_icon_theme->load_icon("gtk-cdrom", icon_size, get_scale_factor(), Gtk::IconLookupFlags(0));
} catch (...) { } // ignore exceptions
}
if (!cddvd_icon) {
+2 -2
View File
@@ -5,8 +5,8 @@
<object class="GtkWindow" id="gsc_main_window">
<property name="can_focus">False</property>
<property name="title" translatable="yes">GSmartControl</property>
<property name="default_width">600</property>
<property name="default_height">540</property>
<property name="default_width">560</property>
<property name="default_height">450</property>
<child>
<object class="GtkBox" id="vbox1">
<property name="visible">True</property>