From 162cff831f5643ac26ee5dd039253d109a0072d1 Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Mon, 20 Jul 2026 10:19:34 +0800 Subject: [PATCH] fix(exposureslider): always set focus after slider animation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the isShortCut condition check so the exposure slider always gains keyboard focus after fade-in animation completes. 移除isShortCut条件判断,使曝光滑块在淡入动画结束后 始终获得键盘焦点。 Log: 修复曝光滑块动画结束后无法获得焦点的问题 PMS: BUG-350117 Influence: 修复后曝光滑块在所有触发方式下均可正确获取焦点,用户可通过方向键调整曝光值。 --- src/src/exposureslider.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/src/exposureslider.cpp b/src/src/exposureslider.cpp index 470baee6..30e465af 100644 --- a/src/src/exposureslider.cpp +++ b/src/src/exposureslider.cpp @@ -1,5 +1,5 @@ -// Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co.,Ltd. -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// Copyright (C) 2020 - 2026 Uniontech Software Technology Co.,Ltd. +// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -118,10 +118,7 @@ void ExposureSlider::showContent(bool show, bool isShortCut) connect(pGroup, &QParallelAnimationGroup::finished, this, [=](){ qDebug() << "Animation finished, handling cleanup"; - if (isShortCut) { //键盘触发,需在此处理焦点 - qDebug() << "Setting focus to slider after shortcut activation"; - m_slider->slider()->setFocus(); - } + m_slider->slider()->setFocus(); pGroup->deleteLater(); });