Added a GUI theme selector in preferences and a new class for handling GUI changes.

Added a new feature for editing style sheets and variable colors and see immediately the result.
Made Qwt plots (and items) stylable.
Added icons, improved styling possibilities of QMinimizePanel, fixed minor bugs in RicThemeColorEditorFeature.
This commit is contained in:
Ruben Manuel Thoms
2020-09-04 17:10:55 +02:00
committed by Gaute Lindkvist
parent 66ec3212c0
commit 87bc6acd65
50 changed files with 3178 additions and 308 deletions

View File

@@ -25,6 +25,8 @@
#include <algorithm>
#include <cmath>
#include <QPalette>
//--------------------------------------------------------------------------------------------------
/// Uses W3.org relative luminance calculation taking into account the different luminance of the different colors
/// https://www.w3.org/TR/WCAG20-TECHS/G18.html
@@ -141,6 +143,24 @@ cvf::Color3f RiaColorTools::fromQColorTo3f( QColor color )
return cvf::Color3f( color.redF(), color.greenF(), color.blueF() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QColor RiaColorTools::systemPaletteTextColor()
{
QPalette systemPalette;
return systemPalette.color( QPalette::Text );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Color3f RiaColorTools::systemPaletteTextColor3f()
{
return fromQColorTo3f( systemPaletteTextColor() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------