fix(keyboard): 缩略图面板 viewport 焦点被重置导致键盘翻页失效#285
Conversation
log: - SideBarImageListView: 给 viewport 设置 objectName,避免 setObjectNoFocusPolicy 将其重置为 NoFocus,使点击缩略图后 Up/Down/PageUp/PageDown 键盘事件正确由列表视图处理而非穿透到文档视图 pms: bug-362813
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 diff --git a/reader/sidebar/SideBarImageListview.cpp b/reader/sidebar/SideBarImageListview.cpp
index 8040d84d..7af1f7b3 100644
--- a/reader/sidebar/SideBarImageListview.cpp
+++ b/reader/sidebar/SideBarImageListview.cpp
@@ -28,6 +28,7 @@ SideBarImageListView::SideBarImageListView(DocSheet *sheet, QWidget *parent)
setSpacing(4);
setObjectName("sideBarImageListView");
setFocusPolicy(Qt::ClickFocus);
+ viewport()->setObjectName("sideBarImageListViewViewport");
setFrameShape(QFrame::NoFrame);
setSelectionMode(QAbstractItemView::SingleSelection);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: JWWTSL, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
log:
pms: bug-362813