diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 61c6429895e49a938b328569fe993534a8a06617..cab03fa503890783235b81d0a94d76c724bef1b8 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
gint width = 0;
gint height = 0;
if ( gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height ) ) {
- gint newWidth = (width > 18) ? (width / 2) : ((width * 2) / 3);
- gint newHeight = (height > 18) ? (height / 2) : ((height * 2) / 3);
+ gint newWidth = ((width * 3) / 4);
+ gint newHeight = ((height * 3) / 4);
GtkIconSize newSizeEnum = gtk_icon_size_register( "inkscape-decoration", newWidth, newHeight );
if ( newSizeEnum ) {
if ( dump ) {
GTK_ICON_SIZE_MENU
};
for (unsigned i = 0; i < G_N_ELEMENTS(gtkSizes) && init; ++i) {
- unsigned const val_ix(gtkSizes[i]);
+ guint const val_ix = (gtkSizes[i] <= GTK_ICON_SIZE_DIALOG) ? (guint)gtkSizes[i] : (guint)Inkscape::ICON_SIZE_DECORATION;
+
g_assert( val_ix < G_N_ELEMENTS(vals) );
gint width = 0;
GtkWidget *icon = (GtkWidget *)g_object_new(SP_TYPE_ICON, NULL);
for (unsigned i = 0; i < G_N_ELEMENTS(gtkSizes); ++i) {
- unsigned const val_ix(gtkSizes[i]);
+ guint const val_ix = (gtkSizes[i] <= GTK_ICON_SIZE_DIALOG) ? (guint)gtkSizes[i] : (guint)Inkscape::ICON_SIZE_DECORATION;
+
g_assert( val_ix < G_N_ELEMENTS(vals) );
gint width = 0;