From f47c7f522892f502fe8880de45b77ce401a6cb29 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Tue, 25 Dec 2018 15:47:20 +0900 Subject: change icon size --- app/images/blank.svg | 252 +++++++++++++++++++++++-------------------- app/pages/DImage.qml | 38 +++++++ app/pages/DetailPage.qml | 19 +--- app/pages/ListPage.qml | 19 +--- app/pages/ManagementPage.qml | 19 +--- app/resources.qrc | 1 + app/src/config.h | 7 +- 7 files changed, 190 insertions(+), 165 deletions(-) create mode 100644 app/pages/DImage.qml diff --git a/app/images/blank.svg b/app/images/blank.svg index 10c0a89..d5e3472 100644 --- a/app/images/blank.svg +++ b/app/images/blank.svg @@ -1,133 +1,151 @@ - + image/svg+xml + + + + + + + + + + + + + + + \ No newline at end of file + inkscape:window-width="1615" + inkscape:window-height="917" + inkscape:window-x="65" + inkscape:window-y="24" + inkscape:window-maximized="1" + units="px" + showguides="true" + inkscape:guide-bbox="true"> + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/app/pages/DImage.qml b/app/pages/DImage.qml new file mode 100644 index 0000000..a727be7 --- /dev/null +++ b/app/pages/DImage.qml @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2018 The Qt Company Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import QtQuick 2.6 +import QtQuick.Controls 2.0 + +Image { + id: imageicon + property string icon: "" + property string name: "" + + anchors.fill: parent + source: icon != ""?icon : 'qrc:/images/blank.svg' + property string initial: name.substring(0,1).toUpperCase() + + Label { + style: Text.Outline + styleColor: "#66FF99" + color: 'transparent' + font.pixelSize: parent.height * 0.4 + anchors.centerIn: parent + text: parent.initial + visible: icon == "" + } +} diff --git a/app/pages/DetailPage.qml b/app/pages/DetailPage.qml index 45e5202..c1eca33 100644 --- a/app/pages/DetailPage.qml +++ b/app/pages/DetailPage.qml @@ -57,21 +57,10 @@ import QtQuick.Controls 2.0 Layout.preferredWidth: 200 Layout.preferredHeight: 200 - Image { - id: imageicon - anchors.fill: parent - source: model.icon != ""?model.icon : 'qrc:/images/blank.svg' - property string initial: model.name.substring(0,1).toUpperCase() - - Label { - style: Text.Outline - styleColor: "#00ADDC" - color: 'transparent' - font.pixelSize: parent.height * 0.5 - anchors.centerIn: parent - text: parent.initial - visible: model.icon == "" - } + DImage { + id: imageicon + icon: model.icon + name: model.name } } diff --git a/app/pages/ListPage.qml b/app/pages/ListPage.qml index c9116d4..a25535e 100644 --- a/app/pages/ListPage.qml +++ b/app/pages/ListPage.qml @@ -77,21 +77,10 @@ Page { } } - Image { - id: imageicon - anchors.fill: parent - source: model.icon != ""?model.icon : 'qrc:/images/blank.svg' - property string initial: model.name.substring(0,1).toUpperCase() - - Label { - style: Text.Outline - styleColor: "#00ADDC" - color: 'transparent' - font.pixelSize: parent.height * 0.5 - anchors.centerIn: parent - text: parent.initial - visible: model.icon == "" - } + DImage { + id: imageicon + icon: model.icon + name: model.name } } diff --git a/app/pages/ManagementPage.qml b/app/pages/ManagementPage.qml index e445c63..b622706 100644 --- a/app/pages/ManagementPage.qml +++ b/app/pages/ManagementPage.qml @@ -48,21 +48,10 @@ Page { Layout.preferredWidth: 100 Layout.preferredHeight: 100 - Image { - id: imageicon - anchors.fill: parent - source: model.icon != ""?'file://' + model.icon : 'qrc:/images/blank.svg' - property string initial: model.name.substring(0,1).toUpperCase() - - Label { - style: Text.Outline - styleColor: "#00ADDC" - color: 'transparent' - font.pixelSize: parent.height * 0.5 - anchors.centerIn: parent - text: parent.initial - visible: model.icon == "" - } + DImage { + id: imageicon + icon: model.icon != ""?'file://' + model.icon : '' + name: model.name } } ColumnLayout { diff --git a/app/resources.qrc b/app/resources.qrc index bcf707b..3a0aaa8 100644 --- a/app/resources.qrc +++ b/app/resources.qrc @@ -6,5 +6,6 @@ pages/ManagementPage.qml pages/DownloadBar.qml pages/DetailPage.qml + pages/DImage.qml \ No newline at end of file diff --git a/app/src/config.h b/app/src/config.h index e3aefc1..1196872 100644 --- a/app/src/config.h +++ b/app/src/config.h @@ -19,12 +19,13 @@ // server url config //#define SERVER_DOMAIN_IP "192.168.20.161" -#define SERVER_DOMAIN_IP "202.7.19.45" +//#define SERVER_DOMAIN_IP "202.7.19.45" +#define SERVER_DOMAIN_IP "warehouse.tmc-tokai.jp" //#define SERVER_DOMAIN "192.168.20.161/webservice" -#define SERVER_DOMAIN "202.7.19.45/webservice" +//#define SERVER_DOMAIN "202.7.19.45/webservice" +#define SERVER_DOMAIN "warehouse.tmc-tokai.jp/webservice" -//#define SERVER_DOMAIN "warehouse.tmc-tokai.jp/webservice" #define SERVER_BASE_URL "/api/v1/app" #define SERVER_API_LIST "/collection" -- cgit 1.2.3-korg