mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 修复任务栏在特效模式下的UI
1、在特效模式下,固定区域、应用区域和托盘区域的分割线是不可见的,因此在绘制颜色的时候判断其是否可见 2、调整关机按钮同时显示文字的最小高度 3、特效模式下任务栏中间扣出来的部分透明 Log: Influence: 任务栏-特效模式,查看左侧的线条是否可见 Bug: https://pms.uniontech.com/bug-view-134527.html Bug: https://pms.uniontech.com/bug-view-134489.html Change-Id: I4ee89702fb409293b8652d6aa71c50a2dd18a7ee
This commit is contained in:
parent
2461310ba2
commit
461ece4bd7
@ -1089,9 +1089,14 @@ void MainPanelControl::paintEvent(QPaintEvent *event)
|
||||
painter.setOpacity(0.1);
|
||||
}
|
||||
|
||||
painter.fillRect(m_fixedSpliter->geometry(), color);
|
||||
painter.fillRect(m_appSpliter->geometry(), color);
|
||||
painter.fillRect(m_traySpliter->geometry(), color);
|
||||
if (m_fixedSpliter->isVisible())
|
||||
painter.fillRect(m_fixedSpliter->geometry(), color);
|
||||
|
||||
if (m_appSpliter->isVisible())
|
||||
painter.fillRect(m_appSpliter->geometry(), color);
|
||||
|
||||
if (m_traySpliter->isVisible())
|
||||
painter.fillRect(m_traySpliter->geometry(), color);
|
||||
}
|
||||
|
||||
// 获取当前屏幕的高或者宽(任务栏上下的时候获取宽,左右获取高)
|
||||
|
@ -117,8 +117,8 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
DPlatformWindowHandle::enableDXcbForWindow(this, true);
|
||||
m_platformWindowHandle.setEnableBlurWindow(true);
|
||||
m_platformWindowHandle.setTranslucentBackground(true);
|
||||
m_platformWindowHandle.setShadowOffset(QPoint(0, 5));
|
||||
m_platformWindowHandle.setShadowColor(QColor(0, 0, 0, 0.3 * 255));
|
||||
m_platformWindowHandle.setShadowOffset(QPoint(0, 0));
|
||||
m_platformWindowHandle.setShadowColor(Qt::transparent);
|
||||
|
||||
m_mainPanel->setDisplayMode(m_multiScreenWorker->displayMode());
|
||||
|
||||
@ -260,11 +260,6 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
||||
return DBlurEffectWidget::resizeEvent(event);
|
||||
}
|
||||
|
||||
void MainWindow::dragEnterEvent(QDragEnterEvent *e)
|
||||
{
|
||||
QWidget::dragEnterEvent(e);
|
||||
}
|
||||
|
||||
void MainWindow::initMember()
|
||||
{
|
||||
//INFO 这里要大于动画的300ms,否则可能动画过程中这个定时器就被触发了
|
||||
@ -411,11 +406,12 @@ void MainWindow::onDbusNameOwnerChanged(const QString &name, const QString &oldO
|
||||
*/
|
||||
void MainWindow::setEffectEnabled(const bool enabled)
|
||||
{
|
||||
Q_UNUSED(enabled);
|
||||
|
||||
setMaskColor(AutoColor);
|
||||
|
||||
setMaskAlpha(m_multiScreenWorker->opacity());
|
||||
|
||||
m_platformWindowHandle.setBorderWidth(enabled ? 1 : 0);
|
||||
m_platformWindowHandle.setBorderWidth(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -179,7 +179,6 @@ private:
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void enterEvent(QEvent *e) override;
|
||||
void dragEnterEvent(QDragEnterEvent *e) override;
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
void moveEvent(QMoveEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
@ -227,8 +227,9 @@ QFont StretchPluginsItem::textFont() const
|
||||
|
||||
bool StretchPluginsItem::needShowText() const
|
||||
{
|
||||
// 任务栏在上方或者下方显示的时候,根据设计图,只有在当前区域高度大于50的时候才同时显示文本和图标
|
||||
if (m_position == Dock::Position::Top || m_position == Dock::Position::Bottom)
|
||||
return height() > (ICONSIZE + QFontMetrics(textFont()).height() + ICONTEXTSPACE);
|
||||
return height() >= 50;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user