mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-19 15:11:28 +01:00
2025-04-26 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up compiler warning in 'lib/'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Component class for sound panel widgets.
|
||||
//
|
||||
// (C) Copyright 2002-2024 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2025 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -538,7 +538,7 @@ void RDPanelButton::WriteKeycap(int msecs)
|
||||
else {
|
||||
if(button_active_length>=0) {
|
||||
QString lenstr=RDGetTimeLength(button_active_length+1000,true,false);
|
||||
p->drawText(pix->width()-p->fontMetrics().width(lenstr)-
|
||||
p->drawText(pix->width()-p->fontMetrics().horizontalAdvance(lenstr)-
|
||||
RDPANEL_BUTTON_MARGIN-2,
|
||||
pix->height()-2-RDPANEL_BUTTON_MARGIN,
|
||||
lenstr);
|
||||
@@ -551,12 +551,12 @@ void RDPanelButton::WriteKeycap(int msecs)
|
||||
}
|
||||
else {
|
||||
QString lenstr=RDGetTimeLength(1000+msecs,true,false);
|
||||
p->drawText(pix->width()-p->fontMetrics().width(lenstr)-
|
||||
p->drawText(pix->width()-p->fontMetrics().horizontalAdvance(lenstr)-
|
||||
RDPANEL_BUTTON_MARGIN-2,
|
||||
pix->height()-2-RDPANEL_BUTTON_MARGIN,
|
||||
lenstr);
|
||||
p->setFont(bigLabelFont());
|
||||
p->drawText((pix->width()-p->fontMetrics().width(button_output_text))/2,
|
||||
p->drawText((pix->width()-p->fontMetrics().horizontalAdvance(button_output_text))/2,
|
||||
74*pix->height()/100,
|
||||
button_output_text);
|
||||
}
|
||||
@@ -628,7 +628,7 @@ QString RDPanelButton::GetNextLine(QString *str,const QFontMetrics &m,int len)
|
||||
QString ret;
|
||||
|
||||
for(int i=0;i<str->length();i++) {
|
||||
if(m.width(str->left(i))>len) {
|
||||
if(m.horizontalAdvance(str->left(i))>len) {
|
||||
int l=i;
|
||||
while((!str->at(l--).isSpace())&&(l>=0));
|
||||
if(l>0) {
|
||||
|
||||
Reference in New Issue
Block a user