fix(ui): fix frozen separator lines in filter thumbnail column - #517
Conversation
1. Set WA_TranslucentBackground on filterPreviewButton and disable autoFillBackground so the 5px margin blends with the video layer 2. Propagate transparency through this, m_scrollArea, viewport and m_scrollAreaWidget in initButtons to reach the video render layer 3. Call m_scrollAreaWidget->update() per frame in onUpdateFilterImage to re-composite the transparent layer over the latest video frame Log: Fix frozen separator lines/bands between filter thumbnails by completing the transparency chain to the video layer and re-compositing per frame Influence: Eliminates frozen separator lines without adding background fix(ui): 修复滤镜缩略图列冻结分割线/边带 1. 滤镜按钮设 WA_TranslucentBackground 并关闭 autoFillBackground, 使 5px 边距透出视频 2. initButtons 中沿 this、m_scrollArea、viewport、m_scrollAreaWidget 整链设透明并关自动填充,贯通到视频渲染层 3. onUpdateFilterImage 每帧主动 update m_scrollAreaWidget,在最新 视频帧上重新合成透明层,消除冻结分割线 Log: 贯通透明链到视频层并每帧重合成,修复滤镜缩略图间冻结分割线 PMS: BUG-169219 Influence: 消除冻结分割线且不引入底色
Reviewer's GuideMakes the filter thumbnail column truly transparent all the way to the video layer and forces it to re-composite each frame, eliminating frozen separator lines between thumbnails without introducing a background color. Sequence diagram for per-frame recompositing of transparent filter thumbnailssequenceDiagram
participant VideoRenderer
participant takePhotoSettingAreaWidget
participant m_scrollArea
participant m_scrollAreaWidget
participant filterPreviewButton
VideoRenderer->>takePhotoSettingAreaWidget: onUpdateFilterImage(QImage *img)
takePhotoSettingAreaWidget->>filterPreviewButton: setImage(QImage *tmp)
takePhotoSettingAreaWidget->>m_scrollArea: isVisible()
alt [m_scrollArea is visible]
takePhotoSettingAreaWidget->>m_scrollAreaWidget: update()
m_scrollAreaWidget->>VideoRenderer: recompose transparent filter column over latest frame
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码已为最优解,无需修改,此处展示其核心逻辑的精简等效形式以供参考
// filterpreviewbutton.cpp
filterPreviewButton::filterPreviewButton(QWidget *parent, efilterType filter) :
QPushButton(parent), m_filter(filter)
{
m_disableSelect = false;
setWindowOpacity(0.1);
setAttribute(Qt::WA_TranslucentBackground, true);
setAutoFillBackground(false);
resize(BUTTON_SIZE, BUTTON_SIZE);
}
// takephotosettingareawidget.cpp
void takePhotoSettingAreaWidget::initButtons()
{
// ...前置代码...
setAttribute(Qt::WA_TranslucentBackground, true);
m_scrollAreaWidget = new QWidget(this);
m_scrollAreaWidget->setAttribute(Qt::WA_TranslucentBackground, true);
// ...布局代码...
m_scrollArea = new QScrollArea(this);
m_scrollArea->setFrameShape(QFrame::NoFrame);
m_scrollArea->setAttribute(Qt::WA_TranslucentBackground, true);
m_scrollArea->setAutoFillBackground(false);
m_scrollArea->setWidget(m_scrollAreaWidget);
m_scrollArea->viewport()->setAutoFillBackground(false);
m_scrollArea->viewport()->setAttribute(Qt::WA_TranslucentBackground, true);
// ...后续代码...
}
void takePhotoSettingAreaWidget::onUpdateFilterImage(QImage *img)
{
// ...缩略图更新逻辑...
if (m_scrollArea && m_scrollArea->isVisible()) {
m_scrollAreaWidget->update();
}
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: F-windy, 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 |
Log: Fix frozen separator lines/bands between filter thumbnails by completing the transparency chain to the video layer and re-compositing per frame Influence: Eliminates frozen separator lines without adding background
fix(ui): 修复滤镜缩略图列冻结分割线/边带
Log: 贯通透明链到视频层并每帧重合成,修复滤镜缩略图间冻结分割线
PMS: BUG-169219
Influence: 消除冻结分割线且不引入底色
Summary by Sourcery
Resolve visual freezing of separator lines between filter thumbnails by making the thumbnail column truly transparent over the video and re-compositing it every frame.
Bug Fixes:
Enhancements: