@@ -258,7 +258,6 @@ QString Theme::fetchQtStyleSheet() const
258258 translateStyleByPalette (m_palette, style);
259259 translateUrlToAbsolute (m_themeFolderPath, style);
260260 translateFontFamilyList (style);
261- translateScaledSize (WidgetUtils::calculateScaleFactor (), style);
262261 return style;
263262}
264263
@@ -355,40 +354,6 @@ void Theme::translateFontFamilyList(QString &p_style)
355354 }
356355}
357356
358- void Theme::translateScaledSize (qreal p_factor, QString &p_style)
359- {
360- QRegularExpression scaleRe (" (\\ s|:)\\ $([+-]?)(\\ d+)(?=\\ D)" );
361- const int prefixCapturedIdx = 1 ;
362- const int signCapturedIdx = 2 ;
363- const int numCapturedIdx = 3 ;
364-
365- qDebug () << " translateScaledSize of Qt style sheet" << p_factor;
366-
367- int pos = 0 ;
368- QRegularExpressionMatch match;
369- while (pos < p_style.size ()) {
370- int idx = p_style.indexOf (scaleRe, pos, &match);
371- if (idx == -1 ) {
372- break ;
373- }
374-
375- auto numStr = match.captured (numCapturedIdx);
376- bool ok = false ;
377- int val = numStr.toInt (&ok);
378- if (!ok) {
379- pos = idx + match.capturedLength ();
380- continue ;
381- }
382-
383- val = val * p_factor + 0.5 ;
384- auto newStr = QStringLiteral (" %1%2%3" ).arg (match.captured (prefixCapturedIdx),
385- match.captured (signCapturedIdx),
386- QString::number (val));
387- p_style.replace (idx, match.capturedLength (), newStr);
388- pos = idx + newStr.size ();
389- }
390- }
391-
392357QString Theme::paletteColor (const QString &p_name) const
393358{
394359 auto val = findValueByKeyPath (m_palette, p_name).toString ();
0 commit comments