list view: Allow for styling the viewport differently than scroll view
... as is needed by M3
This commit is contained in:
parent
737dc28313
commit
17d746fad6
|
@ -1153,13 +1153,14 @@ void Editor::setupListView()
|
|||
{
|
||||
using Q = QskListView;
|
||||
|
||||
setGradient( Q::Viewport, m_pal.surface );
|
||||
|
||||
setStrutSize( Q::Cell, { -1, 56 } );
|
||||
setPadding( Q::Cell, { 16_dp, 12_dp, 16_dp, 12_dp } );
|
||||
setBoxBorderMetrics( Q::Cell, { 0, 0, 0, 1_dp } );
|
||||
setBoxBorderColors( Q::Cell, m_pal.outline );
|
||||
setColor( Q::Cell, m_pal.surface );
|
||||
setColor( Q::Cell | Q::Selected, m_pal.primary12 );
|
||||
|
||||
setColor( Q::Text, m_pal.onSurfaceVariant );
|
||||
setColor( Q::Text, m_pal.onSurface );
|
||||
}
|
||||
|
||||
void Editor::setupSubWindow()
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <qmath.h>
|
||||
|
||||
QSK_SUBCONTROL( QskListView, Viewport )
|
||||
QSK_SUBCONTROL( QskListView, Cell )
|
||||
QSK_SUBCONTROL( QskListView, Text )
|
||||
|
||||
|
@ -38,6 +39,7 @@ QskListView::QskListView( QQuickItem* parent )
|
|||
: QskScrollView( parent )
|
||||
, m_data( new PrivateData() )
|
||||
{
|
||||
setSubcontrolProxy( Inherited::Viewport, Viewport );
|
||||
}
|
||||
|
||||
QskListView::~QskListView()
|
||||
|
|
|
@ -33,7 +33,7 @@ class QSK_EXPORT QskListView : public QskScrollView
|
|||
using Inherited = QskScrollView;
|
||||
|
||||
public:
|
||||
QSK_SUBCONTROLS( Cell, Text )
|
||||
QSK_SUBCONTROLS( Viewport, Cell, Text )
|
||||
QSK_STATES( Selected )
|
||||
|
||||
enum SelectionMode
|
||||
|
|
Loading…
Reference in New Issue