From a8a1d8d0a7701610061e2e3e98c543e198aae981 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 30 Apr 2019 04:47:30 +0100 Subject: [PATCH 1/3] Add background colour to Log QSO buttons as stronger visual cue --- widgets/logqso.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/logqso.cpp b/widgets/logqso.cpp index eae82aacc..75ded8bca 100644 --- a/widgets/logqso.cpp +++ b/widgets/logqso.cpp @@ -41,6 +41,8 @@ LogQSO::LogQSO(QString const& programTitle, QSettings * settings ok_->setAutoDefault (false); ok_->setFocusPolicy (Qt::ClickFocus); + ok_->setStyleSheet ("background-color: green"); + cancel_->setStyleSheet ("background-color: red"); cancel_->setAutoDefault (false); ui->button_layout->addStretch (); ui->button_layout->addWidget (ok_); From b29a6d14eae9de8a3f8a8996cf44b2dee3b98611 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 30 Apr 2019 15:13:26 +0100 Subject: [PATCH 2/3] Workaround for a crash on macOS when compiling with gfortran 8.3 --- lib/azdist.f90 | 11 +++-------- widgets/mainwindow.cpp | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/azdist.f90 b/lib/azdist.f90 index 2fd26c3d7..41a8fc5bc 100644 --- a/lib/azdist.f90 +++ b/lib/azdist.f90 @@ -1,7 +1,7 @@ -subroutine azdist(grid1,grid2,utch,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter) +subroutine azdist(MyGrid,HisGrid,utch,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter) - character*(*) grid1,grid2 - character*6 MyGrid,HisGrid,mygrid0,hisgrid0 + character(len=*) :: MyGrid,HisGrid + character*6 mygrid0,hisgrid0 real*8 utch,utch0 logical HotABetter,IamEast real eltab(22),daztab(22) @@ -12,11 +12,6 @@ subroutine azdist(grid1,grid2,utch,nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter) data mygrid0/" "/,hisgrid0/" "/,utch0/-999.d0/ save - MyGrid=grid1//' ' - HisGrid=grid2//' ' - if(ichar(MyGrid(5:5)).eq.0) MyGrid(5:6)=' ' - if(ichar(HisGrid(5:5)).eq.0) HisGrid(5:6)=' ' - if(MyGrid.eq.HisGrid) then naz=0 nel=0 diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7cb7ed2be..98768c4d2 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -7550,8 +7550,8 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout if(grid!="") { double utch=0.0; int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter; - azdist_(const_cast (m_config.my_grid ().toLatin1().constData()), - const_cast (grid.toLatin1().constData()),&utch, + azdist_(const_cast ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()), + const_cast ((grid + " ").left (6).toLatin1 ().constData ()),&utch, &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6); QString t1; if(m_config.miles()) { From b9e194b74f68cca2d9061d3d4a4d19409c45204e Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 30 Apr 2019 15:33:01 +0100 Subject: [PATCH 3/3] Revert to colouring just the OK Log QSO button to help with colour-blindness accessibility --- widgets/logqso.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/widgets/logqso.cpp b/widgets/logqso.cpp index 75ded8bca..b4b936d75 100644 --- a/widgets/logqso.cpp +++ b/widgets/logqso.cpp @@ -42,7 +42,6 @@ LogQSO::LogQSO(QString const& programTitle, QSettings * settings ok_->setAutoDefault (false); ok_->setFocusPolicy (Qt::ClickFocus); ok_->setStyleSheet ("background-color: green"); - cancel_->setStyleSheet ("background-color: red"); cancel_->setAutoDefault (false); ui->button_layout->addStretch (); ui->button_layout->addWidget (ok_);