forked from openkylin/ukui-panel
fix: 修复任务栏拖拽指示器在wlcom环境下显示异常问题
This commit is contained in:
parent
0e4573b8c7
commit
fc577d2a0c
|
@ -41,12 +41,18 @@ WidgetContainerItem {
|
|||
screen: containerItem.WidgetContainer.screen
|
||||
position: Types.Bottom
|
||||
flags: Qt.Window | Qt.WindowDoesNotAcceptFocus | Qt.FramelessWindowHint
|
||||
windowType: WindowType.SystemWindow
|
||||
|
||||
property bool hideIndicator: false
|
||||
property bool isHorizontal: (position === Types.BottomCenter || position === Types.TopCenter)
|
||||
property int newPanelPos: Types.Center
|
||||
|
||||
enableBlurEffect: !hideIndicator
|
||||
|
||||
StyleBackground {
|
||||
radius: containerItem.WidgetContainer.radius
|
||||
paletteRole: Theme.BrightText
|
||||
opacity: panelPosIndicator.hideIndicator ? 0 : 1
|
||||
width: {
|
||||
if (panelPosIndicator.isHorizontal) {
|
||||
return containerItem.WidgetContainer.screen.availableGeometry.width - 6;
|
||||
|
@ -214,8 +220,11 @@ WidgetContainerItem {
|
|||
}
|
||||
|
||||
if (panelPosIndicator.newPanelPos === containerItem.WidgetContainer.position) {
|
||||
panelPosIndicator.hide();
|
||||
// TODO: wlcom环境调用hide会导致mouseArea的pressed变为false
|
||||
// panelPosIndicator.hide();
|
||||
panelPosIndicator.hideIndicator = true;
|
||||
} else {
|
||||
panelPosIndicator.hideIndicator = false;
|
||||
panelPosIndicator.show();
|
||||
panelPosIndicator.position = pos;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue