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