#6616 Make contour map and 2d intersection view follow the theme. (#6635)

* #6616 Make contour map and 2d intersection view follow the theme.
This commit is contained in:
Gaute Lindkvist 2020-09-30 08:32:20 +02:00 committed by GitHub
parent 0f92ad13ad
commit 2d268b9e54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 6 deletions

View File

@ -41,8 +41,10 @@
#include "RimSurfaceInViewCollection.h"
#include "Riu3DMainWindowTools.h"
#include "RiuGuiTheme.h"
#include "RiaApplication.h"
#include "RiaColorTools.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
@ -182,7 +184,9 @@ RimEclipseContourMapView*
CVF_ASSERT( contourMap );
contourMap->setEclipseCase( eclipseCase );
contourMap->setBackgroundColor( cvf::Color3f( 1.0f, 1.0f, 0.98f ) ); // Ignore original view background
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor3" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
caf::PdmDocument::updateUiIconStateRecursively( contourMap );
@ -222,7 +226,10 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMapFr
}
contourMap->setEclipseCase( eclipseCase );
contourMap->setBackgroundColor( cvf::Color3f( 1.0f, 1.0f, 0.98f ) ); // Ignore original view background
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor3" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
contourMap->setDefaultCustomName();
contourMap->faultCollection()->showFaultCollection = false;
contourMap->wellCollection()->isActive = false;
@ -286,7 +293,10 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMap(
eclipseCase->contourMapCollection()->push_back( contourMap );
contourMap->hasUserRequestedAnimation = true;
contourMap->setBackgroundColor( cvf::Color3f( 1.0f, 1.0f, 0.98f ) );
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor3" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
contourMap->initAfterReadRecursively();
return contourMap;
@ -304,7 +314,9 @@ RimGeoMechContourMapView*
CVF_ASSERT( contourMap );
contourMap->setGeoMechCase( geoMechCase );
contourMap->setBackgroundColor( cvf::Color3f( 1.0f, 1.0f, 0.98f ) ); // Ignore original view background
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor3" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
caf::PdmDocument::updateUiIconStateRecursively( contourMap );
@ -332,7 +344,10 @@ RimGeoMechContourMapView* RicNewContourMapViewFeature::createGeoMechContourMapFr
CVF_ASSERT( contourMap );
contourMap->setGeoMechCase( geoMechCase );
contourMap->setBackgroundColor( cvf::Color3f( 1.0f, 1.0f, 0.98f ) ); // Ignore original view background
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor3" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
contourMap->setDefaultCustomName();
// make sure no surfaces are shown in the view when the contourmap is generated
@ -365,7 +380,10 @@ RimGeoMechContourMapView* RicNewContourMapViewFeature::createGeoMechContourMap(
geoMechCase->contourMapCollection()->push_back( contourMap );
contourMap->hasUserRequestedAnimation = true;
contourMap->setBackgroundColor( cvf::Color3f( 1.0f, 1.0f, 0.98f ) );
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor3" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
contourMap->initAfterReadRecursively();
return contourMap;

View File

@ -674,6 +674,14 @@ const Color3f& RivWindowEdgeAxesOverlayItem::lineColor() const
return m_lineColor;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivWindowEdgeAxesOverlayItem::setFrameColor( const Color4f& frameColor )
{
m_frameColor = frameColor;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -39,6 +39,7 @@
#include "RiuCadNavigation.h"
#include "RiuComparisonViewMover.h"
#include "RiuGeoQuestNavigation.h"
#include "RiuGuiTheme.h"
#include "RiuRmsNavigation.h"
#include "RiuSimpleHistogramWidget.h"
#include "RiuViewerCommands.h"
@ -201,6 +202,11 @@ RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent )
m_windowEdgeAxisOverlay = new RivWindowEdgeAxesOverlayItem( standardFont );
m_showWindowEdgeAxes = false;
auto backgroundColor = RiuGuiTheme::getColorByVariableName( "backgroundColor2" );
auto textColor = RiuGuiTheme::getColorByVariableName( "textColor" );
m_windowEdgeAxisOverlay->setFrameColor( cvf::Color4f( RiaColorTools::fromQColorTo3f( backgroundColor ) ) );
m_windowEdgeAxisOverlay->setTextColor( RiaColorTools::fromQColorTo3f( textColor ) );
m_selectionVisualizerManager = new caf::PdmUiSelection3dEditorVisualizer( this );
m_scaleLegend = new caf::OverlayScaleLegend( standardFont );