From b1ebb7a97e144745ed10bffaf1a4900b7b6055fc Mon Sep 17 00:00:00 2001 From: mashiros <490328928@qq.com> Date: Sun, 26 Jun 2022 22:08:10 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=96=B0=E5=A2=9E=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E6=8C=89=E9=92=AE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Locales/zh.qm | Bin 3705 -> 3667 bytes Locales/zh.ts | 151 +++++++++++++++++++++++++------------------------ package.json | 2 +- qml/WeatherWidget.qml | 12 +++- qml/WidgetTemplate.qml | 2 + 5 files changed, 91 insertions(+), 76 deletions(-) diff --git a/Locales/zh.qm b/Locales/zh.qm index 90b9aa206cbff5b317387fb1ee6a834cd5f852ad..5e7711254ebb2de89936a10542572bb8c29e459a 100644 GIT binary patch delta 584 zcmXAmT}YEr7{{OYyyxRR`_LrBMiTaAs|%4q6eGQmKrlALND4xz+-wzF;6w(&8&PBv zMVXG_MMBU`hD9^Vy6FQitdL|kQ4*8{DiK0mB%$`Fb8+}_&iOz8=WDIHR6VrAT_T>} zLu7q7lmjGYIFa`nwam^CQN1C1M$u_T4vs|aL(Rz2SL1zhoT9>#=O-1A^{!$pTdZ}yhPN5uQMA%Fs&`!dIF zz~GVZh1Csi8uFB(C++(f#wx6!As_W`?}A?M^M9+GMaKuq_W#9dcx~D7ooGNlEw7zg zK%V;vjIr57dKTv?2R{O!b7@{Ij=`1A%PsH;>3ki YZ%yl!bRw0kY3fPmUgzN@^&= zHdTCEHGMY`uzJXiieHD)sH^j zrYwEV?8q8z;H2Aij5fvan>Z%5JLU-UynP;|D6((B?qhvrwQ%-d_Uym;E@ s<7}UecC_Aondr6u%|{=vy|pq~VU?vHSWNuyenN%Q4|Sh($ diff --git a/Locales/zh.ts b/Locales/zh.ts index 8ca81a5..9b2aaf0 100644 --- a/Locales/zh.ts +++ b/Locales/zh.ts @@ -5,47 +5,47 @@ BottomUI + Ordinal Scale Bottom UI widget 序列之争底部UI挂件 - - + + Settings 设置 - UI Settings - UI设置 + UI设置 - + Configuration 配置项 - + Curve 曲线 - + Line Color 线条颜色 - + Line Width 线宽 - + Shadow Color 阴影颜色 - + Shadow Size 阴影大小 @@ -54,122 +54,122 @@ TopUI + Ordinal Scale Top UI widget 序列之争顶部UI挂件 - + Light 细体 - + Normal 常规 - + Bold 粗体 - - + + Settings 设置 - UI Settings - UI设置 + UI设置 - + Configuration 设置项 - + Circle Color 中心圆颜色 - + Line Color 线条颜色 - + Top Line Action 顶部UI动作 - + Command 命令 - + Toggle UI 切换UI - + Curve 曲线 - + Line Width 线宽 - + Shadow Color 阴影颜色 - + Shadow Size 阴影大小 - + Battle UI 战斗UI - + Clock Visible 显示时间 - + 24 Hour Clock 24小时制 - + Font Color 字体颜色 - + Font Size 字体大小 - + Font Style 字体样式 - + Font Weight 字体粗细 - + Text Vertical Offset 文字垂直偏移 @@ -178,29 +178,29 @@ WeatherWidget + Ordinal Scale Weather Widget Weather Widget 序列之争天气挂件 - + Light 细体 - + Normal 常规 - + Bold 粗体 - - - + + Settings 设置 @@ -209,12 +209,12 @@ 刷新 - + Configuration 配置项 - + Location 位置 @@ -223,120 +223,125 @@ 按地址、经纬度搜索地址。 - + Click to set location. 点击设置位置。 - + Search: country, city, district... 输入:国家、城市或街道名字... - + Location not found 未找到相关地点 - + Display Location 显示地址 - + The location to display in widget. 在挂件中显示的位置。 - + Update Interval 更新间隔 - - + + Minutes 分钟 - - + + Hours 小时 - + Unit 单位 - + + Show Option Buton + 显示选项按钮 + + + Background Color 背景颜色 - + Background Opacity 背景不透明度 - + Area Opacity Difference 区域不透明度差异 - + Icon Color 图标颜色 - + Temperature Text Settings 温度文字设置 - - + + Font Color 字体颜色 - - + + Font Size 字体大小 - - + + Font Style 字体样式 - - + + Font Weight 字体粗细 - - + + X Offset X偏移量 - - + + Y Offset Y偏移量 - + Area Text Settings 地区文字设置 - + Border Margin 边距 diff --git a/package.json b/package.json index 18f20e1..2f8675e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "top.mashiros.widget.ordinalscale", - "version": "1.1.3", + "version": "1.1.4", "title": { "en": "Ordinal Scale Widgets Collection", diff --git a/qml/WeatherWidget.qml b/qml/WeatherWidget.qml index 5a81e75..db13d6b 100644 --- a/qml/WeatherWidget.qml +++ b/qml/WeatherWidget.qml @@ -19,7 +19,7 @@ WidgetTemplate { title: qsTr("Ordinal Scale Weather Widget") editing: styleDialog.active - version: "1.0.0" + version: "1.0.1" defaultValues: { "Display Location": "", "Update Interval": @@ -27,6 +27,7 @@ WidgetTemplate { "Value": 1, "Unit": 1 }, + "Show Option Buton": true, "Background Color": "#ffa502", "Background Opacity": 60, "Area Opacity Difference": 17, @@ -104,6 +105,7 @@ WidgetTemplate { Shape { anchors.fill: parent + visible: configs["Show Option Buton"] ShapePath { strokeWidth: parent.height/120 strokeColor: configs["Icon Color"] @@ -131,7 +133,7 @@ WidgetTemplate { MouseArea { anchors.fill: parent - enabled: !styleDialog.active + enabled: !styleDialog.active && configs["Show Option Buton"] onClicked: { styleDialog.active = true; } @@ -419,6 +421,12 @@ WidgetTemplate { } } + P.SwitchPreference { + name: "Show Option Buton" + label: qsTr("Show Option Buton") + defaultValue: defaultValues["Show Option Buton"] + } + P.ColorPreference { name: "Background Color" label: qsTr("Background Color") diff --git a/qml/WidgetTemplate.qml b/qml/WidgetTemplate.qml index 8fb82a0..22e1d5f 100644 --- a/qml/WidgetTemplate.qml +++ b/qml/WidgetTemplate.qml @@ -18,6 +18,8 @@ T.Widget { for (let prop in sourceObj) { if (sourceObj.hasOwnProperty(prop) && sourceObj[prop] !== undefined) { if (typeof sourceObj[prop] === 'object') { + if (targetObj[prop] === undefined) + targetObj[prop] = {}; Object.assign(targetObj[prop], sourceObj[prop]); } else { targetObj[prop] = sourceObj[prop];