Skip to content

Commit e9f7925

Browse files
wjyrichdeepin-bot[bot]
authored andcommitted
fix: improve window transition and drag visibility
1. Changed QTimer delay from 1ms to 100ms in setCurrentFrameToWindowedFrame to prevent visual glitches during window transition 2. Added drag-and-drop visibility check in ItemBackground.qml to hide background during drag operations 3. The timer adjustment ensures smoother frame switching by allowing proper UI updates 4. The drag visibility change prevents visual artifacts when dragging items over buttons fix: 改进窗口切换和拖拽可见性 1. 将setCurrentFrameToWindowedFrame中的QTimer延迟从1ms改为100ms,防止窗 口切换时的视觉故障 2. 在ItemBackground.qml中添加拖拽操作可见性检查,在拖拽期间隐藏背景 3. 定时器调整通过允许适当的UI更新来确保更平滑的帧切换 4. 拖拽可见性更改防止了在按钮上拖动项目时的视觉伪影 Pms: BUG-323633
1 parent d83db2c commit e9f7925

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

launchercontroller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void LauncherController::showHelp()
207207
void LauncherController::setCurrentFrameToWindowedFrame()
208208
{
209209
setVisible(false);
210-
QTimer::singleShot(1, this, [this]() {
210+
QTimer::singleShot(100, this, [this]() {
211211
setCurrentFrame("WindowedFrame");
212212
setVisible(true);
213213
});

qml/windowed/ItemBackground.qml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ D.BoxPanel {
1919
color2: selectValue(background, DS.Style.checkedButton.background, DS.Style.highlightedButton.background2)
2020
insideBorderColor: null
2121
outsideBorderColor: null
22-
visible: button.checked || button.highlighted || button.visualFocus || control.D.ColorSelector.controlState === D.DTK.PressedState || control.D.ColorSelector.controlState === D.DTK.HoveredState
22+
visible: {
23+
// 检查是否有正在进行的拖拽操作
24+
if (typeof dndItem !== "undefined" && dndItem.currentlyDraggedId !== "") {
25+
return false
26+
}
27+
return button.checked || button.highlighted || button.visualFocus || control.D.ColorSelector.controlState === D.DTK.PressedState || control.D.ColorSelector.controlState === D.DTK.HoveredState
28+
}
2329

2430
function selectValue(normal, checked, highlighted) {
2531
if (button.checked) {

0 commit comments

Comments
 (0)