Skip to content

Truly independent web browser

UI/Qt: Only enlarge the tab bar font on macOS

Timothy Flynnea85bc12f633
diff --git a/UI/Qt/TabBar.cpp b/UI/Qt/TabBar.cpp
index 6370d12ee27..61f038945a3 100644
--- a/UI/Qt/TabBar.cpp
+++ b/UI/Qt/TabBar.cpp
@@ -235,12 +235,14 @@ static void paint_load_sheen(QPainter& painter, QPalette const& palette, QPainte
painter.restore();
}
-// NB: The macOS style gives tab bars a small font when it polishes them, so tab titles are drawn a point larger than
-// the tab bar's font rather than by setting the tab bar's font.
static QFont tab_title_font(QFont font)
{
+#if defined(AK_OS_MACOS)
+ // The macOS style gives tab bars a small font when it polishes them, so tab titles are drawn a point larger than
+ // the tab bar's font rather than by setting the tab bar's font.
if (font.pointSizeF() > 0)
font.setPointSizeF(font.pointSizeF() + 1);
+#endif
return font;
}