Commit 1736b6e8 authored by Robert Lancaster's avatar Robert Lancaster Committed by Jasem Mutlaq

This patch will correct the name of the SolverFOV color in the color scheme...

This patch will correct the name of the SolverFOV color in the color scheme files because it was mislabeled. Also, it sets the colors for RA and DEC Guide error in the night vision scheme to be better for night vision.  Around that same idea, it updates the RA and Dec Guide error colors and legend when you change the colors in the color options.  And finally, it updates the stylesheet on OS X where the QProgessBar no longer needs to be the grey color it was set to because the QProgressBar file has been edited and the former error this was meant to correct is now gone.  The white it naturally is improves the visibility of the progress.
parent 3d10e97e
......@@ -32,5 +32,5 @@
#FFA500 :SupernovaColor
#00FF00 :RAGuideError
#00A5FF :DEGuideError
#FFFF00 :SolverFOV
#FFFF00 :SolverFOVColor
#00FF00 :FITSObjectLabelColor
......@@ -32,5 +32,5 @@
#FFA500 :SupernovaColor
#00FF00 :RAGuideError
#00A5FF :DEGuideError
#FFFF00 :SolverFOV
#FFFF00 :SolverFOVColor
#00FF00 :FITSObjectLabelColor
......@@ -32,5 +32,5 @@
#FFA500 :SupernovaColor
#00FF00 :RAGuideError
#00A5FF :DEGuideError
#FFFF00 :SolverFOV
#FFFF00 :SolverFOVColor
#00FF00 :FITSObjectLabelColor
......@@ -30,7 +30,7 @@
#FF0000 :SatColor
#640000 :SatLabelColor
#FFA500 :SupernovaColor
#00FF00 :RAGuideError
#00A5FF :DEGuideError
#FFFF00 :SolverFOV
#FF8200 :RAGuideError
#FF0500 :DEGuideError
#FFFF00 :SolverFOVColor
#950000 :FITSObjectLabelColor
......@@ -235,6 +235,8 @@ EkosManager::~EkosManager()
delete guideStarPixmap;
qDeleteAll(profiles);
guideProcess=nullptr;
}
void EkosManager::closeEvent(QCloseEvent * /*event*/)
......
......@@ -1951,8 +1951,12 @@ void Guide::setAxisPulse(double ra, double de)
void Guide::refreshColorScheme()
{
// Drift color legend
driftGraph->graph(0)->setPen(QPen(KStarsData::Instance()->colorScheme()->colorNamed("RAGuideError")));
driftGraph->graph(1)->setPen(QPen(KStarsData::Instance()->colorScheme()->colorNamed("DEGuideError")));
if(driftGraph){
if(driftGraph->graph(0)&&driftGraph->graph(1)){
driftGraph->graph(0)->setPen(QPen(KStarsData::Instance()->colorScheme()->colorNamed("RAGuideError")));
driftGraph->graph(1)->setPen(QPen(KStarsData::Instance()->colorScheme()->colorNamed("DEGuideError")));
}
}
}
void Guide::driftMouseClicked(QMouseEvent * event)
......
......@@ -346,6 +346,8 @@ class Guide : public QWidget, public Ui::Guide
*/
void setDECSwap(bool enable);
void refreshColorScheme();
protected slots:
void updateCCDBin(int index);
......@@ -439,8 +441,6 @@ class Guide : public QWidget, public Ui::Guide
bool captureOneFrame();
void refreshColorScheme();
// Operation Stack
QStack<GuideState> operationStack;
......
......@@ -360,8 +360,7 @@ void KStars::applyConfig( bool doApplyFocus )
"QTableCornerButton::section{ background-color:rgb(30,30,30) }" \
"");
else
qApp->setStyleSheet("QRoundProgressBar { background-color: rgb(208,208,208) }" \
"");
qApp->setStyleSheet("");
#endif
......
......@@ -731,7 +731,7 @@ class KStars : public KXmlGuiWindow
// FIXME Port to QML2
//#if 0
WIView * m_WIView;
WIView * m_WIView = nullptr;
WILPSettings * m_WISettings;
WIEquipSettings * m_WIEquipmentSettings;
ObsConditions * m_ObsConditions;
......
......@@ -51,8 +51,12 @@
#include "tools/whatsinteresting/wiview.h"
#ifdef HAVE_CFITSIO
#include "fitsviewer/fitsviewer.h"
#ifdef HAVE_INDI
#include "ekos/ekosmanager.h"
#endif
#endif
void KStars::setRaDec( double ra, double dec )
......@@ -497,8 +501,6 @@ void KStars::loadColorScheme( const QString &name )
if ( ok )
{
//set the application colors for the Night Vision scheme
//if ( Options::darkAppColors() == false && filename == "night.colors" ) {
//Options::setDarkAppColors( true );
if (Options::darkAppColors())
{
//OriginalPalette = QApplication::palette();
......@@ -508,7 +510,8 @@ void KStars::loadColorScheme( const QString &name )
//Note: This uses style sheets to set the dark colors, this is cross platform. Palettes have a different behavior on OS X and Windows as opposed to Linux.
//It might be a good idea to use stylesheets in the future instead of palettes but this will work for now for OS X.
//This is also in KStars.cpp. If you change it, change it in BOTH places.
#ifdef Q_OS_OSX
#ifdef Q_OS_OSX
qDebug()<<"setting dark stylesheet";
qApp->setStyleSheet("QWidget { background-color: black; color:red; selection-background-color:rgb(30,30,30);selection-color:white}" \
"QToolBar { border:none }" \
"QTabBar::tab:selected { background-color:rgb(50,50,50) }" \
......@@ -532,20 +535,27 @@ void KStars::loadColorScheme( const QString &name )
"QHeaderView::Section { background-color:rgb(30,30,30) }" \
"QTableCornerButton::section{ background-color:rgb(30,30,30) }" \
"");
#endif
qDebug()<<"stylesheet set";
#endif
}
else
{
if(KStars::Instance()->wiView())
KStars::Instance()->wiView()->setNightVisionOn(false);
//if ( Options::darkAppColors() && filename != "night.colors" ) {
//Options::setDarkAppColors( false );
QApplication::setPalette( OriginalPalette );
#ifdef Q_OS_OSX
qApp->setStyleSheet("QRoundProgressBar { background-color: rgb(208,208,208) }" \
"");
#endif
#ifdef Q_OS_OSX
qDebug()<<"setting light stylesheet";
qApp->setStyleSheet("");
qDebug()<<"stylesheet set";
#endif
}
#ifdef HAVE_INDI
if(KStars::Instance()->ekosManager()){
if(KStars::Instance()->ekosManager()->guideModule()){
KStars::Instance()->ekosManager()->guideModule()->refreshColorScheme();
}
}
#endif
Options::setColorSchemeFile( name );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment