- Timestamp:
- Apr 4, 2024 3:09:29 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r103988 r104158 2797 2797 QFont appFont = qApp->font(); 2798 2798 2799 /* Let's round up some double var: */ 2800 auto roundUp = [](double dValue) 2801 { 2802 const int iValue = dValue; 2803 return dValue > (double)iValue ? iValue + 1 : iValue; 2804 }; 2805 2806 /* Do we have pixel font? */ 2799 2807 if (iOriginalFontPixelSize != -1) 2800 appFont.setPixelSize(iFontScaleFactor / 100.f * iOriginalFontPixelSize); 2808 appFont.setPixelSize(roundUp(iFontScaleFactor / 100.f * iOriginalFontPixelSize)); 2809 /* Point font otherwise: */ 2801 2810 else 2802 appFont.setPointSize(iFontScaleFactor / 100.f * iOriginalFontPointSize); 2811 appFont.setPointSize(roundUp(iFontScaleFactor / 100.f * iOriginalFontPointSize)); 2812 2803 2813 qApp->setFont(appFont); 2804 2814 }
Note:
See TracChangeset
for help on using the changeset viewer.