2018-11-09 Fred Gleason <fredg@paravelsystems.com>

* Tweaked layout and appearance of the status bubble in rdmonitor(1).
This commit is contained in:
Fred Gleason
2018-11-09 08:08:41 -05:00
parent b302ca6112
commit 286d4dfe14
10 changed files with 53 additions and 6 deletions

View File

@@ -17995,3 +17995,5 @@
'RDAIRPLAY.INSTANCE' field when processing schema update 284. 'RDAIRPLAY.INSTANCE' field when processing schema update 284.
2018-11-08 Fred Gleason <fredg@paravelsystems.com> 2018-11-08 Fred Gleason <fredg@paravelsystems.com>
* Restored the status display bubble on rdmonitor(1). * Restored the status display bubble on rdmonitor(1).
2018-11-09 Fred Gleason <fredg@paravelsystems.com>
* Tweaked layout and appearance of the status bubble in rdmonitor(1).

View File

@@ -588,5 +588,10 @@
*/ */
#define RD_GUI_STYLE "Plastique" #define RD_GUI_STYLE "Plastique"
/*
* Status / Note Bubble Background Color
*/
#define RD_STATUS_BACKGROUND_COLOR "#AAFFFF"
#endif // RD_H #endif // RD_H

View File

@@ -127,8 +127,13 @@ MainWidget::MainWidget(QWidget *parent)
// //
// Status Label // Status Label
// //
mon_status_label=new QLabel(NULL,(Qt::WindowFlags)(Qt::WStyle_Customize|Qt::WStyle_NoBorder|Qt::WStyle_StaysOnTop)); mon_status_label=new QLabel(tr("Status: unknown"),NULL,
(Qt::WindowFlags)(Qt::WStyle_Customize|
Qt::WStyle_NoBorder|
Qt::WStyle_StaysOnTop));
mon_status_label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter); mon_status_label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter);
mon_status_label->
setStyleSheet(QString("background-color:")+RD_STATUS_BACKGROUND_COLOR);
mon_status_label->hide(); mon_status_label->hide();
// //
@@ -443,26 +448,33 @@ void MainWidget::SetStatusPosition()
QFontMetrics *fm=new QFontMetrics(mon_status_label->font()); QFontMetrics *fm=new QFontMetrics(mon_status_label->font());
int h=10+fm->height(); int h=10+fm->height();
int w=10+fm->width(mon_status_label->text()); int w=10+fm->width(mon_status_label->text());
QRect g=geometry();
switch(mon_config->position()) { switch(mon_config->position()) {
case RDMonitorConfig::UpperLeft: case RDMonitorConfig::UpperLeft:
mon_status_label->setGeometry(20+g.x(),g.y()+(2+g.height()),w,h);
break;
case RDMonitorConfig::UpperCenter: case RDMonitorConfig::UpperCenter:
mon_status_label->setGeometry(geometry().x(),geometry().y()+(2+geometry().height()),w,h); mon_status_label->
setGeometry(g.x()+(g.width()-w)/2,g.y()+(2+g.height()),w,h);
break; break;
case RDMonitorConfig::UpperRight: case RDMonitorConfig::UpperRight:
mon_status_label->setGeometry(geometry().x()-h,geometry().y()+(2+geometry().height()),w,h); mon_status_label->
setGeometry(g.x()+g.width()-w-20,g.y()+(2+g.height()),w,h);
break; break;
case RDMonitorConfig::LowerLeft: case RDMonitorConfig::LowerLeft:
case RDMonitorConfig::LowerCenter: mon_status_label->setGeometry(20+g.x(),g.y()-(2+h),w,h);
mon_status_label->setGeometry(geometry().x(),geometry().y()-(2+h),w,h);
break; break;
case RDMonitorConfig::LowerCenter:
mon_status_label->setGeometry(g.x()+(g.width()-w)/2,g.y()-(2+h),w,h);
break; break;
case RDMonitorConfig::LowerRight: case RDMonitorConfig::LowerRight:
mon_status_label->setGeometry(geometry().x()-h,geometry().y()-(2+h),w,h); mon_status_label->setGeometry(g.x()+g.width()-w-20,g.y()-(2+h),w,h);
break; break;
case RDMonitorConfig::LastPosition: case RDMonitorConfig::LastPosition:

View File

@@ -31,6 +31,10 @@
<source>Audio Store: FAILED</source> <source>Audio Store: FAILED</source>
<translation type="unfinished">Uložení zvuku: NEPODAŘILO SE</translation> <translation type="unfinished">Uložení zvuku: NEPODAŘILO SE</translation>
</message> </message>
<message>
<source>Status: unknown</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@@ -31,6 +31,10 @@
<source>Audio Store: FAILED</source> <source>Audio Store: FAILED</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Status: unknown</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@@ -31,6 +31,10 @@
<source>Audio Store: FAILED</source> <source>Audio Store: FAILED</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Status: unknown</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@@ -31,6 +31,10 @@
<source>Audio Store: FAILED</source> <source>Audio Store: FAILED</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Status: unknown</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@@ -31,6 +31,10 @@
<source>Audio Store: FAILED</source> <source>Audio Store: FAILED</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Status: unknown</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@@ -31,6 +31,10 @@
<source>Audio Store: FAILED</source> <source>Audio Store: FAILED</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Status: unknown</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>

View File

@@ -31,6 +31,10 @@
<source>Audio Store: FAILED</source> <source>Audio Store: FAILED</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Status: unknown</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>QObject</name> <name>QObject</name>