This commit is contained in:
zhuzichu
2023-07-27 17:46:18 +08:00
parent 4f27ff41b9
commit f531f5b138
12 changed files with 108 additions and 91 deletions

View File

@ -2,36 +2,44 @@ import QtQuick
import Qt5Compat.GraphicalEffects
import FluentUI
Item {
FluItem {
id: control
property alias color: rect.color
property alias acrylicOpacity: rect.opacity
property alias radius:bg.radius
property alias blurRadius: blur.radius
property int rectX: control.x
property int rectY: control.y
property var sourceItem: control.parent
FluRectangle{
id:bg
property color tintColor: Qt.rgba(1,1,1,1)
property real tintOpacity: 0.65
property real luminosity: 0.01
property real noiseOpacity : 0.066
property alias target : effect_source.sourceItem
property int blurRadius: 32
ShaderEffectSource {
id: effect_source
anchors.fill: parent
radius: [8,8,8,8]
ShaderEffectSource {
id: effect_source
anchors.fill: parent
sourceItem: control.sourceItem
sourceRect: Qt.rect(rectX, rectY, control.width, control.height)
Rectangle {
id: rect
anchors.fill: parent
color: "white"
opacity: 0.5
}
}
FastBlur {
id:blur
radius: 50
anchors.fill: effect_source
source: effect_source
}
visible: false
sourceRect: Qt.rect(control.x, control.y, control.width, control.height)
}
FastBlur {
id:fast_blur
anchors.fill: parent
source: effect_source
radius: control.blurRadius
}
Rectangle{
anchors.fill: parent
color: Qt.rgba(255, 255, 255, luminosity)
}
Rectangle{
anchors.fill: parent
color: Qt.rgba(tintColor.r, tintColor.g, tintColor.b, tintOpacity)
}
Image{
anchors.fill: parent
source: "../Image/noise.png"
fillMode: Image.Tile
opacity: control.noiseOpacity
}
}

View File

@ -11,6 +11,7 @@ Button{
height: 36
implicitWidth: width
implicitHeight: height
property alias colorValue: container.colorValue
background:
Rectangle{
id:layout_color

View File

@ -16,17 +16,12 @@ FluPopup {
signal negativeClicked
signal positiveClicked
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
property var minWidth: {
if(Window.window==null)
return 400
return Math.min(Window.window.width,400)
}
focus: true
implicitWidth: 400
implicitHeight: text_title.height + text_message.height + layout_actions.height
Rectangle {
id:layout_content
anchors.fill: parent
implicitWidth:minWidth
implicitHeight: text_title.height + text_message.height + layout_actions.height
color: 'transparent'
radius:5
FluText{
@ -62,7 +57,7 @@ FluPopup {
id:layout_actions
height: 68
radius: 5
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255, blurBackground ? blurOpacity - 0.4 : 1) : Qt.rgba(243/255,243/255,243/255,blurBackground ? blurOpacity - 0.4 : 1)
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
anchors{
top:text_message.bottom
left: parent.left

View File

@ -697,7 +697,7 @@ Item {
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,230/255,234/255,1)
border.width: d.isMinimal || d.isCompactAndPanel ? 1 : 0
color: {
if(d.isMinimal){
if(d.isMinimal || d.enableNavigationPanel){
return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(243/255,243/255,243/255,1)
}
return "transparent"
@ -722,20 +722,6 @@ Item {
return true
return d.isMinimalAndPanel ? true : false
}
FluAcrylic {
sourceItem:loader_content
anchors.fill: layout_list
color: {
if(d.isMinimalAndPanel || d.isCompactAndPanel){
return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(243/255,243/255,243/255,1)
}
return "transparent"
}
visible: d.isMinimalAndPanel || d.isCompactAndPanel
rectX: d.isCompactAndPanel ? (layout_list.x - 50) : layout_list.x
rectY: layout_list.y - 60
acrylicOpacity:0.9
}
Item{
id:layout_header
width: layout_list.width

View File

@ -10,11 +10,6 @@ Popup {
modal:true
anchors.centerIn: Overlay.overlay
closePolicy: Popup.CloseOnEscape
property alias blurSource: blur.sourceItem
property bool blurBackground: true
property alias blurOpacity: blur.acrylicOpacity
property alias blurRectX: blur.rectX
property alias blurRectY: blur.rectY
enter: Transition {
NumberAnimation {
properties: "scale"
@ -45,12 +40,8 @@ Popup {
to:0
}
}
background: FluAcrylic{
id:blur
color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(249/255,249/255,249/255,1)
rectX: popup.x
rectY: popup.y
acrylicOpacity:blurBackground ? 0.8 : 1
background: FluRectangle{
radius: [5,5,5,5]
color: FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(1,1,1,1)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB