style menu bar icons
This commit is contained in:
parent
56a9f6dffe
commit
2c1fe52712
|
@ -26,12 +26,12 @@ MenuItem::MenuItem( const QString& name, QQuickItem* parent ) : QskLinearBox( Qt
|
|||
setAcceptHoverEvents( true );
|
||||
setPanel( true );
|
||||
|
||||
QString fileName = ":/images/" + name.toLower() + ".png"; // width: 14
|
||||
QString fileName = ":/images/" + name.toLower() + ".png";
|
||||
QImage image( fileName );
|
||||
auto graphic = QskGraphic::fromImage( image );
|
||||
auto* graphicLabel = new MenuBarGraphicLabel( graphic, this );
|
||||
graphicLabel->setSizePolicy( QskSizePolicy::Fixed, QskSizePolicy::Fixed );
|
||||
graphicLabel->setFixedWidth( 14 );
|
||||
graphicLabel->setFixedWidth( metric( MenuBarGraphicLabel::Graphic | QskAspect::Size ) );
|
||||
|
||||
new MenuBarLabel( name, this );
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ void Skin::initHints( const Palette& palette )
|
|||
|
||||
ed.setMargin( MenuBarTopLabel::Graphic, { 50, 0, 50, 54 } );
|
||||
|
||||
ed.setMetric( MenuBarGraphicLabel::Graphic | QskAspect::Size, 14 );
|
||||
ed.setAlignment( MenuBarGraphicLabel::Graphic, Qt::AlignCenter );
|
||||
|
||||
// top bar:
|
||||
|
|
Loading…
Reference in New Issue