Skip to content

Commit

Permalink
V3.6 upgrade processing - reset theme
Browse files Browse the repository at this point in the history
.. based upon current background plot color, so those with a
   preference for dark themes get the new dark theme and those
   with a preference for light get the new light theme.

.. making it mandatory will likely annoy some users but for the
   most part it will mean the UI will get updated to a more
   thoughtful color scheme.
  • Loading branch information
liversedge committed Jul 18, 2021
1 parent 663b6af commit e34a36f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/Core/GcUpgrade.cpp
Expand Up @@ -376,6 +376,16 @@ GcUpgrade::upgrade(const QDir &home)
CloudServiceFactory::instance().upgrade(home.dirName());
}

//----------------------------------------------------------------------
// 3.6 upgrade processing
//----------------------------------------------------------------------
if (last < VERSION36_BUILD) {

// reset themes on basis of plot background (first 2 themes are default dark and light themes
if (GCColor::luminance(GColor(CPLOTBACKGROUND)) < 127) GCColor::applyTheme(0);
else GCColor::applyTheme(1);

}

//----------------------------------------------------------------------
// ... here any further Release Number dependent Upgrade Process is to be added ...
Expand Down
7 changes: 4 additions & 3 deletions src/Core/GcUpgrade.h
Expand Up @@ -100,6 +100,7 @@
// 4004 - V3.6 DEVELOPMENT 2106 (JUN 2021)
// 4005 - V3.6 DEVELOPMENT 2107 (JUL 2021)


#define VERSION3_BUILD 3010 // released
#define VERSION3_SP1 3030 // released
#define VERSION3_SP2 3032 // released
Expand All @@ -109,14 +110,14 @@
#define VERSION33_BUILD 3933 // development release
#define VERSION34_BUILD 3955 // released
#define VERSION35_BUILD 3990 // released
#define VERSION36_BUILD 4005 // development build July 2021
#define VERSION36_BUILD 4006 // testing upgrade processing

// will keep changing during testing and before final release
#define VERSION31_BUILD VERSION31_UPG

// the next two will with each build/release
#define VERSION_LATEST 4005
#define VERSION_STRING "V3.6-DEV2107"
#define VERSION_LATEST 4006
#define VERSION_STRING "V3.6-DEVELOPMENT"

// default config for this release cycle
#define VERSION_CONFIG_PREFIX "http://www.goldencheetah.org/defaults/3.5"
Expand Down

0 comments on commit e34a36f

Please sign in to comment.