QskSkin::setGraphicRole, QskSkin::setFontRole introduced
This commit is contained in:
parent
46da086092
commit
42981403e7
@ -148,6 +148,9 @@ QskSkin::QskSkin( QObject* parent ):
|
||||
|
||||
const QFont font = QGuiApplication::font();
|
||||
setupFonts( font.family(), font.weight(), font.italic() );
|
||||
|
||||
setMargins( QskAspect::Control | QskAspect::Margin, 0 );
|
||||
setMargins( QskAspect::Control | QskAspect::Padding, 0 );
|
||||
}
|
||||
|
||||
QskSkin::~QskSkin()
|
||||
@ -194,6 +197,16 @@ QskMargins QskSkin::margins( QskAspect::Aspect aspect ) const
|
||||
return m_data->hintTable.margins( aspect );
|
||||
}
|
||||
|
||||
void QskSkin::setFontRole( QskAspect::Aspect aspect, int fontRole )
|
||||
{
|
||||
m_data->hintTable.setFontRole( aspect, fontRole );
|
||||
}
|
||||
|
||||
void QskSkin::setGraphicRole( QskAspect::Aspect aspect, int graphicRole )
|
||||
{
|
||||
m_data->hintTable.setGraphicRole( aspect, graphicRole );
|
||||
}
|
||||
|
||||
void QskSkin::setAnimation(
|
||||
QskAspect::Aspect aspect, QskAnimationHint animation )
|
||||
{
|
||||
|
@ -79,6 +79,9 @@ public:
|
||||
void resetGraphicFilter( int graphicRole );
|
||||
QskColorFilter graphicFilter( int graphicRole ) const;
|
||||
|
||||
void setFontRole( QskAspect::Aspect, int fontRole );
|
||||
void setGraphicRole( QskAspect::Aspect, int graphicRole );
|
||||
|
||||
void setFont( int fontRole, const QFont& );
|
||||
void resetFont( int fontRole );
|
||||
QFont font( int fontRole ) const;
|
||||
|
@ -248,7 +248,7 @@ void QskMaterialSkin::initPushButtonHints()
|
||||
setMetric( Q::Panel | MinimumWidth, 30 );
|
||||
setMetric( Q::Panel | MinimumHeight, 16 );
|
||||
|
||||
setSkinHint( Q::Text | QskAspect::FontRole, ButtonFontRole );
|
||||
setFontRole( Q::Text, ButtonFontRole );
|
||||
setSkinHint( Q::Text | QskAspect::Alignment, Qt::AlignCenter );
|
||||
|
||||
const QskMargins margin( 4, 3 );
|
||||
@ -371,7 +371,7 @@ void QskMaterialSkin::initDialogButtonHints()
|
||||
|
||||
// text
|
||||
|
||||
setSkinHint( Q::Text | QskAspect::FontRole, ButtonFontRole );
|
||||
setFontRole( Q::Text, ButtonFontRole );
|
||||
setSkinHint( Q::Text | QskAspect::Alignment, Qt::AlignCenter );
|
||||
|
||||
setColor( Q::Text, pal.textColor );
|
||||
@ -468,7 +468,7 @@ void QskMaterialSkin::initTabButtonHints()
|
||||
for ( auto state : { Q::Checked, Q::Pressed, Q::Checkable | Q::Hovered } )
|
||||
setColor( Q::Panel | Border | BottomEdge | state, pal.accentColor );
|
||||
|
||||
setSkinHint( Q::Text | QskAspect::FontRole, ButtonFontRole );
|
||||
setFontRole( Q::Text, ButtonFontRole );
|
||||
setSkinHint( Q::Text | QskAspect::Alignment, Qt::AlignCenter );
|
||||
|
||||
setColor( Q::Text, pal.textColor );
|
||||
@ -509,7 +509,7 @@ void QskMaterialSkin::initInputPanelHints()
|
||||
|
||||
// glyph
|
||||
setSkinHint( Q::KeyGlyph | Alignment, Qt::AlignCenter );
|
||||
setSkinHint( Q::KeyGlyph | FontRole, QskSkin::TinyFont );
|
||||
setFontRole( Q::KeyGlyph, QskSkin::TinyFont );
|
||||
|
||||
setColor( Q::KeyGlyph, pal.textColor );
|
||||
setColor( Q::KeyGlyph | Q::Disabled, pal.darker200 );
|
||||
@ -606,7 +606,7 @@ void QskMaterialSkin::initSubWindowHints()
|
||||
setColor( Q::TitleBar, pal.darker200 );
|
||||
setColor( Q::TitleBar | Q::Focused, pal.accentColor );
|
||||
|
||||
setSkinHint( Q::TitleBar | FontRole, int( QskSkin::TinyFont ) );
|
||||
setFontRole( Q::TitleBar, QskSkin::TinyFont );
|
||||
}
|
||||
|
||||
#include "moc_QskMaterialSkin.cpp"
|
||||
|
@ -465,7 +465,7 @@ void QskSquiekSkin::initInputPanelHints()
|
||||
pal.initButton( this, Q::KeyFrame | Q::Pressed, false );
|
||||
|
||||
setSkinHint( Q::KeyGlyph | Alignment, Qt::AlignCenter );
|
||||
setSkinHint( Q::KeyGlyph | FontRole, QskSkin::TinyFont );
|
||||
setFontRole( Q::KeyGlyph, QskSkin::TinyFont );
|
||||
|
||||
// glyph
|
||||
setColor( Q::KeyGlyph, pal.themeForeground );
|
||||
@ -541,7 +541,7 @@ void QskSquiekSkin::initSubWindowHints()
|
||||
setMargins( Q::Panel | Padding, 10 );
|
||||
setMetric( Q::TitleBar | Border, 2 );
|
||||
|
||||
setSkinHint( Q::TitleBar | FontRole, int( QskSkin::TinyFont ) );
|
||||
setFontRole( Q::TitleBar, QskSkin::TinyFont );
|
||||
|
||||
setColor( Q::Panel | Border | LeftEdge | TopEdge, pal.lighter125 );
|
||||
setColor( Q::Panel | Border | RightEdge | BottomEdge, pal.darker200 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user