mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#51 Add background to standard legends. Needed a separate legend implementation, now in caf. Cleaned up CategoryLegend to make it ready for the new background.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "RiuViewerCommands.h"
|
||||
|
||||
#include "cafCategoryLegend.h"
|
||||
#include "cafOverlayScalarMapperLegend.h"
|
||||
#include "cafCeetronPlusNavigation.h"
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
#include "cafEffectGenerator.h"
|
||||
@@ -49,7 +50,6 @@
|
||||
#include "cvfFont.h"
|
||||
#include "cvfOpenGLResourceManager.h"
|
||||
#include "cvfOverlayAxisCross.h"
|
||||
#include "cvfOverlayScalarMapperLegend.h"
|
||||
#include "cvfRenderQueueSorter.h"
|
||||
#include "cvfRenderSequence.h"
|
||||
#include "cvfRendering.h"
|
||||
@@ -908,17 +908,17 @@ void RiuViewer::updateLegendTextAndTickMarkColor(cvf::OverlayItem* legend)
|
||||
|
||||
cvf::Color3f contrastColor = computeContrastColor();
|
||||
|
||||
cvf::OverlayScalarMapperLegend* scalarMapperLegend = dynamic_cast<cvf::OverlayScalarMapperLegend*>(legend);
|
||||
caf::OverlayScalarMapperLegend* scalarMapperLegend = dynamic_cast<caf::OverlayScalarMapperLegend*>(legend);
|
||||
if (scalarMapperLegend)
|
||||
{
|
||||
scalarMapperLegend->setColor(contrastColor);
|
||||
scalarMapperLegend->setTextColor(contrastColor);
|
||||
scalarMapperLegend->setLineColor(contrastColor);
|
||||
}
|
||||
|
||||
caf::CategoryLegend* categoryLegend = dynamic_cast<caf::CategoryLegend*>(legend);
|
||||
if (categoryLegend)
|
||||
{
|
||||
categoryLegend->setColor(contrastColor);
|
||||
categoryLegend->setTextColor(contrastColor);
|
||||
categoryLegend->setLineColor(contrastColor);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,11 +81,11 @@
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
#include "cafPdmUiTreeView.h"
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cafOverlayScalarMapperLegend.h"
|
||||
|
||||
#include "cvfDrawableGeo.h"
|
||||
#include "cvfHitItemCollection.h"
|
||||
#include "cvfOverlayAxisCross.h"
|
||||
#include "cvfOverlayScalarMapperLegend.h"
|
||||
#include "cvfPart.h"
|
||||
#include "cvfTransform.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user