Skip to content

Commit aec50f3

Browse files
committed
Slightly decrease the text icon size.
It seems that for certain font it is still possible to be too big and clip the text as a result.
1 parent b1865c0 commit aec50f3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ui/classic/theme.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,13 @@ ThemeImage::ThemeImage(const std::string &name, const ActionImageConfig &cfg) {
348348
void ThemeImage::drawTextIcon(cairo_surface_t *surface,
349349
const std::string &rawLabel, uint32_t size,
350350
const ClassicUIConfig &config) {
351-
352351
auto [label, textWidth] = extractTextForLabel(rawLabel);
353352
auto *cr = cairo_create(surface);
354353
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
355354
cairoSetSourceColor(cr, Color("#00000000"));
356355
cairo_paint(cr);
357356

358-
int pixelSize = size * 0.75 * (textWidth >= 3 ? (2.0 / textWidth) : 1.0);
357+
int pixelSize = size * 0.7 * (textWidth >= 3 ? (2.0 / textWidth) : 1.0);
359358
if (pixelSize < 0) {
360359
pixelSize = 1;
361360
}

0 commit comments

Comments
 (0)