Repository navigation
fix: use DSuggestButton for encryption page confirm button - #438
Draft
GongHeng2017 wants to merge 1 commit into
Draft
GongHeng2017 wants to merge 1 commit into
GongHeng2017 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR aligns the encrypted PDF password page’s confirm button with the standard blue suggest-button styling and enforces a 305-pixel minimum page height so the lock icon and layout remain visible at the minimum window size, while preserving existing password interaction behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
GongHeng2017
marked this pull request as draft
October 29, 2026 20:42
1. Root cause: EncryptionPage used DPushButton (plain gray style) for the confirm button, inconsistent with design spec requiring DSuggestButton (blue accent style); layout minimum height (305px) exceeded available DocSheet height at minimum window size (300px), causing the lock icon top to be clipped 2. Fix: replace DPushButton with DSuggestButton for m_nextbutton, add #include <DSuggestButton>, sync signal type in connect call; add setMinimumHeight(305) to prevent layout overflow 3. Impact: only affects encryption page UI; DSuggestButton inherits DPushButton so API is fully compatible; minimum height constraint is local to EncryptionPage and does not affect other pages Log: fix encryption page button style and lock icon clipping Influence: 1. Test encrypted PDF password input page button appears as blue suggest button style 2. Test lock icon fully visible at minimum window size (680x300) 3. Verify password input and confirm button interaction works fix: 修复加密页面确定按钮样式及锁图标截断问题 1. 根因:EncryptionPage 使用 DPushButton(灰色普通样式)作为确定 按钮,与设计图要求的 DSuggestButton(蓝色强调样式)不符;布局 最小高度(305px)超过最小窗口尺寸(300px)下 DocSheet 可用高度, 导致锁图标顶部被截断 2. 方案:将 m_nextbutton 从 DPushButton 替换为 DSuggestButton, 补充 #include <DSuggestButton>,同步 connect 信号类型; 添加 setMinimumHeight(305) 防止布局溢出 3. 影响:仅影响加密页面 UI;DSuggestButton 继承 DPushButton, API 完全兼容;最小高度约束仅作用于 EncryptionPage,不影响其他页面 Log: 修复加密页面按钮样式及锁图标截断问题 Influence: 1. 测试加密 PDF 密码输入页面的确定按钮显示为蓝色推荐按钮样式 2. 测试最小窗口尺寸(680x300)下锁图标完整可见 3. 验证密码输入与确定按钮交互功能正常 Bug: #193241 PMS: BUG-193241
GongHeng2017
force-pushed
the
agent/agent/cae939535591
branch
from
October 29, 2026 21:09
8582070 to
cf19717
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root Cause Analysis
The encryption page (
EncryptionPage) usedDPushButton(plain gray style) for the confirm button instead ofDSuggestButton(blue accent style), inconsistent with the design spec used elsewhere in the project (e.g.,CentralNavPage.cpp:45). Additionally, the encryption page layout minimum height (305px) exceeded the availableDocSheetheight at minimum window size (MainWindow.cpp:639setssetMinimumSize(680, 300)), causing the lock icon top to be clipped by the title bar. Key evidence:EncryptionPage.cpp:51createsDPushButton; layout height calculation shows 305px minimum vs. 260-270px available.Fix Approach
Replace
DPushButtonwithDSuggestButtonform_nextbutton, add#include <DSuggestButton>, and sync theconnectsignal type from&DPushButton::clickedto&DSuggestButton::clicked. AddsetMinimumHeight(305)toEncryptionPage::InitUI()to prevent layout overflow. This matches the analysis report fix suggestion (section 10) with no deviation.MainWindow.cpp:639setMinimumSizeis not modified per review decision.Change Safety Assessment
Code Safety
DSuggestButtoninheritsDPushButton, sosetEnabled/setDisabled/clickedare fully compatible — no API behavior changeEncryptionPage.cpp:49-57, layout60-77) have been unchanged since 2020; this change does not revert any historical bug fixDSuggestButtoninCentralNavPage.cpp:45, confirming dependency availabilityBusiness Impact Scope
Affected module: Encrypted PDF password input page — the UI shown when a user opens an encrypted PDF. Caller:
DocSheet.cpp:1877(showEncryPage),DocSheet.cpp:1698-1700(resizeEventsets EncryptionPage geometry). User scenarios: opening an encrypted PDF, entering password, clicking confirm button.Verification Suggestion
Verify the confirm button on the encrypted PDF password page displays as blue suggest-button style. Verify the lock icon is fully visible at minimum window size (680×300). Verify password input and confirm button interaction (enable/disable/submit) works correctly.
根因分析
加密页面(
EncryptionPage)使用DPushButton(灰色普通样式)作为确定按钮,而非设计规范要求的DSuggestButton(蓝色强调样式),与项目中其他页面(如CentralNavPage.cpp:45)不一致。此外,加密页面布局最小高度(305px)超过最小窗口尺寸(MainWindow.cpp:639设置setMinimumSize(680, 300))下DocSheet可用高度,导致锁图标顶部被标题栏截断。关键证据:EncryptionPage.cpp:51创建DPushButton;布局高度计算 305px vs 可用 260-270px。修复方案
将
m_nextbutton从DPushButton替换为DSuggestButton,补充#include <DSuggestButton>,同步connect信号类型从&DPushButton::clicked到&DSuggestButton::clicked。在EncryptionPage::InitUI()中添加setMinimumHeight(305)防止布局溢出。与分析报告修复建议(第十节)一致,无偏离。MainWindow.cpp:639的setMinimumSize未修改(按复核裁决)。改动安全评估
代码安全评估
DSuggestButton继承DPushButton,setEnabled/setDisabled/clicked完全兼容,无 API 行为变化EncryptionPage.cpp:49-57,布局60-77)自 2020 年未修改,本次改动不撤销任何历史修复CentralNavPage.cpp:45已使用DSuggestButton,依赖已满足业务影响范围
受影响模块:加密 PDF 密码输入页面 — 用户打开加密 PDF 时显示的交互界面。调用者:
DocSheet.cpp:1877(showEncryPage)、DocSheet.cpp:1698-1700(resizeEvent设置 EncryptionPage geometry)。用户场景:打开加密 PDF、输入密码、点击确定按钮。验证建议
验证加密 PDF 密码输入页面的确定按钮显示为蓝色推荐按钮样式。验证最小窗口尺寸(680×300)下锁图标完整可见。验证密码输入与确定按钮交互功能正常。
Summary by Sourcery
Fix the encrypted PDF password page styling and sizing to match the intended design and remain fully visible at minimum window dimensions.
Bug Fixes:
Chores: