add:添加文本阴影效果

This commit is contained in:
wangguixi 2022-10-09 11:12:07 +08:00 committed by yan wang
parent 3b5ce8593f
commit a7d37e0b99
3 changed files with 101 additions and 1 deletions

View File

@ -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
}
}
}
}

View File

@ -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
}
}
}
}

View File

@ -5,7 +5,7 @@ Window {
visible: true
width: 640
height: 480
color: "black"
color: "transparent"
title: qsTr("Hello World")