diff --git a/ChangeLog b/ChangeLog index 23aff219..bde1d8f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17386,3 +17386,5 @@ the incorrect shadow color. 2018-08-13 Fred Gleason * Updated table documentation. +2018-08-13 Fred Gleason + * Added code to force the 'Plastique' GUI style. diff --git a/lib/rd.h b/lib/rd.h index bc6ff78e..16ad9109 100644 --- a/lib/rd.h +++ b/lib/rd.h @@ -585,5 +585,11 @@ #define RD_RDVAIRPLAY_LOG_BASE 100 #define RD_RDVAIRPLAY_LOG_QUAN 20 +/* + * GUI Style + * (must be one of the values returned by QStyleFactory::keys()) + */ +#define RD_GUI_STYLE "Plastique" + #endif // RD_H diff --git a/lib/rdedit_audio.cpp b/lib/rdedit_audio.cpp index fca14205..3c27b19e 100644 --- a/lib/rdedit_audio.cpp +++ b/lib/rdedit_audio.cpp @@ -2,7 +2,7 @@ // // Edit Rivendell Audio // -// (C) Copyright 2002-2003,2016-2018 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -214,7 +214,7 @@ RDEditAudio::RDEditAudio(RDCart *cart,QString cut_name,int card, // // Amplitude Buttons // - QLabel *amp_label=new QLabel(this,"amp_label"); + QLabel *amp_label=new QLabel(this); amp_label->setGeometry(742,5,80,16); amp_label->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); amp_label->setFont(button_font); diff --git a/lib/rdpushbutton.cpp b/lib/rdpushbutton.cpp index e5629f71..7dc0d08a 100644 --- a/lib/rdpushbutton.cpp +++ b/lib/rdpushbutton.cpp @@ -125,20 +125,20 @@ void RDPushButton::setPalette(const QPalette &pal) void RDPushButton::mousePressEvent(QMouseEvent *e) { switch(e->button()) { - case Qt::LeftButton: - QPushButton::mousePressEvent(e); - break; + case Qt::LeftButton: + QPushButton::mousePressEvent(e); + break; - case Qt::MidButton: - emit centerPressed(); - break; + case Qt::MidButton: + emit centerPressed(); + break; - case Qt::RightButton: - emit rightPressed(); - break; + case Qt::RightButton: + emit rightPressed(); + break; - default: - break; + default: + break; } } @@ -146,32 +146,32 @@ void RDPushButton::mousePressEvent(QMouseEvent *e) void RDPushButton::mouseReleaseEvent(QMouseEvent *e) { switch(e->button()) { - case Qt::LeftButton: - QPushButton::mouseReleaseEvent(e); - break; + case Qt::LeftButton: + QPushButton::mouseReleaseEvent(e); + break; - case Qt::MidButton: - e->accept(); - emit centerReleased(); - if((e->x()>=0)&&(e->x()y()>=0)&&(e->y()x(),e->y())); - } - break; + case Qt::MidButton: + e->accept(); + emit centerReleased(); + if((e->x()>=0)&&(e->x()y()>=0)&&(e->y()x(),e->y())); + } + break; - case Qt::RightButton: - e->accept(); - emit rightReleased(); - if((e->x()>=0)&&(e->x()y()>=0)&&(e->y()x(),e->y())); - } - break; + case Qt::RightButton: + e->accept(); + emit rightReleased(); + if((e->x()>=0)&&(e->x()y()>=0)&&(e->y()x(),e->y())); + } + break; - default: - break; + default: + break; } } diff --git a/rdadmin/rdadmin.cpp b/rdadmin/rdadmin.cpp index ef4896c4..ce413997 100644 --- a/rdadmin/rdadmin.cpp +++ b/rdadmin/rdadmin.cpp @@ -392,6 +392,7 @@ void MainWidget::ClearTables() int main(int argc,char *argv[]) { + QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); // diff --git a/rdairplay/rdairplay.cpp b/rdairplay/rdairplay.cpp index 2744c1b6..1b0f825e 100644 --- a/rdairplay/rdairplay.cpp +++ b/rdairplay/rdairplay.cpp @@ -2479,6 +2479,7 @@ void MainWidget::SetActionMode(StartButton::Mode mode) int main(int argc,char *argv[]) { + QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); // diff --git a/rdcartslots/rdcartslots.cpp b/rdcartslots/rdcartslots.cpp index 2636fd54..0dfd97d3 100644 --- a/rdcartslots/rdcartslots.cpp +++ b/rdcartslots/rdcartslots.cpp @@ -237,6 +237,7 @@ void MainWidget::SetCaption() int main(int argc,char *argv[]) { + QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); // diff --git a/rdcastmanager/rdcastmanager.cpp b/rdcastmanager/rdcastmanager.cpp index 2840fe18..71e48a85 100644 --- a/rdcastmanager/rdcastmanager.cpp +++ b/rdcastmanager/rdcastmanager.cpp @@ -328,6 +328,7 @@ void MainWidget::RefreshList() int main(int argc,char *argv[]) { + QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); // diff --git a/rdcatch/rdcatch.cpp b/rdcatch/rdcatch.cpp index 4db6f779..696d1fc4 100644 --- a/rdcatch/rdcatch.cpp +++ b/rdcatch/rdcatch.cpp @@ -2193,6 +2193,7 @@ void MainWidget::SaveGeometry() int main(int argc,char *argv[]) { + QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); // diff --git a/rdlibrary/rdlibrary.cpp b/rdlibrary/rdlibrary.cpp index 583dabd1..f868d37e 100644 --- a/rdlibrary/rdlibrary.cpp +++ b/rdlibrary/rdlibrary.cpp @@ -41,6 +41,8 @@ #include #include #include +#include + #include #include @@ -88,6 +90,10 @@ void SigHandler(int signo); MainWidget::MainWidget(QWidget *parent) :QWidget(parent) { + QStringList styles=QStyleFactory::keys(); + for(int i=0;i #include +#include #include #include @@ -54,6 +55,7 @@ QString WordWrap(const QString &str) int main(int argc,char *argv[]) { + QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); RDCmdSwitch *cmd= diff --git a/utils/rdsoftkeys/rdsoftkeys.cpp b/utils/rdsoftkeys/rdsoftkeys.cpp index 39a9d555..3a32c8ae 100644 --- a/utils/rdsoftkeys/rdsoftkeys.cpp +++ b/utils/rdsoftkeys/rdsoftkeys.cpp @@ -281,8 +281,8 @@ QString MainWidget::WrapText(QWidget *w,const QString &text) int main(int argc,char *argv[]) { + QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); - QApplication::setStyle(new QWindowsStyle); // // Load Translations diff --git a/utils/rmlsend/rmlsend.cpp b/utils/rmlsend/rmlsend.cpp index 4a229258..8e97103a 100644 --- a/utils/rmlsend/rmlsend.cpp +++ b/utils/rmlsend/rmlsend.cpp @@ -507,7 +507,8 @@ int main(int argc,char *argv[]) #endif // WIN32 } else { - QApplication a(argc,argv,true); + QApplication::setStyle(new QWindowsStyle); + QApplication a(argc,argv); // // Load Translations