main grid box styling
This commit is contained in:
parent
dd124afcf1
commit
0237ed040e
|
@ -21,6 +21,7 @@
|
|||
#include <QTimer>
|
||||
|
||||
QSK_SUBCONTROL( MainContent, Panel )
|
||||
QSK_SUBCONTROL( MainContentGridBox, Panel )
|
||||
|
||||
ShadowPositioner::ShadowPositioner( QQuickItem* parent ) : QskControl( parent )
|
||||
{
|
||||
|
@ -74,12 +75,9 @@ MainContent::MainContent( QQuickItem* parent ) : QskLinearBox( Qt::Vertical, par
|
|||
auto* topBar = new TopBar( this );
|
||||
addItem( topBar );
|
||||
|
||||
auto* gridBox = new QskGridBox( this );
|
||||
gridBox->setSpacing( 15 );
|
||||
gridBox->setMargins( {19, 0, 27, 24} );
|
||||
auto* gridBox = new MainContentGridBox( this );
|
||||
gridBox->setPanel( true );
|
||||
gridBox->setBoxShapeHint( QskBox::Panel, 6 );
|
||||
gridBox->setBoxBorderMetricsHint( QskBox::Panel, 2 );
|
||||
gridBox->setSpacing( 15 );
|
||||
addItem( gridBox );
|
||||
|
||||
auto* usage = new Usage( gridBox );
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef MAINCONTENT_H
|
||||
#define MAINCONTENT_H
|
||||
|
||||
#include <QskGridBox.h>
|
||||
#include <QskLinearBox.h>
|
||||
|
||||
class QskGridBox;
|
||||
class ShadowBox;
|
||||
class ShadowedRectangle;
|
||||
|
||||
|
@ -21,6 +21,30 @@ class ShadowPositioner : public QskControl
|
|||
QVector<ShadowedRectangle*> m_rectangles;
|
||||
};
|
||||
|
||||
class MainContentGridBox : public QskGridBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QSK_SUBCONTROLS( Panel )
|
||||
|
||||
MainContentGridBox( QQuickItem* parent = nullptr )
|
||||
: QskGridBox( parent )
|
||||
{
|
||||
}
|
||||
|
||||
QskAspect::Subcontrol effectiveSubcontrol(
|
||||
QskAspect::Subcontrol subControl ) const override final
|
||||
{
|
||||
if( subControl == QskGridBox::Panel )
|
||||
{
|
||||
return Panel;
|
||||
}
|
||||
|
||||
return subControl;
|
||||
}
|
||||
};
|
||||
|
||||
class MainContent : public QskLinearBox
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -71,6 +71,8 @@ void Skin::initHints( const Palette& palette )
|
|||
color.setAlphaF( 0.14 );
|
||||
ed.setGradient( MenuItem::Panel | MenuItem::Active, color );
|
||||
|
||||
ed.setPadding( MainContentGridBox::Panel, {19, 0, 27, 24} );
|
||||
|
||||
ed.setColor( MenuBarLabel::Text, Qt::white );
|
||||
ed.setFontRole( MenuBarLabel::Text, QskSkin::SmallFont );
|
||||
|
||||
|
|
Loading…
Reference in New Issue