diff --git a/src/taskbar/task.c b/src/taskbar/task.c index 86f6ed6..d0e70ca 100644 --- a/src/taskbar/task.c +++ b/src/taskbar/task.c @@ -655,12 +655,13 @@ void task_refresh_thumbnail(Task *task) return; if (task->current_state == TASK_ICONIFIED) return; + Panel *panel = (Panel*)task->area.panel; double now = get_time(); if (now - task->thumbnail_last_update < 0.1) return; if (debug_thumbnails) fprintf(stderr, "tint2: thumbnail for window: %s" RESET "\n", task->title ? task->title : ""); - cairo_surface_t *thumbnail = get_window_thumbnail(task->win, panel_config.g_task.thumbnail_width); + cairo_surface_t *thumbnail = get_window_thumbnail(task->win, panel_config.g_task.thumbnail_width * panel->scale); if (!thumbnail) return; if (task->thumbnail) diff --git a/src/tooltip/tooltip.c b/src/tooltip/tooltip.c index 9cbcdc7..ffeeba7 100644 --- a/src/tooltip/tooltip.c +++ b/src/tooltip/tooltip.c @@ -281,7 +281,9 @@ void tooltip_update() Color fc = g_tooltip.font_color; cairo_set_source_rgba(c, fc.rgb[0], fc.rgb[1], fc.rgb[2], fc.alpha); - PangoLayout *layout = pango_cairo_create_layout(c); + PangoContext *context = pango_cairo_create_context(c); + pango_cairo_context_set_resolution(context, 96 * panel->scale); + PangoLayout *layout = pango_layout_new(context); pango_layout_set_font_description(layout, g_tooltip.font_desc); pango_layout_set_wrap(layout, PANGO_WRAP_WORD); pango_layout_set_text(layout, g_tooltip.tooltip_text, -1); @@ -297,6 +299,7 @@ void tooltip_update() -r1.y / 2 + 1 + top_bg_border_width(g_tooltip.bg) + g_tooltip.paddingy * panel->scale); pango_cairo_show_layout(c, layout); g_object_unref(layout); + g_object_unref(context); if (g_tooltip.image) { cairo_translate(c,