qskinny/examples/iotdashboard/RoundedIcon.cpp
2023-04-06 10:15:03 +02:00

31 lines
847 B
C++

/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* SPDX-License-Identifier: BSD-3-Clause
*****************************************************************************/
#include "RoundedIcon.h"
QSK_SUBCONTROL( RoundedIcon, Panel )
QSK_SUBCONTROL( RoundedIcon, PalePanel )
QSK_SUBCONTROL( RoundedIcon, Graphic )
QSK_STATE( RoundedIcon, Bright, ( QskAspect::FirstUserState << 1 ) )
RoundedIcon::RoundedIcon( bool isBright, QQuickItem* parent )
: QskPushButton( parent )
{
if( isBright )
setSkinStateFlag( Bright );
setPale( false );
setSubcontrolProxy( QskPushButton::Icon, Icon );
}
void RoundedIcon::setPale( bool on )
{
setSubcontrolProxy( QskPushButton::Panel, on ? PalePanel : Panel );
}
#include "moc_RoundedIcon.cpp"