Fix merge with cleanup branch
This commit is contained in:
commit
3d96ff2ad7
|
@ -1,8 +1,10 @@
|
||||||
#include "lib/qtmaterialtheme.h"
|
#include "lib/qtmaterialtheme.h"
|
||||||
#include "lib/qtmaterialtheme_p.h"
|
#include "lib/qtmaterialtheme_p.h"
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringBuilder>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
/*!
|
/*!material
|
||||||
* \class QtMaterialThemePrivate
|
* \class QtMaterialThemePrivate
|
||||||
* \internal
|
* \internal
|
||||||
*/
|
*/
|
||||||
|
@ -150,3 +152,8 @@ void QtMaterialTheme::setColor(const QString &key, Material::Color color)
|
||||||
|
|
||||||
d->colors.insert(key, palette[color]);
|
d->colors.insert(key, palette[color]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QIcon QtMaterialTheme::icon(QString category, QString icon)
|
||||||
|
{
|
||||||
|
return QIcon(":/icons/icons/" % category % "/svg/production/ic_" % icon % "_24px.svg");
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
#include <QIcon>
|
||||||
|
|
||||||
namespace Material
|
namespace Material
|
||||||
{
|
{
|
||||||
|
@ -330,6 +331,8 @@ public:
|
||||||
void setColor(const QString &key, const QColor &color);
|
void setColor(const QString &key, const QColor &color);
|
||||||
void setColor(const QString &key, Material::Color color);
|
void setColor(const QString &key, Material::Color color);
|
||||||
|
|
||||||
|
static QIcon icon(QString category, QString icon);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const QScopedPointer<QtMaterialThemePrivate> d_ptr;
|
const QScopedPointer<QtMaterialThemePrivate> d_ptr;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/material">
|
<qresource prefix="/fonts">
|
||||||
<file>../fonts/Roboto/Roboto-Black.ttf</file>
|
<file>../fonts/Roboto/Roboto-Black.ttf</file>
|
||||||
<file>../fonts/Roboto/Roboto-Bold.ttf</file>
|
<file>../fonts/Roboto/Roboto-Bold.ttf</file>
|
||||||
<file>../fonts/Roboto/Roboto-Medium.ttf</file>
|
<file>../fonts/Roboto/Roboto-Medium.ttf</file>
|
||||||
|
@ -7,4 +7,7 @@
|
||||||
<file>../fonts/Roboto/Roboto-Light.ttf</file>
|
<file>../fonts/Roboto/Roboto-Light.ttf</file>
|
||||||
<file>../fonts/Roboto/Roboto-Thin.ttf</file>
|
<file>../fonts/Roboto/Roboto-Thin.ttf</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
<qresource prefix="/icons">
|
||||||
|
<file>icons/communication/svg/production/ic_message_24px.svg</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -75,7 +75,7 @@ void AvatarSettingsEditor::updateWidget()
|
||||||
m_avatar->setImage(QImage(":/images/assets/sikh.jpg"));
|
m_avatar->setImage(QImage(":/images/assets/sikh.jpg"));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
m_avatar->setIcon(QIcon(":/icons/assets/ic_message_24px.svg"));
|
m_avatar->setIcon(QIcon(":/icons/icons/communication/svg/production/ic_message_24px.svg"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
QT += core gui widgets
|
QT += core gui widgets
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
SOURCES = \
|
SOURCES = mainwindow.cpp \
|
||||||
mainwindow.cpp \
|
|
||||||
main.cpp \
|
main.cpp \
|
||||||
avatarsettingseditor.cpp
|
avatarsettingseditor.cpp
|
||||||
HEADERS = \
|
HEADERS = mainwindow.h \
|
||||||
mainwindow.h \
|
|
||||||
avatarsettingseditor.h
|
avatarsettingseditor.h
|
||||||
LIBS += ../components/libcomponents.a
|
LIBS += ../components/libcomponents.a
|
||||||
INCLUDEPATH += ../components/
|
INCLUDEPATH += ../components/
|
||||||
TARGET = ../examples-exe
|
TARGET = ../examples-exe
|
||||||
RESOURCES += resources.qrc
|
|
||||||
|
RESOURCES += \
|
||||||
|
examples.qrc
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
avatarsettingsform.ui
|
avatarsettingsform.ui
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/icons">
|
|
||||||
<file>assets/ic_message_24px.svg</file>
|
|
||||||
</qresource>
|
|
||||||
<qresource prefix="/images">
|
<qresource prefix="/images">
|
||||||
|
<file>assets/uxceo-128.jpg</file>
|
||||||
<file>assets/sikh.jpg</file>
|
<file>assets/sikh.jpg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
|
@ -6,6 +6,8 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
|
||||||
|
Q_INIT_RESOURCE(resources);
|
||||||
|
|
||||||
MainWindow window;
|
MainWindow window;
|
||||||
window.show();
|
window.show();
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,10 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include <QtWidgets/QVBoxLayout>
|
#include <QtWidgets/QVBoxLayout>
|
||||||
#include <qtmaterialavatar.h>
|
|
||||||
#include "avatarsettingseditor.h"
|
#include "avatarsettingseditor.h"
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent)
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
QtMaterialAvatar *avatars[3];
|
|
||||||
avatars[0] = new QtMaterialAvatar(QImage("../qt-material-widgets/examples/assets/uxceo-128.jpg"));
|
|
||||||
avatars[1] = new QtMaterialAvatar('W');
|
|
||||||
avatars[2] = new QtMaterialAvatar(QIcon(":/icons/assets/ic_message_24px.svg"));
|
|
||||||
|
|
||||||
QWidget *widget = new QWidget;
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
|
||||||
|
|
||||||
widget->setLayout(layout);
|
|
||||||
setCentralWidget(widget);
|
|
||||||
|
|
||||||
layout->addWidget(avatars[0]);
|
|
||||||
layout->addWidget(avatars[1]);
|
|
||||||
layout->addWidget(avatars[2]);
|
|
||||||
*/
|
|
||||||
|
|
||||||
AvatarSettingsEditor *editor = new AvatarSettingsEditor;
|
AvatarSettingsEditor *editor = new AvatarSettingsEditor;
|
||||||
setCentralWidget(editor);
|
setCentralWidget(editor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue