mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 19:20:59 +08:00
Merge pull request #123 from mentalfl0w/dev
Add acrylic effect for FluContentDialog.
This commit is contained in:
commit
b02695c012
@ -69,6 +69,7 @@ CustomWindow {
|
|||||||
}
|
}
|
||||||
positiveText:"退出"
|
positiveText:"退出"
|
||||||
neutralText:"取消"
|
neutralText:"取消"
|
||||||
|
blurSource: nav_view
|
||||||
onPositiveClicked:{
|
onPositiveClicked:{
|
||||||
window.deleteWindow()
|
window.deleteWindow()
|
||||||
FluApp.closeApp()
|
FluApp.closeApp()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
@ -11,6 +11,8 @@ Popup {
|
|||||||
property string neutralText: "Neutral"
|
property string neutralText: "Neutral"
|
||||||
property string negativeText: "Negative"
|
property string negativeText: "Negative"
|
||||||
property string positiveText: "Positive"
|
property string positiveText: "Positive"
|
||||||
|
property alias blurSource: blur.sourceItem
|
||||||
|
property bool blurBackground: true
|
||||||
signal neutralClicked
|
signal neutralClicked
|
||||||
signal negativeClicked
|
signal negativeClicked
|
||||||
signal positiveClicked
|
signal positiveClicked
|
||||||
@ -50,14 +52,27 @@ Popup {
|
|||||||
easing.bezierCurve: [ 1, 0, 0, 0 ]
|
easing.bezierCurve: [ 1, 0, 0, 0 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contentItem: Rectangle {
|
contentItem:
|
||||||
|
Rectangle {
|
||||||
id:layout_content
|
id:layout_content
|
||||||
|
anchors.fill: parent
|
||||||
implicitWidth:minWidth
|
implicitWidth:minWidth
|
||||||
implicitHeight: text_title.height + text_message.height + layout_actions.height
|
implicitHeight: text_title.height + text_message.height + layout_actions.height
|
||||||
|
color: 'transparent'
|
||||||
|
radius:5
|
||||||
|
FluAcrylic{
|
||||||
|
id:blur
|
||||||
|
anchors{
|
||||||
|
top:parent.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: layout_actions.bottom
|
||||||
|
}
|
||||||
|
height: parent.height
|
||||||
color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(249/255,249/255,249/255,1)
|
color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(249/255,249/255,249/255,1)
|
||||||
radius:5
|
rectX: popup.x
|
||||||
FluShadow{
|
rectY: popup.y
|
||||||
radius: 5
|
acrylicOpacity:blurBackground ? 0.8 : 1
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
id:text_title
|
id:text_title
|
||||||
@ -92,7 +107,7 @@ Popup {
|
|||||||
id:layout_actions
|
id:layout_actions
|
||||||
height: 68
|
height: 68
|
||||||
radius: 5
|
radius: 5
|
||||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255, blurBackground ? blur.acrylicOpacity - 0.4 : 1) : Qt.rgba(243/255,243/255,243/255,blurBackground ? blur.acrylicOpacity - 0.4 : 1)
|
||||||
anchors{
|
anchors{
|
||||||
top:text_message.bottom
|
top:text_message.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
Loading…
Reference in New Issue
Block a user