2022-10-22 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in rdcatch(1) that made it impossible to scroll
	the stack of deck monitors.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2022-10-22 11:02:08 -04:00
parent 61a4b6a3ce
commit e4ead2c94e
3 changed files with 16 additions and 32 deletions

View File

@ -23548,3 +23548,6 @@
distinguish hard and soft start times. distinguish hard and soft start times.
2022-10-21 Fred Gleason <fredg@paravelsystems.com> 2022-10-21 Fred Gleason <fredg@paravelsystems.com>
* Added an Ubuntu-specific pam(7) configuration. * Added an Ubuntu-specific pam(7) configuration.
2022-10-22 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdcatch(1) that made it impossible to scroll
the stack of deck monitors.

View File

@ -79,7 +79,6 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
QString str; QString str;
QString err_msg; QString err_msg;
catch_resize=false;
catch_host_warnings=false; catch_host_warnings=false;
catch_audition_stream=-1; catch_audition_stream=-1;
@ -501,16 +500,6 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
if(ShowNextEvents(current_date.dayOfWeek(),current_time,&next_time)>0) { if(ShowNextEvents(current_date.dayOfWeek(),current_time,&next_time)>0) {
catch_next_timer->start(current_time.msecsTo(next_time)); catch_next_timer->start(current_time.msecsTo(next_time));
} }
//
// Silly Resize Workaround
// (so that the deck monitors get laid out properly)
//
QTimer *timer=new QTimer(this);
connect(timer,SIGNAL(timeout()),this,SLOT(resizeData()));
timer->start(1);
catch_resize=true;
} }
QSize MainWidget::sizeHint() const QSize MainWidget::sizeHint() const
@ -525,17 +514,6 @@ QSizePolicy MainWidget::sizePolicy() const
} }
void MainWidget::resizeData()
{
QResizeEvent *e=new QResizeEvent(QSize(geometry().width(),
geometry().height()),
QSize(geometry().width(),
geometry().height()));
resizeEvent(e);
delete e;
}
void MainWidget::connectedData(int serial,bool state) void MainWidget::connectedData(int serial,bool state)
{ {
if(state) { if(state) {
@ -1179,11 +1157,8 @@ void MainWidget::closeEvent(QCloseEvent *e)
void MainWidget::resizeEvent(QResizeEvent *e) void MainWidget::resizeEvent(QResizeEvent *e)
{ {
if(!catch_resize) { assert(e);
return; assert(catch_monitor_area);
}
assert (e);
assert (catch_monitor_area);
if(catch_monitor.size()<=RDCATCH_MAX_VISIBLE_MONITORS) { if(catch_monitor.size()<=RDCATCH_MAX_VISIBLE_MONITORS) {
catch_monitor_area-> catch_monitor_area->
setGeometry(10,10,e->size().width()-20,32*catch_monitor.size()+4); setGeometry(10,10,e->size().width()-20,32*catch_monitor.size()+4);
@ -1193,10 +1168,18 @@ void MainWidget::resizeEvent(QResizeEvent *e)
else { else {
catch_monitor_area-> catch_monitor_area->
setGeometry(10,10,e->size().width()-20,32*RDCATCH_MAX_VISIBLE_MONITORS); setGeometry(10,10,e->size().width()-20,32*RDCATCH_MAX_VISIBLE_MONITORS);
//
// This depends on the width of the scrollbar. How to reliably
// determine such on various desktops?
//
// (catch_monitor_area->verticalScrollBar()->geometry().width() is not
// always accurate!)
//
catch_monitor_vbox-> catch_monitor_vbox->
setGeometry(0,0,e->size().width()- setGeometry(0,
catch_monitor_area->verticalScrollBar()->geometry().width()- 0,
25,32*catch_monitor.size()); e->size().width()-40, // Works on XFCE, what about others?
32*catch_monitor.size());
} }
int deck_height=0; int deck_height=0;
if (catch_monitor.size()>0){ if (catch_monitor.size()>0){

View File

@ -72,7 +72,6 @@ class MainWidget : public RDMainWindow
QSizePolicy sizePolicy() const; QSizePolicy sizePolicy() const;
private slots: private slots:
void resizeData();
void connectedData(int serial,bool state); void connectedData(int serial,bool state);
void nextEventData(); void nextEventData();
void addData(); void addData();
@ -159,7 +158,6 @@ class MainWidget : public RDMainWindow
QTimer *catch_midnight_timer; QTimer *catch_midnight_timer;
int catch_time_offset; int catch_time_offset;
bool catch_host_warnings; bool catch_host_warnings;
bool catch_resize;
AddRecording *catch_add_recording_dialog; AddRecording *catch_add_recording_dialog;
}; };