From afb21ee395360b4fb1de198d72d82d0f3f866cc1 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 13 Oct 2023 13:20:59 -0400 Subject: [PATCH] 2023-10-09 Fred Gleason * Fixed a regression in rdcartslots(1) that displayed red or green color around the edges of start buttons when the buttons were disabled. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ lib/rdcartslot.cpp | 1 + lib/rdslotbutton.cpp | 8 +++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a008760a..a34caa2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24441,3 +24441,7 @@ be leaked when a play-out hit EOF. 2023-10-09 Fred Gleason * Fixed regressions in 'RDCae' that broke various mixer CAE commands. +2023-10-09 Fred Gleason + * Fixed a regression in rdcartslots(1) that displayed red or green + color around the edges of start buttons when the buttons were + disabled. diff --git a/lib/rdcartslot.cpp b/lib/rdcartslot.cpp index 81d85ad0..f31c0c12 100644 --- a/lib/rdcartslot.cpp +++ b/lib/rdcartslot.cpp @@ -186,6 +186,7 @@ void RDCartSlot::updateOptions() break; case RDSlotOptions::BreakawayMode: + unload(); SetInput(true); slot_start_button->setDisabled(true); slot_box->setService(slot_svcname); diff --git a/lib/rdslotbutton.cpp b/lib/rdslotbutton.cpp index 32d6b55c..28eba1dc 100644 --- a/lib/rdslotbutton.cpp +++ b/lib/rdslotbutton.cpp @@ -2,7 +2,7 @@ // // Start/stop button for rdcartslots(1). // -// (C) Copyright 2021 Fred Gleason +// (C) Copyright 2021-2023 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -34,9 +34,15 @@ RDSlotButton::RDSlotButton(int slotnum,QWidget *parent,RDConfig *c) d_ready_color= QPalette(QColor(BUTTON_STOPPED_BACKGROUND_COLOR), palette().color(QPalette::Background)); + d_ready_color.setColor(QPalette::Disabled,QPalette::Button, + palette().color(QPalette::Disabled,QPalette::Button)); + d_playing_color= QPalette(QColor(BUTTON_PLAY_BACKGROUND_COLOR), palette().color(QPalette::Background)); + d_playing_color.setColor(QPalette::Disabled,QPalette::Button, + palette().color(QPalette::Disabled,QPalette::Button)); + setFocusPolicy(Qt::NoFocus); }