Skip to content
Permalink
Browse files

Font icon test

  • Loading branch information...
martonborzak committed Oct 11, 2019
1 parent 967c283 commit 77c39c8716fc814c3aede5cef316982fcb15652a
@@ -44,7 +44,7 @@ Rectangle {
id: endAnim
running: false

PauseAnimation {duration: 6000}
PauseAnimation {duration: 3000}
PropertyAnimation { target: loadingIconAnim; properties: "running";to: false; duration: 0 }
PropertyAnimation { target: yio_O; properties: "opacity"; to: 0; easing.type: Easing.OutExpo; duration: 400 }
PauseAnimation {duration: 200}
@@ -198,24 +198,18 @@ Rectangle {
lineHeight: 1
}

Image {
Text {
id: icon
asynchronous: true
width: 80
height: 80
fillMode: Image.PreserveAspectFit
source: "qrc:/components/blind/images/icon-blind.png"
color: colorText
text: "\uE900"
width: 85
height: 85
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font {family: "icons"; pixelSize: 120 }
anchors.left: parent.left
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter

ColorOverlay {
visible: !darkMode
anchors.fill: parent
source: parent
color: colorText
antialiasing: true
}
}

}
@@ -197,24 +197,18 @@ Rectangle {
lineHeight: 1
}

Image {
Text {
id: icon
asynchronous: true
width: 80
height: 80
fillMode: Image.PreserveAspectFit
source: "qrc:/components/light/images/icon-light.png"
color: colorText
text: "\uE903"
width: 85
height: 85
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font {family: "icons"; pixelSize: 120 }
anchors.left: parent.left
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter

ColorOverlay {
visible: !darkMode
anchors.fill: parent
source: parent
color: colorText
antialiasing: true
}
}

}
@@ -172,24 +172,18 @@ Rectangle {
lineHeight: 1
}

Image {
Text {
id: icon
asynchronous: true
width: 80
height: 80
fillMode: Image.PreserveAspectFit
source: "qrc:/components/blind/images/icon-blind.png"
color: colorText
text: "\uE905"
width: 85
height: 85
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font {family: "icons"; pixelSize: 120 }
anchors.left: parent.left
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter

ColorOverlay {
visible: !darkMode
anchors.fill: parent
source: parent
color: colorText
antialiasing: true
}
}

}
@@ -172,24 +172,18 @@ Rectangle {
lineHeight: 1
}

Image {
Text {
id: icon
asynchronous: true
width: 80
height: 80
fillMode: Image.PreserveAspectFit
source: ""
color: colorText
text: "\uE909"
width: 85
height: 85
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font {family: "icons"; pixelSize: 120 }
anchors.left: parent.left
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter

ColorOverlay {
visible: !darkMode
anchors.fill: parent
source: parent
color: colorText
antialiasing: true
}
}

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +5.3 KB icons/icons.ttf
Binary file not shown.
@@ -140,6 +140,16 @@ win32 {
COPIES += plugins
plugins.files = $$files($$PWD/plugins/*.*)
plugins.path = $$DESTDIR/release/plugins

#copy fonts
COPIES += icons
fonts.files = $$files($$PWD/fonts/*.*)
fonts.path = $$DESTDIR/release/fonts

#copy icons
COPIES += icons
icons.files = $$files($$PWD/icons/*.*)
icons.path = $$DESTDIR/release/icons
}
macx {
APP_QML_FILES.files = $$PWD/config.json $$PWD/translations.json
@@ -151,6 +161,16 @@ macx {
INTEGRATIONS.path = Contents/Resources/plugins
QMAKE_BUNDLE_DATA += INTEGRATIONS

#copy fonts
FONTS.files = $$files($$PWD/fonts/*.*)
FONTS.path = Contents/Resources/fonts
QMAKE_BUNDLE_DATA += FONTS

#copy icons
ICONS.files = $$files($$PWD/icons/*.*)
ICONS.path = Contents/Resources/icons
QMAKE_BUNDLE_DATA += ICONS

} else {
CONFIG += file_copies
COPIES += extraData
@@ -161,6 +181,16 @@ macx {
COPIES += plugins
plugins.files = $$files($$PWD/plugins/*.*)
plugins.path = $$DESTDIR/plugins

#copy fonts
COPIES += fonts
fonts.files = $$files($$PWD/fonts/*.*)
fonts.path = $$DESTDIR/fonts

#copy icons
COPIES += icons
icons.files = $$files($$PWD/icons/*.*)
icons.path = $$DESTDIR/icons
}

DISTFILES +=
@@ -63,14 +63,16 @@ int main(int argc, char *argv[])
Config config(&engine, configPath);
engine.rootContext()->setContextProperty("config", &config);

// LOADING FONTS
QFontDatabase::addApplicationFont(QStringLiteral("/usr/lib/fonts/OpenSans-Light.ttf"));
QFontDatabase::addApplicationFont(QStringLiteral("/usr/lib/fonts/OpenSans-Regular.ttf"));
QFontDatabase::addApplicationFont(QStringLiteral("/usr/lib/fonts/OpenSans-SemiBold.ttf"));
QFontDatabase::addApplicationFont(QStringLiteral("/usr/lib/fonts/OpenSans-Bold.ttf"));
// LOAD FONTS
QFontDatabase::addApplicationFont(appPath + "/fonts/OpenSans-Light.ttf");
QFontDatabase::addApplicationFont(appPath + "/fonts/OpenSans-Regular.ttf");
QFontDatabase::addApplicationFont(appPath + "/fonts/OpenSans-SemiBold.ttf");
QFontDatabase::addApplicationFont(appPath + "/fonts/OpenSans-Bold.ttf");

// LOAD ICONS
QFontDatabase::addApplicationFont(appPath + "/icons/icons.ttf");

// LOADING CUSTOM COMPONENTS
// qmlRegisterType<Integration>("Integration", 1, 0, "Integration");
qmlRegisterType<Launcher>("Launcher", 1, 0, "Launcher");
qmlRegisterType<JsonFile>("JsonFile", 1, 0, "JsonFile");
qmlRegisterType<DisplayControl>("DisplayControl", 1, 0, "DisplayControl");

0 comments on commit 77c39c8

Please sign in to comment.
You can’t perform that action at this time.