diff --git a/plugins/gtkui/medialib/medialibwidget.c b/plugins/gtkui/medialib/medialibwidget.c index 31fed531ba..38153dde33 100644 --- a/plugins/gtkui/medialib/medialibwidget.c +++ b/plugins/gtkui/medialib/medialibwidget.c @@ -735,8 +735,8 @@ _receive_cover (w_medialib_viewer_t *mlv, GtkTreePath *path, GdkPixbuf *img) { GtkAllocation a; a.x = 0; a.y = 0; - a.width = 16; - a.height = 16; + a.width = ML_CELL_RENDERER_PIXBUF_SIZE; + a.height = ML_CELL_RENDERER_PIXBUF_SIZE; GdkPixbuf *scaled_img = covermanager_create_scaled_image (covermanager_shared (), img, a); GtkTreeStore *store = mlv->store; @@ -870,11 +870,9 @@ w_medialib_viewer_create (void) { gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (w->tree)); GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); -#if GTK_CHECK_VERSION(3, 0, 0) - w->folder_icon = gtk_icon_theme_load_icon (icon_theme, "folder-music", 16, 0, NULL); -#else - w->folder_icon = gtk_icon_theme_load_icon (icon_theme, "folder", 16, 0, NULL); -#endif + // NOTE: using "folder-music" icon doesn't yield a good result, + // since it doesn't look like a folder across the icon themes. + w->folder_icon = gtk_icon_theme_load_icon (icon_theme, "folder", ML_CELL_RENDERER_PIXBUF_SIZE, 0, NULL); ddb_artwork_plugin_t *artwork_plugin = (ddb_artwork_plugin_t *)deadbeef->plug_get_for_id ("artwork2"); if (artwork_plugin != NULL) { w->artwork_source_id = artwork_plugin->allocate_source_id (); diff --git a/plugins/gtkui/medialib/mlcellrendererpixbuf.c b/plugins/gtkui/medialib/mlcellrendererpixbuf.c index a8eef01c3c..b9f56cb5f1 100644 --- a/plugins/gtkui/medialib/mlcellrendererpixbuf.c +++ b/plugins/gtkui/medialib/mlcellrendererpixbuf.c @@ -128,10 +128,10 @@ static void _get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) { #endif if (width != NULL) { - *width = 16; + *width = ML_CELL_RENDERER_PIXBUF_SIZE; } if (height != NULL) { - *height = 16; + *height = ML_CELL_RENDERER_PIXBUF_SIZE; } } @@ -153,8 +153,8 @@ _render ( GdkRectangle pix_rect; pix_rect.x = cell_area->x; pix_rect.y = cell_area->y; - pix_rect.width = 16; - pix_rect.height = 16; + pix_rect.width = ML_CELL_RENDERER_PIXBUF_SIZE; + pix_rect.height = ML_CELL_RENDERER_PIXBUF_SIZE; GdkRectangle draw_rect; if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) { diff --git a/plugins/gtkui/medialib/mlcellrendererpixbuf.h b/plugins/gtkui/medialib/mlcellrendererpixbuf.h index 4d71cebf1a..890c534713 100644 --- a/plugins/gtkui/medialib/mlcellrendererpixbuf.h +++ b/plugins/gtkui/medialib/mlcellrendererpixbuf.h @@ -28,6 +28,8 @@ G_BEGIN_DECLS +#define ML_CELL_RENDERER_PIXBUF_SIZE 24 + typedef struct { void *ctx; GdkPixbuf *(*cell_did_became_visible) (void *ctx, const char *path);