mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fixed(bug2543):change bordercolor on dark theme
This commit is contained in:
parent
14dd8c25d9
commit
88bd1ecde7
@ -432,6 +432,8 @@ void MainWindow::initComponents()
|
||||
m_panelHideAni->setEasingCurve(QEasingCurve::InOutCubic);
|
||||
|
||||
QTimer::singleShot(1, this, &MainWindow::compositeChanged);
|
||||
|
||||
themeTypeChanged(DGuiApplicationHelper::instance()->themeType());
|
||||
}
|
||||
|
||||
void MainWindow::compositeChanged()
|
||||
@ -532,6 +534,7 @@ void MainWindow::initConnections()
|
||||
connect(m_mainPanel, &MainPanelControl::itemAdded, DockItemManager::instance(), &DockItemManager::itemAdded, Qt::DirectConnection);
|
||||
connect(m_dragWidget, &DragWidget::dragPointOffset, this, &MainWindow::onMainWindowSizeChanged);
|
||||
connect(m_dragWidget, &DragWidget::dragFinished, this, &MainWindow::onDragFinished);
|
||||
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &MainWindow::themeTypeChanged);
|
||||
}
|
||||
|
||||
const QPoint MainWindow::x11GetWindowPos()
|
||||
@ -979,4 +982,15 @@ void MainWindow::onDragFinished()
|
||||
setStrutPartial();
|
||||
}
|
||||
|
||||
void MainWindow::themeTypeChanged(DGuiApplicationHelper::ColorType themeType)
|
||||
{
|
||||
if (m_wmHelper->hasComposite()) {
|
||||
|
||||
if (themeType == DGuiApplicationHelper::DarkType)
|
||||
m_platformWindowHandle.setBorderColor(QColor(0, 0, 0, 255 * 0.3));
|
||||
else
|
||||
m_platformWindowHandle.setBorderColor(QColor(QColor::Invalid));
|
||||
}
|
||||
}
|
||||
|
||||
#include "mainwindow.moc"
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <DPlatformWindowHandle>
|
||||
#include <DWindowManagerHelper>
|
||||
#include <DBlurEffectWidget>
|
||||
#include <DGuiApplicationHelper>
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
@ -104,6 +105,7 @@ private slots:
|
||||
void onDbusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
|
||||
void onMainWindowSizeChanged(QPoint offset);
|
||||
void onDragFinished();
|
||||
void themeTypeChanged(DGuiApplicationHelper::ColorType themeType);
|
||||
|
||||
private:
|
||||
bool m_launched;
|
||||
|
Loading…
x
Reference in New Issue
Block a user