mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2657 Final cleanup and refactoring of legends size system
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
RivTernarySaturationOverlayItem::RivTernarySaturationOverlayItem(cvf::Font* font)
|
||||
: TitledOverlayFrame(font, 120, 150)
|
||||
{
|
||||
this->computeLayoutAndExtents( this->sizeHint());
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -54,14 +54,6 @@ RivTernarySaturationOverlayItem::~RivTernarySaturationOverlayItem()
|
||||
// Empty destructor to avoid errors with undefined types when cvf::ref's destructor gets called
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivTernarySaturationOverlayItem::computeLayoutAndExtents(const cvf::Vec2ui& size)
|
||||
{
|
||||
this->setMinimumWidth(size.x());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -102,7 +94,6 @@ void RivTernarySaturationOverlayItem::renderGeneric(cvf::OpenGLContext* oglConte
|
||||
float border = 0.0f;
|
||||
|
||||
cvf::Vec2ui sizeFrameBox = size;
|
||||
sizeFrameBox.x() = this->matchedWidth(); // Match to other legends
|
||||
|
||||
cvf::Camera camera;
|
||||
camera.setViewport(position.x(), position.y(), sizeFrameBox.x(), sizeFrameBox.y());
|
||||
|
||||
@@ -41,7 +41,6 @@ class RivTernarySaturationOverlayItem : public caf::TitledOverlayFrame
|
||||
public:
|
||||
explicit RivTernarySaturationOverlayItem(cvf::Font* font);
|
||||
~RivTernarySaturationOverlayItem();
|
||||
virtual void computeLayoutAndExtents(const cvf::Vec2ui& size) override;
|
||||
|
||||
void setRangeText(const cvf::String& soilRange, const cvf::String& sgasRange, const cvf::String& swatRange);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user