Add fonts; for now as a resource
We should use fontconfig of course later
This commit is contained in:
parent
003c4f4197
commit
74804a1ad3
|
@ -5,6 +5,20 @@
|
|||
|
||||
#include <QskBoxBorderMetrics.h>
|
||||
#include <QskBoxBorderColors.h>
|
||||
#include <QskFunctions.h>
|
||||
|
||||
#include <QFontDatabase>
|
||||
|
||||
namespace
|
||||
{
|
||||
static inline QFont qskFont( qreal pointSize )
|
||||
{
|
||||
QFont font("Proxima Nova"); // the other one is Proxima Nova Lt
|
||||
font.setPointSizeF( pointSize /*/ qskDpiScaled( 1.0 )*/ );
|
||||
return font;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DaytimeSkin::DaytimeSkin( QObject* parent ) : QskSkin( parent )
|
||||
{
|
||||
|
@ -14,6 +28,16 @@ DaytimeSkin::DaytimeSkin( QObject* parent ) : QskSkin( parent )
|
|||
|
||||
void DaytimeSkin::initHints()
|
||||
{
|
||||
QFontDatabase db;
|
||||
db.addApplicationFont(":/fonts/ProximaNova-Regular.otf"); // ### use fontconfig
|
||||
db.addApplicationFont(":/fonts/ProximaNova-Semibold.otf"); // ### use fontconfig
|
||||
|
||||
setFont( QskSkin::DefaultFont, qskFont( 12 ) );
|
||||
setFont( QskSkin::TinyFont, qskFont( 12 ) );
|
||||
setFont( QskSkin::SmallFont, qskFont( 10 ) );
|
||||
setFont( QskSkin::LargeFont, qskFont( 14 ) );
|
||||
setFont( QskSkin::HugeFont, qskFont( 36 ) );
|
||||
|
||||
setBoxBorderMetrics( PieChart::Panel, 2 );
|
||||
setGradient( PieChart::Panel, Qt::blue );
|
||||
setBoxBorderColors( PieChart::Panel, Qt::green );
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <QskGraphic.h>
|
||||
#include <QskGraphicLabel.h>
|
||||
#include <QskGraphicIO.h>
|
||||
#include <QskSkin.h>
|
||||
#include <QskTextLabel.h>
|
||||
|
||||
#include <QtGui/QImage>
|
||||
|
@ -23,6 +24,7 @@ MenuItem::MenuItem( const QString& name, QQuickItem* parent ) : QskLinearBox( Qt
|
|||
|
||||
auto* textLabel = new QskTextLabel( name, this );
|
||||
textLabel->setTextColor( Qt::white ); // ### style
|
||||
textLabel->setFontRole(QskSkin::SmallFont);
|
||||
}
|
||||
|
||||
MenuBar::MenuBar( QQuickItem *parent ) : QskLinearBox( Qt::Vertical, parent )
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>fonts/ProximaNova-Regular.otf</file>
|
||||
<file>fonts/ProximaNova-Semibold.otf</file>
|
||||
</qresource>
|
||||
</RCC>
|
Binary file not shown.
Binary file not shown.
|
@ -20,4 +20,5 @@ HEADERS += \
|
|||
PieChartSkinlet.h
|
||||
|
||||
RESOURCES += \
|
||||
images.qrc
|
||||
images.qrc \
|
||||
fonts.qrc
|
||||
|
|
Loading…
Reference in New Issue