From 09823c57af53c53fbd0bda789d5dacdcd53922fe Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Wed, 8 May 2024 15:25:48 -0400 Subject: [PATCH] 2024-05-08 Fred Gleason * Fixed a regression in rdairplay(1) that caused the start time indicators in the button log to display the incorrect color for hard time events. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ rdairplay/loglinebox.cpp | 7 +++++++ rdairplay/loglinebox.h | 2 ++ 3 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 42c86a6c..f97d48f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24761,3 +24761,7 @@ for addition/move/delete operations to fail to be displayed for User panels when the user didn't have the 'Configure System Panels' privilege. +2024-05-08 Fred Gleason + * Fixed a regression in rdairplay(1) that caused the start time + indicators in the button log to display the incorrect color for + hard time events. diff --git a/rdairplay/loglinebox.cpp b/rdairplay/loglinebox.cpp index 7d7c9d1e..cf37dd5a 100644 --- a/rdairplay/loglinebox.cpp +++ b/rdairplay/loglinebox.cpp @@ -136,11 +136,13 @@ LogLineBox::LogLineBox(RDAirPlayConf *conf,QWidget *parent) QColor(Qt::black)); line_time_palette.setColor(QPalette::Inactive,QPalette::Foreground, QColor(Qt::black)); + line_time_style_sheet=""; line_hard_palette=QGuiApplication::palette(); line_hard_palette.setColor(QPalette::Active,QPalette::Foreground, QColor(LOG_HARDTIME_TEXT_COLOR)); line_hard_palette.setColor(QPalette::Inactive,QPalette::Foreground, QColor(LOG_HARDTIME_TEXT_COLOR)); + line_hard_style_sheet="color: "+QColor(LOG_HARDTIME_TEXT_COLOR).name(); line_timescale_palette=QGuiApplication::palette(); line_timescale_palette.setColor(QPalette::Active,QPalette::Foreground, @@ -252,6 +254,7 @@ LogLineBox::LogLineBox(RDAirPlayConf *conf,QWidget *parent) line_time_label->setFont(line_font); line_time_label->setAlignment(Qt::AlignRight); line_time_label->setPalette(line_time_palette); + line_time_label->setStyleSheet(line_time_style_sheet); // // Talk Time @@ -556,9 +559,11 @@ void LogLineBox::setEvent(int line,RDLogLine::TransType next_type, false,false)); if(line_logline->timescalingActive()) { line_length_label->setPalette(line_hard_palette); + line_length_label->setStyleSheet(line_hard_style_sheet); } else { line_length_label->setPalette(line_time_palette); + line_length_label->setStyleSheet(line_time_style_sheet); } if((line_logline->source()!=RDLogLine::Tracker)|| line_logline->originUser().isEmpty()|| @@ -975,6 +980,7 @@ void LogLineBox::PrintTime() startTime(RDLogLine::Logged))); } line_time_label->setPalette(line_hard_palette); + line_time_label->setStyleSheet(line_hard_style_sheet); break; default: @@ -988,6 +994,7 @@ void LogLineBox::PrintTime() line_time_label->setText(""); } line_time_label->setPalette(line_time_palette); + line_time_label->setStyleSheet(line_time_style_sheet); break; } } diff --git a/rdairplay/loglinebox.h b/rdairplay/loglinebox.h index 46d06527..f556f665 100644 --- a/rdairplay/loglinebox.h +++ b/rdairplay/loglinebox.h @@ -114,7 +114,9 @@ class LogLineBox : public RDWidget QPalette line_changed_stop_palette; QPalette line_changed_play_palette; QPalette line_time_palette; + QString line_time_style_sheet; QPalette line_hard_palette; + QString line_hard_style_sheet; QPalette line_timescale_palette; QPalette line_transition_palette; QPalette line_text_palette;