mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6514 Dark Theme : Use text color from theme instead from QPalette
This commit is contained in:
committed by
Gaute Lindkvist
parent
2cfa900041
commit
ea7da32141
@@ -18,6 +18,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaColorTools.h"
|
||||
#include "RiuGuiTheme.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
#include "cvfMath.h"
|
||||
@@ -146,19 +147,17 @@ cvf::Color3f RiaColorTools::fromQColorTo3f( QColor color )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QColor RiaColorTools::systemPaletteTextColor()
|
||||
QColor RiaColorTools::textColor()
|
||||
{
|
||||
QPalette systemPalette;
|
||||
|
||||
return systemPalette.color( QPalette::Text );
|
||||
return RiuGuiTheme::getColorByVariableName( "textColor" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::systemPaletteTextColor3f()
|
||||
cvf::Color3f RiaColorTools::textColor3f()
|
||||
{
|
||||
return fromQColorTo3f( systemPaletteTextColor() );
|
||||
return fromQColorTo3f( textColor() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -42,8 +42,8 @@ public:
|
||||
static QColor toQColor( cvf::Color4f color );
|
||||
static cvf::Color3f fromQColorTo3f( QColor );
|
||||
|
||||
static QColor systemPaletteTextColor();
|
||||
static cvf::Color3f systemPaletteTextColor3f();
|
||||
static QColor textColor();
|
||||
static cvf::Color3f textColor3f();
|
||||
|
||||
static cvf::Color3f
|
||||
blendCvfColors( const cvf::Color3f& color1, const cvf::Color3f& color2, int weight1 = 1, int weight2 = 1 );
|
||||
|
||||
Reference in New Issue
Block a user