Improve acrylic effect for example and FluNavigationview.
parent
a44d2cfe64
commit
f998b58d88
|
@ -45,9 +45,20 @@ FluWindow {
|
||||||
setHitTestVisible(title_bar.closeButton())
|
setHitTestVisible(title_bar.closeButton())
|
||||||
framless_helper.setWindowFixedSize(fixSize)
|
framless_helper.setWindowFixedSize(fixSize)
|
||||||
title_bar.maximizeButton.visible = !fixSize
|
title_bar.maximizeButton.visible = !fixSize
|
||||||
|
if (blurBehindWindowEnabled)
|
||||||
|
window.backgroundOpacity = 0.8
|
||||||
window.visible = true
|
window.visible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Connections{
|
||||||
|
target: FluTheme
|
||||||
|
function onDarkChanged(){
|
||||||
|
if (FluTheme.dark)
|
||||||
|
FramelessUtils.systemTheme = FramelessHelperConstants.Dark
|
||||||
|
else
|
||||||
|
FramelessUtils.systemTheme = FramelessHelperConstants.Light
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setHitTestVisible(com){
|
function setHitTestVisible(com){
|
||||||
framless_helper.setHitTestVisible(com)
|
framless_helper.setHitTestVisible(com)
|
||||||
|
|
|
@ -75,10 +75,10 @@ FluScrollablePage{
|
||||||
FluAcrylic {
|
FluAcrylic {
|
||||||
sourceItem:bg
|
sourceItem:bg
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: FluTheme.dark ? 'black' : 'white'
|
color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||||
rectX: list.x-list.contentX+10+(control.width)*index
|
rectX: list.x-list.contentX+10+(control.width)*index
|
||||||
rectY: list.y+10
|
rectY: list.y+10
|
||||||
acrylicOpacity:0.5
|
acrylicOpacity:0.8
|
||||||
}
|
}
|
||||||
Rectangle{
|
Rectangle{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -22,6 +22,9 @@ FRAMELESSHELPER_USE_NAMESPACE
|
||||||
QGuiApplication::setApplicationName("FluentUI");
|
QGuiApplication::setApplicationName("FluentUI");
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
FramelessConfig::instance()->set(Global::Option::ForceHideWindowFrameBorder);
|
FramelessConfig::instance()->set(Global::Option::ForceHideWindowFrameBorder);
|
||||||
|
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
||||||
|
FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial);
|
||||||
|
FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow);
|
||||||
AppInfo* appInfo = new AppInfo();
|
AppInfo* appInfo = new AppInfo();
|
||||||
IPC ipc(0);
|
IPC ipc(0);
|
||||||
QString activeWindowEvent = "activeWindow";
|
QString activeWindowEvent = "activeWindow";
|
||||||
|
|
|
@ -590,6 +590,7 @@ Item {
|
||||||
d.enableNavigationPanel = false
|
d.enableNavigationPanel = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id:layout_list
|
id:layout_list
|
||||||
width: {
|
width: {
|
||||||
|
@ -620,10 +621,10 @@ Item {
|
||||||
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,230/255,234/255,1)
|
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
|
border.width: d.isMinimal || d.isCompactAndPanel ? 1 : 0
|
||||||
color: {
|
color: {
|
||||||
if(d.isMinimal || d.isCompactAndPanel){
|
if(d.isMinimal){
|
||||||
return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||||
}
|
}
|
||||||
return "#00000000"
|
return "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
x: {
|
x: {
|
||||||
|
@ -631,6 +632,20 @@ Item {
|
||||||
return 0
|
return 0
|
||||||
return d.isMinimalAndPanel ? 0 : -width
|
return d.isMinimalAndPanel ? 0 : -width
|
||||||
}
|
}
|
||||||
|
FluAcrylic {
|
||||||
|
sourceItem:nav_swipe
|
||||||
|
anchors.fill: layout_list
|
||||||
|
color: {
|
||||||
|
if(d.isMinimal){
|
||||||
|
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.isMinimal
|
||||||
|
rectX: layout_list.x
|
||||||
|
rectY: layout_list.y - 60
|
||||||
|
acrylicOpacity:0.9
|
||||||
|
}
|
||||||
Item{
|
Item{
|
||||||
id:layout_header
|
id:layout_header
|
||||||
width: layout_list.width
|
width: layout_list.width
|
||||||
|
|
|
@ -30,6 +30,7 @@ Window {
|
||||||
}
|
}
|
||||||
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||||
}
|
}
|
||||||
|
property alias backgroundOpacity: bg.opacity
|
||||||
signal initArgument(var argument)
|
signal initArgument(var argument)
|
||||||
id:window
|
id:window
|
||||||
color:"transparent"
|
color:"transparent"
|
||||||
|
@ -39,6 +40,7 @@ Window {
|
||||||
initArgument(argument)
|
initArgument(argument)
|
||||||
}
|
}
|
||||||
Rectangle{
|
Rectangle{
|
||||||
|
id: bg
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: backgroundColor
|
color: backgroundColor
|
||||||
Behavior on color{
|
Behavior on color{
|
||||||
|
|
Loading…
Reference in New Issue