Better meter fonts

merge-requests/6/head
Elliott Liggett 2021-08-16 21:51:45 -07:00
rodzic 493f2f60d9
commit a09e8c51b8
1 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -86,20 +86,22 @@ void meter::paintEvent(QPaintEvent *)
// The end effect, is that the drawing functions will all
// scale to the window size.
painter.setWindow(QRect(0, 0, 255+mXstart, widgetWindowHeight));
//painter.setWindow(QRect(0, 0, 255+mXstart, widgetWindowHeight));
if(this->height() > widgetWindowHeight )
{
//if(this->height() > widgetWindowHeight )
//{
// Clamp down on stretching fonts.
// TODO: Make this more elegant
painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/3.5));
// painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/3.5));
painter.setFont(QFont(this->fontInfo().family(), fontSize));
widgetWindowHeight = this->height();
painter.setWindow(QRect(0, 0, 255+mXstart, widgetWindowHeight));
painter.setWindow(QRect(0, 0, 255+mXstart+15, widgetWindowHeight));
barHeight = widgetWindowHeight / 2;
//painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/2.5));
}
//}
switch(meterType)
{