Bring PartitionSplitterWidget layout up to PartitionBarsView level.

main
Teo Mrnjavac 9 years ago
parent 6a93f34c15
commit 56292974a4

@ -33,10 +33,10 @@
#include <QStyleOption>
static const int VIEW_HEIGHT = CalamaresUtils::defaultFontHeight() + 8;
static const int VIEW_HEIGHT = qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts
(int)( CalamaresUtils::defaultFontHeight() * 0.6 ) + 22 ); // wins out with small fonts
static const int CORNER_RADIUS = 3;
static const int EXTENDED_PARTITION_MARGIN = 4;
static const int EXTENDED_PARTITION_MARGIN = qMax( 4, VIEW_HEIGHT / 6 );
PartitionSplitterWidget::PartitionSplitterWidget( QWidget* parent )
: QWidget( parent )
@ -199,12 +199,20 @@ PartitionSplitterWidget::sizeHint() const
}
QSize
PartitionSplitterWidget::minimumSizeHint() const
{
return sizeHint();
}
void
PartitionSplitterWidget::paintEvent( QPaintEvent* event )
{
QPainter painter( this );
QPainter painter( viewport() );
painter.fillRect( rect(), palette().window() );
painter.setRenderHint( QPainter::Antialiasing );
if ( m_itemToResize && m_itemToResizeNext )
drawPartitions( &painter, rect(), m_items );
}

@ -51,6 +51,7 @@ public:
qint64 newPartitionSize() const;
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
signals:
void partitionResized( const QString&, qint64, qint64 );

Loading…
Cancel
Save