fontRole/graphicRole renamed to fontRoleHint/graphicRoleHint
This commit is contained in:
parent
9f2dc44619
commit
92b1ed669b
|
@ -133,7 +133,7 @@ void QskGraphicLabel::setGraphicRole( int role )
|
||||||
{
|
{
|
||||||
const int oldRole = graphicRole();
|
const int oldRole = graphicRole();
|
||||||
|
|
||||||
QskSkinnable::setGraphicRole( Graphic, role );
|
setGraphicRoleHint( Graphic, role );
|
||||||
|
|
||||||
if ( role != oldRole )
|
if ( role != oldRole )
|
||||||
{
|
{
|
||||||
|
@ -144,7 +144,7 @@ void QskGraphicLabel::setGraphicRole( int role )
|
||||||
|
|
||||||
int QskGraphicLabel::graphicRole() const
|
int QskGraphicLabel::graphicRole() const
|
||||||
{
|
{
|
||||||
return QskSkinnable::graphicRole( Graphic );
|
return graphicRoleHint( Graphic );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskColorFilter QskGraphicLabel::graphicFilter() const
|
QskColorFilter QskGraphicLabel::graphicFilter() const
|
||||||
|
|
|
@ -389,12 +389,17 @@ qreal QskSkinnable::spacingHint(
|
||||||
return qskMetric< qreal >( this, aspect | QskAspect::Spacing, status );
|
return qskMetric< qreal >( this, aspect | QskAspect::Spacing, status );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QskSkinnable::setFontRole( const QskAspect aspect, int role )
|
bool QskSkinnable::setFontRoleHint( const QskAspect aspect, int role )
|
||||||
{
|
{
|
||||||
return qskSetFlag( this, aspect | QskAspect::FontRole, role );
|
return qskSetFlag( this, aspect | QskAspect::FontRole, role );
|
||||||
}
|
}
|
||||||
|
|
||||||
int QskSkinnable::fontRole(
|
bool QskSkinnable::resetFontRoleHint( const QskAspect aspect )
|
||||||
|
{
|
||||||
|
return resetFlagHint( aspect | QskAspect::FontRole );
|
||||||
|
}
|
||||||
|
|
||||||
|
int QskSkinnable::fontRoleHint(
|
||||||
const QskAspect aspect, QskSkinHintStatus* status ) const
|
const QskAspect aspect, QskSkinHintStatus* status ) const
|
||||||
{
|
{
|
||||||
return qskFlag( this, aspect | QskAspect::FontRole, status );
|
return qskFlag( this, aspect | QskAspect::FontRole, status );
|
||||||
|
@ -402,15 +407,20 @@ int QskSkinnable::fontRole(
|
||||||
|
|
||||||
QFont QskSkinnable::effectiveFont( const QskAspect aspect ) const
|
QFont QskSkinnable::effectiveFont( const QskAspect aspect ) const
|
||||||
{
|
{
|
||||||
return effectiveSkin()->font( fontRole( aspect ) );
|
return effectiveSkin()->font( fontRoleHint( aspect ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QskSkinnable::setGraphicRole( const QskAspect aspect, int role )
|
bool QskSkinnable::setGraphicRoleHint( const QskAspect aspect, int role )
|
||||||
{
|
{
|
||||||
return qskSetFlag( this, aspect | QskAspect::GraphicRole, role );
|
return qskSetFlag( this, aspect | QskAspect::GraphicRole, role );
|
||||||
}
|
}
|
||||||
|
|
||||||
int QskSkinnable::graphicRole(
|
bool QskSkinnable::resetGraphicRoleHint( const QskAspect aspect )
|
||||||
|
{
|
||||||
|
return resetFlagHint( aspect | QskAspect::GraphicRole );
|
||||||
|
}
|
||||||
|
|
||||||
|
int QskSkinnable::graphicRoleHint(
|
||||||
const QskAspect aspect, QskSkinHintStatus* status ) const
|
const QskAspect aspect, QskSkinHintStatus* status ) const
|
||||||
{
|
{
|
||||||
return qskFlag( this, aspect | QskAspect::GraphicRole, status );
|
return qskFlag( this, aspect | QskAspect::GraphicRole, status );
|
||||||
|
|
|
@ -183,11 +183,13 @@ class QSK_EXPORT QskSkinnable
|
||||||
bool resetAlignmentHint( QskAspect );
|
bool resetAlignmentHint( QskAspect );
|
||||||
Qt::Alignment alignmentHint( QskAspect, Qt::Alignment = Qt::Alignment() ) const;
|
Qt::Alignment alignmentHint( QskAspect, Qt::Alignment = Qt::Alignment() ) const;
|
||||||
|
|
||||||
bool setFontRole( QskAspect, int role );
|
bool setFontRoleHint( QskAspect, int role );
|
||||||
int fontRole( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
bool resetFontRoleHint( QskAspect );
|
||||||
|
int fontRoleHint( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
||||||
|
|
||||||
bool setGraphicRole( QskAspect, int role );
|
bool setGraphicRoleHint( QskAspect, int role );
|
||||||
int graphicRole( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
bool resetGraphicRoleHint( QskAspect );
|
||||||
|
int graphicRoleHint( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void updateNode( QSGNode* );
|
virtual void updateNode( QSGNode* );
|
||||||
|
|
|
@ -521,14 +521,14 @@ void QskTextInput::setActivationModes( ActivationModes modes )
|
||||||
|
|
||||||
int QskTextInput::fontRole() const
|
int QskTextInput::fontRole() const
|
||||||
{
|
{
|
||||||
return QskSkinnable::fontRole( Text );
|
return fontRoleHint( Text );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskTextInput::setFontRole( int role )
|
void QskTextInput::setFontRole( int role )
|
||||||
{
|
{
|
||||||
if ( role != fontRole() )
|
if ( role != fontRole() )
|
||||||
{
|
{
|
||||||
QskSkinnable::setFontRole( Text, role );
|
setFontRoleHint( Text, role );
|
||||||
|
|
||||||
polish();
|
polish();
|
||||||
resetImplicitSize();
|
resetImplicitSize();
|
||||||
|
@ -551,7 +551,6 @@ void QskTextInput::setAlignment( Qt::Alignment alignment )
|
||||||
m_data->textInput->setAlignment( alignment );
|
m_data->textInput->setAlignment( alignment );
|
||||||
|
|
||||||
polish();
|
polish();
|
||||||
|
|
||||||
Q_EMIT alignmentChanged();
|
Q_EMIT alignmentChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -573,7 +572,9 @@ bool QskTextInput::isReadOnly() const
|
||||||
|
|
||||||
void QskTextInput::setReadOnly( bool on )
|
void QskTextInput::setReadOnly( bool on )
|
||||||
{
|
{
|
||||||
if ( m_data->textInput->isReadOnly() == on )
|
auto input = m_data->textInput;
|
||||||
|
|
||||||
|
if ( input->isReadOnly() == on )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
@ -581,10 +582,10 @@ void QskTextInput::setReadOnly( bool on )
|
||||||
setFocusPolicy( Qt::NoFocus );
|
setFocusPolicy( Qt::NoFocus );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_data->textInput->setReadOnly( on );
|
input->setReadOnly( on );
|
||||||
|
|
||||||
// we are killing user settings here ?
|
// we are killing user settings here ?
|
||||||
m_data->textInput->setFlag( QQuickItem::ItemAcceptsInputMethod, !on );
|
input->setFlag( QQuickItem::ItemAcceptsInputMethod, !on );
|
||||||
qskUpdateInputMethod( this, Qt::ImEnabled );
|
qskUpdateInputMethod( this, Qt::ImEnabled );
|
||||||
|
|
||||||
setSkinStateFlag( ReadOnly, on );
|
setSkinStateFlag( ReadOnly, on );
|
||||||
|
|
|
@ -171,7 +171,7 @@ void QskTextLabel::setFontRole( int role )
|
||||||
{
|
{
|
||||||
const int oldRole = fontRole();
|
const int oldRole = fontRole();
|
||||||
|
|
||||||
QskSkinnable::setFontRole( Text, role );
|
setFontRoleHint( Text, role );
|
||||||
|
|
||||||
if ( oldRole != role )
|
if ( oldRole != role )
|
||||||
{
|
{
|
||||||
|
@ -184,7 +184,7 @@ void QskTextLabel::setFontRole( int role )
|
||||||
|
|
||||||
int QskTextLabel::fontRole() const
|
int QskTextLabel::fontRole() const
|
||||||
{
|
{
|
||||||
return QskSkinnable::fontRole( Text );
|
return fontRoleHint( Text );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskTextLabel::setTextColor( const QColor& color )
|
void QskTextLabel::setTextColor( const QColor& color )
|
||||||
|
|
Loading…
Reference in New Issue