From a7d37e0b99e1e26626a34b69670e6dbb6569a048 Mon Sep 17 00:00:00 2001 From: wangguixi Date: Sun, 9 Oct 2022 11:12:07 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=B7=BB=E5=8A=A0=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E9=98=B4=E5=BD=B1=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Time.qml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ data/time/time.qml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ main.qml | 2 +- 3 files changed, 101 insertions(+), 1 deletion(-) diff --git a/Time.qml b/Time.qml index 9c941cd..92f634b 100644 --- a/Time.qml +++ b/Time.qml @@ -2,6 +2,7 @@ import QtQuick 2.0 import QtQml 2.12 import QtQuick.Layouts 1.12 import org.ukui.appwidget 1.0 +import QtGraphicalEffects 1.0 //import QtQuick.Controls 2.0 AppWidget { id:appwidget @@ -108,6 +109,13 @@ AppWidget { font.pixelSize:112 font.letterSpacing: 0 font.family: "STxihei" + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } Rectangle { @@ -140,6 +148,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } RowLayout { Text { @@ -149,6 +164,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } Text { id: date1 @@ -157,6 +179,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } } @@ -187,6 +216,13 @@ AppWidget { font.pixelSize:112 font.letterSpacing:0 font.family: "STxihei" + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } Rectangle { @@ -218,6 +254,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } Text { id: date2 @@ -226,6 +269,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } } diff --git a/data/time/time.qml b/data/time/time.qml index 9c941cd..92f634b 100644 --- a/data/time/time.qml +++ b/data/time/time.qml @@ -2,6 +2,7 @@ import QtQuick 2.0 import QtQml 2.12 import QtQuick.Layouts 1.12 import org.ukui.appwidget 1.0 +import QtGraphicalEffects 1.0 //import QtQuick.Controls 2.0 AppWidget { id:appwidget @@ -108,6 +109,13 @@ AppWidget { font.pixelSize:112 font.letterSpacing: 0 font.family: "STxihei" + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } Rectangle { @@ -140,6 +148,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } RowLayout { Text { @@ -149,6 +164,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } Text { id: date1 @@ -157,6 +179,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } } @@ -187,6 +216,13 @@ AppWidget { font.pixelSize:112 font.letterSpacing:0 font.family: "STxihei" + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } Rectangle { @@ -218,6 +254,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } Text { id: date2 @@ -226,6 +269,13 @@ AppWidget { font.letterSpacing: 0 font.family: "STxihei" verticalAlignment: TextInput.AlignVCenter + + layer.enabled: true + layer.effect: DropShadow { + verticalOffset: 1 + color: "#40262626" + samples: 4 + } } } } diff --git a/main.qml b/main.qml index afd1e26..4d1210b 100644 --- a/main.qml +++ b/main.qml @@ -5,7 +5,7 @@ Window { visible: true width: 640 height: 480 - color: "black" + color: "transparent" title: qsTr("Hello World")