2020-08-11 17:56:53 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the 3-clause BSD License
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#include "Page.h"
|
|
|
|
#include <QskRgbValue.h>
|
|
|
|
|
|
|
|
Page::Page( Qt::Orientation orientation, QQuickItem* parent )
|
|
|
|
: QskLinearBox( orientation, parent )
|
2021-12-06 19:20:59 +01:00
|
|
|
, m_gradient( QskRgb::GhostWhite )
|
2020-08-11 17:56:53 +02:00
|
|
|
{
|
2021-12-06 19:20:59 +01:00
|
|
|
setMargins( 20 );
|
2020-08-11 17:56:53 +02:00
|
|
|
setPadding( 10 );
|
|
|
|
setSpacing( 10 );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Page::setGradient( const QskGradient& gradient )
|
|
|
|
{
|
2021-12-06 19:20:59 +01:00
|
|
|
if ( gradient != m_gradient )
|
|
|
|
{
|
|
|
|
m_gradient = gradient;
|
|
|
|
|
|
|
|
if ( parentItem() && isVisibleToParent() )
|
|
|
|
parentItem()->update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QskGradient Page::gradient() const
|
|
|
|
{
|
|
|
|
return m_gradient;
|
2020-08-11 17:56:53 +02:00
|
|
|
}
|