Browse Source

- 新增隐藏选项按钮选项

master
mashiros 2 years ago
parent
commit
b1ebb7a97e
  1. BIN
      Locales/zh.qm
  2. 151
      Locales/zh.ts
  3. 2
      package.json
  4. 12
      qml/WeatherWidget.qml
  5. 2
      qml/WidgetTemplate.qml

BIN
Locales/zh.qm

Binary file not shown.

151
Locales/zh.ts

@ -5,47 +5,47 @@
<name>BottomUI</name>
<message>
<location filename="qml/BottomUI.qml" line="12"/>
<location filename="qml/BottomUI.qml" line="126"/>
<source>Ordinal Scale Bottom UI widget</source>
<translation>UI挂件</translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="104"/>
<location filename="qml/BottomUI.qml" line="114"/>
<location filename="qml/BottomUI.qml" line="100"/>
<location filename="qml/BottomUI.qml" line="110"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="130"/>
<source>UI Settings</source>
<translation>UI设置</translation>
<translation type="vanished">UI设置</translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="171"/>
<location filename="qml/BottomUI.qml" line="167"/>
<source>Configuration</source>
<translation></translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="179"/>
<location filename="qml/BottomUI.qml" line="175"/>
<source>Curve</source>
<translation>线</translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="185"/>
<location filename="qml/BottomUI.qml" line="181"/>
<source>Line Color</source>
<translation>线</translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="191"/>
<location filename="qml/BottomUI.qml" line="187"/>
<source>Line Width</source>
<translation>线</translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="201"/>
<location filename="qml/BottomUI.qml" line="197"/>
<source>Shadow Color</source>
<translation></translation>
</message>
<message>
<location filename="qml/BottomUI.qml" line="207"/>
<location filename="qml/BottomUI.qml" line="203"/>
<source>Shadow Size</source>
<translation></translation>
</message>
@ -54,122 +54,122 @@
<name>TopUI</name>
<message>
<location filename="qml/TopUI.qml" line="12"/>
<location filename="qml/TopUI.qml" line="372"/>
<source>Ordinal Scale Top UI widget</source>
<translation>UI挂件</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="54"/>
<location filename="qml/TopUI.qml" line="50"/>
<source>Light</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="54"/>
<location filename="qml/TopUI.qml" line="50"/>
<source>Normal</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="54"/>
<location filename="qml/TopUI.qml" line="50"/>
<source>Bold</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="350"/>
<location filename="qml/TopUI.qml" line="360"/>
<location filename="qml/TopUI.qml" line="346"/>
<location filename="qml/TopUI.qml" line="356"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="376"/>
<source>UI Settings</source>
<translation>UI设置</translation>
<translation type="vanished">UI设置</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="415"/>
<location filename="qml/TopUI.qml" line="411"/>
<source>Configuration</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="470"/>
<location filename="qml/TopUI.qml" line="466"/>
<source>Circle Color</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="429"/>
<location filename="qml/TopUI.qml" line="425"/>
<source>Line Color</source>
<translation>线</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="64"/>
<location filename="qml/TopUI.qml" line="60"/>
<source>Top Line Action</source>
<translation>UI动作</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="79"/>
<location filename="qml/TopUI.qml" line="75"/>
<source>Command</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="80"/>
<location filename="qml/TopUI.qml" line="76"/>
<source>Toggle UI</source>
<translation>UI</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="423"/>
<location filename="qml/TopUI.qml" line="419"/>
<source>Curve</source>
<translation>线</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="435"/>
<location filename="qml/TopUI.qml" line="431"/>
<source>Line Width</source>
<translation>线</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="445"/>
<location filename="qml/TopUI.qml" line="441"/>
<source>Shadow Color</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="451"/>
<location filename="qml/TopUI.qml" line="447"/>
<source>Shadow Size</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="464"/>
<location filename="qml/TopUI.qml" line="460"/>
<source>Battle UI</source>
<translation>UI</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="480"/>
<location filename="qml/TopUI.qml" line="476"/>
<source>Clock Visible</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="488"/>
<location filename="qml/TopUI.qml" line="484"/>
<source>24 Hour Clock</source>
<translation>24</translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="496"/>
<location filename="qml/TopUI.qml" line="492"/>
<source>Font Color</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="504"/>
<location filename="qml/TopUI.qml" line="500"/>
<source>Font Size</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="516"/>
<location filename="qml/TopUI.qml" line="512"/>
<source>Font Style</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="526"/>
<location filename="qml/TopUI.qml" line="522"/>
<source>Font Weight</source>
<translation></translation>
</message>
<message>
<location filename="qml/TopUI.qml" line="536"/>
<location filename="qml/TopUI.qml" line="532"/>
<source>Text Vertical Offset</source>
<translation></translation>
</message>
@ -178,29 +178,29 @@
<name>WeatherWidget</name>
<message>
<location filename="qml/WeatherWidget.qml" line="19"/>
<location filename="qml/WeatherWidget.qml" line="246"/>
<source>Ordinal Scale Weather Widget</source>
<oldsource>Weather Widget</oldsource>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="60"/>
<location filename="qml/WeatherWidget.qml" line="61"/>
<source>Light</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="60"/>
<location filename="qml/WeatherWidget.qml" line="61"/>
<source>Normal</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="60"/>
<location filename="qml/WeatherWidget.qml" line="61"/>
<source>Bold</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="219"/>
<location filename="qml/WeatherWidget.qml" line="229"/>
<location filename="qml/WeatherWidget.qml" line="244"/>
<location filename="qml/WeatherWidget.qml" line="221"/>
<location filename="qml/WeatherWidget.qml" line="231"/>
<source>Settings</source>
<translation></translation>
</message>
@ -209,12 +209,12 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="283"/>
<location filename="qml/WeatherWidget.qml" line="285"/>
<source>Configuration</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="291"/>
<location filename="qml/WeatherWidget.qml" line="293"/>
<source>Location</source>
<translation></translation>
</message>
@ -223,120 +223,125 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="294"/>
<location filename="qml/WeatherWidget.qml" line="296"/>
<source>Click to set location.</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="338"/>
<location filename="qml/WeatherWidget.qml" line="340"/>
<source>Search: country, city, district...</source>
<translation>...</translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="365"/>
<location filename="qml/WeatherWidget.qml" line="367"/>
<source>Location not found</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="393"/>
<location filename="qml/WeatherWidget.qml" line="395"/>
<source>Display Location</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="394"/>
<location filename="qml/WeatherWidget.qml" line="396"/>
<source>The location to display in widget.</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="400"/>
<location filename="qml/WeatherWidget.qml" line="402"/>
<source>Update Interval</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="402"/>
<location filename="qml/WeatherWidget.qml" line="418"/>
<location filename="qml/WeatherWidget.qml" line="404"/>
<location filename="qml/WeatherWidget.qml" line="420"/>
<source>Minutes</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="402"/>
<location filename="qml/WeatherWidget.qml" line="418"/>
<location filename="qml/WeatherWidget.qml" line="404"/>
<location filename="qml/WeatherWidget.qml" line="420"/>
<source>Hours</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="416"/>
<location filename="qml/WeatherWidget.qml" line="418"/>
<source>Unit</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="424"/>
<location filename="qml/WeatherWidget.qml" line="426"/>
<source>Show Option Buton</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="432"/>
<source>Background Color</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="430"/>
<location filename="qml/WeatherWidget.qml" line="438"/>
<source>Background Opacity</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="440"/>
<location filename="qml/WeatherWidget.qml" line="448"/>
<source>Area Opacity Difference</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="450"/>
<location filename="qml/WeatherWidget.qml" line="458"/>
<source>Icon Color</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="458"/>
<location filename="qml/WeatherWidget.qml" line="466"/>
<source>Temperature Text Settings</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="464"/>
<location filename="qml/WeatherWidget.qml" line="521"/>
<location filename="qml/WeatherWidget.qml" line="472"/>
<location filename="qml/WeatherWidget.qml" line="529"/>
<source>Font Color</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="470"/>
<location filename="qml/WeatherWidget.qml" line="527"/>
<location filename="qml/WeatherWidget.qml" line="478"/>
<location filename="qml/WeatherWidget.qml" line="535"/>
<source>Font Size</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="480"/>
<location filename="qml/WeatherWidget.qml" line="537"/>
<location filename="qml/WeatherWidget.qml" line="488"/>
<location filename="qml/WeatherWidget.qml" line="545"/>
<source>Font Style</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="487"/>
<location filename="qml/WeatherWidget.qml" line="544"/>
<location filename="qml/WeatherWidget.qml" line="495"/>
<location filename="qml/WeatherWidget.qml" line="552"/>
<source>Font Weight</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="494"/>
<location filename="qml/WeatherWidget.qml" line="551"/>
<location filename="qml/WeatherWidget.qml" line="502"/>
<location filename="qml/WeatherWidget.qml" line="559"/>
<source>X Offset</source>
<translation>X偏移量</translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="504"/>
<location filename="qml/WeatherWidget.qml" line="561"/>
<location filename="qml/WeatherWidget.qml" line="512"/>
<location filename="qml/WeatherWidget.qml" line="569"/>
<source>Y Offset</source>
<translation>Y偏移量</translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="515"/>
<location filename="qml/WeatherWidget.qml" line="523"/>
<source>Area Text Settings</source>
<translation></translation>
</message>
<message>
<location filename="qml/WeatherWidget.qml" line="571"/>
<location filename="qml/WeatherWidget.qml" line="579"/>
<source>Border Margin</source>
<translation></translation>
</message>

2
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",

12
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")

2
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];

Loading…
Cancel
Save