mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Implement pdf rendering (#5250)
* First PDF creation support * Reimplement info box * Set title and make overlay frame margins more unified * Remove a style sheet that was never meant to be applied to Project Tree * Update RiuDraggableOverlayFrame when changing content * Default page layout in Preferences * undo removal of elision * Remove friend class assignment in cafCategoryMapper * the required methods have been made public * Fix up after review * Remove spurious const on by-value return * Fix compile errors on Linux * Fix size adjustment of legends with plot resizing
This commit is contained in:
@@ -31,6 +31,11 @@ RiuQwtPlotLegend::RiuQwtPlotLegend( QWidget* parent /*= nullptr */ )
|
||||
: QwtLegend( parent )
|
||||
, m_columnCount( 1 )
|
||||
{
|
||||
QwtDynGridLayout* legendLayout = qobject_cast<QwtDynGridLayout*>( contentsWidget()->layout() );
|
||||
if ( legendLayout )
|
||||
{
|
||||
legendLayout->setExpandingDirections( Qt::Horizontal | Qt::Vertical );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -75,7 +80,7 @@ QSize RiuQwtPlotLegend::sizeHint() const
|
||||
maxHeight = std::max( maxHeight, itemSize.height() );
|
||||
}
|
||||
QMargins margins = legendLayout->contentsMargins();
|
||||
int totalSpacing = ( numRows + 1 ) * legendLayout->spacing() + margins.top() + margins.bottom();
|
||||
int totalSpacing = ( numRows + 2 ) * legendLayout->spacing() + margins.top() + margins.bottom();
|
||||
|
||||
int height = maxHeight * numRows + totalSpacing;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user