diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-04-05 15:51:07 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-04-05 15:51:07 +0900 |
commit | 05743cd2655c20b052b2f3e16c9ad2109ba77dca (patch) | |
tree | 38107978246c524763077cbe3f7b6b5cfcb955cd | |
parent | 3c5ae32f75e799758e221c91c8452ea7eb1258e5 (diff) |
-rw-r--r-- | homescreen/qml/main.qml | 2 | ||||
-rw-r--r-- | homescreen/src/main.cpp | 2 | ||||
-rw-r--r-- | homescreen/src/statusbarmodel.cpp | 10 |
3 files changed, 6 insertions, 8 deletions
diff --git a/homescreen/qml/main.qml b/homescreen/qml/main.qml index 6dace77..fdd3daa 100644 --- a/homescreen/qml/main.qml +++ b/homescreen/qml/main.qml @@ -33,7 +33,7 @@ Window { anchors.centerIn: parent width: 1080 height: 1920 - scale: 1.0 + scale: screenInfo.scale_factor() source: './images/AGL_HMI_Blue_Background_NoCar-01.png' ColumnLayout { diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp index d2568d8..a1a13e9 100644 --- a/homescreen/src/main.cpp +++ b/homescreen/src/main.cpp @@ -101,6 +101,8 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } + AGLScreenInfo screenInfo(layoutHandler->get_scale_factor()); + if (layoutHandler->requestSurface(QString("HomeScreen")) != 0) { exit(EXIT_FAILURE); } diff --git a/homescreen/src/statusbarmodel.cpp b/homescreen/src/statusbarmodel.cpp index 0c54a67..5e63b7d 100644 --- a/homescreen/src/statusbarmodel.cpp +++ b/homescreen/src/statusbarmodel.cpp @@ -17,14 +17,11 @@ #include "statusbarmodel.h" #include "statusbarserver.h" -#include <QDebug> -#include "hmi-debug.h" #include <QtDBus/QDBusConnection> #include "network.h" - class StatusBarModel::Private { public: @@ -68,7 +65,6 @@ StatusBarModel::~StatusBarModel() void StatusBarModel::init(QUrl &url, QQmlContext *context) { - HMI_DEBUG("HomeScreen", "StatusBarModel::init"); d->network = new Network(url, context); context->setContextProperty("network", d->network); @@ -81,7 +77,6 @@ void StatusBarModel::init(QUrl &url, QQmlContext *context) void StatusBarModel::setWifiStatus(bool connected, bool enabled, int strength) { - HMI_DEBUG("HomeScreen", "StatusBarModel::setWifiStatus"); if (enabled && connected) if (strength < 30) d->server.setStatusIcon(0, QStringLiteral("qrc:/images/Status/HMI_Status_Wifi_1Bar-01.png")); @@ -116,6 +111,7 @@ int StatusBarModel::rowCount(const QModelIndex &parent) const if (parent.isValid()) return 0; + // Delete bluetooth because use agl-service-bluetooth. return StatusBarServer::SupportedCount - 1; } @@ -127,9 +123,9 @@ QVariant StatusBarModel::data(const QModelIndex &index, int role) const switch (role) { case Qt::DisplayRole: - if (index.row() == 0) { + if (index.row() == 0){ ret = d->iconList[StatusBarServer::StatusWifi]; - } else if (index.row() == 1) { + }else if (index.row() == 1){ ret = d->iconList[StatusBarServer::StatusCellular]; } break; |