dschopf / plasma-applet-qalculate

Qalculate applet for plasma desktop
MIT License
11 stars 5 forks source link

Decrease font size for long results or split to lines #17

Closed MurzNN closed 4 years ago

MurzNN commented 5 years ago

At now long results are cuts by widget edge, here is example: изображение Will be good to auto decrease size of result font, or split it to several lines. Also, imho, default size of result font is too large, will be good to make it configurable.

MurzNN commented 5 years ago

Same problem for pi result: изображение

Also will be good to replace approx. to ~ symbol.

dschopf commented 4 years ago

Can you test if this works in the latest version?

MurzNN commented 4 years ago

Thanks, now it decreased well: image

MurzNN commented 4 years ago

Will be good to decrease padding of results line, because on smaller fonts it is too large: image

dschopf commented 4 years ago

This is not so easy because there is no real access to the actual text width. Instead I am using the average font width, which will look too small for narrow letters like l and i and too big for w or m. I did some research but I didn't find any better method to determine the scaling factor.