Repository navigation
fix: create the filter preview buttons inside their scroll area - #542
liuwenhuan wants to merge 1 commit into
Conversation
1. takePhotoSettingAreaWidget::initButtons() created every filter preview button without a parent and called show()/setVisible(true) before adding it to the scroll layout. On X11 each call mapped a short-lived translucent top-level window while the main window was being built. 2. The first of these windows made Qt end the application's startup notification before the main window was mapped, so the window manager could not place the main window on the screen the camera was launched from (multi-screen: it always opened on the primary screen). 3. The buttons are now created with m_scrollAreaWidget as parent and are shown with it; show()/setVisible(true) are removed. Visibility in the layout does not change: a child that was not explicitly hidden is shown with its parent. Log: The camera window opens on the screen it was launched from. Influence: 1. Launch the camera from the dock or launcher on a second screen: the window opens on that screen. 2. Filter list: open and close it, select filters; previews show as before. fix: 滤镜预览按钮直接创建在滚动区域内 1. takePhotoSettingAreaWidget::initButtons() 创建滤镜预览按钮时没有父控件, 并在加入滚动布局之前调用 show()/setVisible(true)。X11 下每次调用都会在主 窗口构建期间映射一个短暂存在的透明顶层窗口。 2. 第一个这样的窗口让 Qt 在主窗口映射之前就结束了应用的启动通知,窗口管理 器因此无法把主窗口放到启动它的屏幕上(多屏时总是出现在主屏)。 3. 现在按钮以 m_scrollAreaWidget 为父控件创建,随父控件显示,去掉了 show()/setVisible(true)。按钮在布局中的可见性不变:未被显式隐藏的子控件会 随父控件一起显示。 Log: 相机窗口出现在启动它的屏幕上。 Influence: 1. 在第二块屏幕上从任务栏或启动器启动相机:窗口出现在该屏幕。 2. 滤镜列表:展开、收起、选择滤镜,预览与之前一致。
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: liuwenhuan 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 GuideUICreate filter preview buttons as children of the scroll area and remove the early visibility calls to avoid mapping temporary top-level windows during startup.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Hi @liuwenhuan. Thanks for your PR. 😃 |
|
Hi @liuwenhuan. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
TAG Bot New tag: 6.5.50 |
On X11,
takePhotoSettingAreaWidget::initButtons()creates every filter preview button without a parent and callsshow()/setVisible(true)before adding it to the scroll layout. Each call maps a short-lived, translucent top-level window while the main window is still being built.The first of these windows ends the application's startup notification before the main window is mapped. The window manager then has nothing to match the main window against, so it cannot place it on the screen the camera was launched from: with two screens and the dock on the second one, the camera always opened on the primary screen.
This PR creates the buttons with
m_scrollAreaWidgetas parent and removesshow()/setVisible(true). Visibility in the layout is unchanged, because a child that was not explicitly hidden is shown with its parent. The earlyshow()came in with 627a6d8 ("修改窗口最小尺寸,顺便改了滤镜布局") together with the parentless construction; I found nothing that relies on it.Tested on deepin-camera 6.5.47 with this change backported (Debian 13, KWin 6.3 X11, two screens, dock on the second screen):
xevtrace showed the startup notification removed before the main window was mapped.Not tested: the filter list, because the VM has no camera device. This PR was not built on master; the code at this place is the same as in 6.5.47.
滤镜预览按钮以前没有父控件就调用了
show(),在主窗口构建期间映射出临时的顶层窗口,导致启动通知被提前结束,多屏时相机总是开在主屏。现在直接以滚动区域为父控件创建按钮,并去掉show()/setVisible(true);按钮在布局中的可见性不变。Summary by Sourcery
Bug Fixes: