#2657 Final cleanup and refactoring of legends size system

This commit is contained in:
Jacob Støren
2018-04-20 16:55:51 +02:00
parent 03ec76c20a
commit 3957027b4b
10 changed files with 49 additions and 141 deletions

View File

@@ -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());

View File

@@ -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);