Skip to content

Dynamic text sizes on PowerProfileItem slider. Reduce text elide

This commit makes Power Profile slider labels font is dynamic. I'm not find a more elegant way to do that, so it's like that. We simply iterate profileData and measure labels with font size decrement until text width is larger then (profileDataLayout.width - (spacing / 2)) / 3 or pixelSize >= 15(maybe plasma has some constant for this?). Translates that are still larger than maxItemWidth will be elided. Elided text is ugly looking, in my opinion more prefer way is decrease font size a little bit

Master

Click to expand Screenshot_20220201_042858

Patch

Click to expand Screenshot_20220201_042814

Merge request reports

Loading