mirror of
https://github.com/stemoretti/BaseUI.git
synced 2025-12-30 05:02:47 -05:00
Allow the toolbar color to be the same as the theme background and small fixes
This commit is contained in:
@ -11,7 +11,7 @@ namespace BaseUI
|
||||
void init(QQmlEngine *engine)
|
||||
{
|
||||
QQuickStyle::setStyle("Material");
|
||||
Icons::instance = std::make_unique<Icons>();
|
||||
Icons::instance = new Icons(static_cast<QObject *>(engine));
|
||||
#ifdef BASEUI_INCLUDE_ICONS
|
||||
QString path = ":/baseui/imports/BaseUI/icons/";
|
||||
BaseUI::Icons::registerIcons(engine, path + "MaterialIcons-Regular.ttf",
|
||||
|
||||
@ -4,8 +4,6 @@
|
||||
#include <QQmlEngine>
|
||||
#include <QQmlPropertyMap>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace BaseUI
|
||||
{
|
||||
|
||||
@ -16,7 +14,7 @@ class Icons : public QQmlPropertyMap
|
||||
public:
|
||||
Icons(QObject *parent = nullptr);
|
||||
|
||||
inline static std::unique_ptr<Icons> instance;
|
||||
inline static Icons *instance;
|
||||
|
||||
static void registerIcons(QQmlEngine *engine, const QString &fontPath,
|
||||
const QString &fontName, const QVariantMap &codes);
|
||||
@ -52,7 +50,7 @@ public:
|
||||
else
|
||||
s_engine = engine;
|
||||
|
||||
return Icons::instance.get();
|
||||
return Icons::instance;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user