Bring PartitionSplitterWidget layout up to PartitionBarsView level.
This commit is contained in:
parent
6a93f34c15
commit
56292974a4
@ -33,10 +33,10 @@
|
|||||||
#include <QStyleOption>
|
#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 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 )
|
PartitionSplitterWidget::PartitionSplitterWidget( QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
@ -199,12 +199,20 @@ PartitionSplitterWidget::sizeHint() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QSize
|
||||||
|
PartitionSplitterWidget::minimumSizeHint() const
|
||||||
|
{
|
||||||
|
return sizeHint();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PartitionSplitterWidget::paintEvent( QPaintEvent* event )
|
PartitionSplitterWidget::paintEvent( QPaintEvent* event )
|
||||||
{
|
{
|
||||||
QPainter painter( this );
|
QPainter painter( viewport() );
|
||||||
painter.fillRect( rect(), palette().window() );
|
painter.fillRect( rect(), palette().window() );
|
||||||
painter.setRenderHint( QPainter::Antialiasing );
|
painter.setRenderHint( QPainter::Antialiasing );
|
||||||
|
|
||||||
if ( m_itemToResize && m_itemToResizeNext )
|
if ( m_itemToResize && m_itemToResizeNext )
|
||||||
drawPartitions( &painter, rect(), m_items );
|
drawPartitions( &painter, rect(), m_items );
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@ public:
|
|||||||
qint64 newPartitionSize() const;
|
qint64 newPartitionSize() const;
|
||||||
|
|
||||||
QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
|
QSize minimumSizeHint() const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void partitionResized( const QString&, qint64, qint64 );
|
void partitionResized( const QString&, qint64, qint64 );
|
||||||
|
Loading…
Reference in New Issue
Block a user