mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 固定区与应用区图标不一致
固定区图标所设值,与应用区图标自适应后调为一致 Log: 修复缩放任务栏时,启动器图标和应用图标大小不一致问题 Bug: https://pms.uniontech.com/zentao/bug-view-35028.html
This commit is contained in:
parent
8e97f166b9
commit
7f730c867f
@ -300,6 +300,7 @@ void MainPanelControl::updateAppAreaSonWidgetSize()
|
|||||||
m_appAreaSonWidget->adjustSize();
|
m_appAreaSonWidget->adjustSize();
|
||||||
|
|
||||||
moveAppSonWidget();
|
moveAppSonWidget();
|
||||||
|
updateFixedAreaIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainPanelControl::setPositonValue(Dock::Position position)
|
void MainPanelControl::setPositonValue(Dock::Position position)
|
||||||
@ -555,7 +556,7 @@ bool MainPanelControl::eventFilter(QObject *watched, QEvent *event)
|
|||||||
if (event->type() == QEvent::LayoutRequest) {
|
if (event->type() == QEvent::LayoutRequest) {
|
||||||
m_appAreaSonWidget->adjustSize();
|
m_appAreaSonWidget->adjustSize();
|
||||||
resizeDockIcon();
|
resizeDockIcon();
|
||||||
|
updateFixedAreaIcon();
|
||||||
} else {
|
} else {
|
||||||
moveAppSonWidget();
|
moveAppSonWidget();
|
||||||
}
|
}
|
||||||
@ -1086,3 +1087,19 @@ void MainPanelControl::resizeDesktopWidget()
|
|||||||
m_desktopWidget->setFixedSize(0, 0);
|
m_desktopWidget->setFixedSize(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainPanelControl::updateFixedAreaIcon()
|
||||||
|
{
|
||||||
|
QLayoutItem *appLayoutItem = m_appAreaSonLayout->itemAt(0);
|
||||||
|
if (appLayoutItem) {
|
||||||
|
QWidget *appWidget = appLayoutItem->widget();
|
||||||
|
if (appWidget) {
|
||||||
|
int w = appWidget->width();
|
||||||
|
int h = appWidget->height();
|
||||||
|
for (int i = 0; i < m_fixedAreaLayout->count(); ++ i) {
|
||||||
|
// 取最近较小偶数, 去抖
|
||||||
|
m_fixedAreaLayout->itemAt(i)->widget()->setFixedSize((w | 1) - 1, (h | 1) - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,10 @@ private:
|
|||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
void resizeDockIcon();
|
void resizeDockIcon();
|
||||||
void calcuDockIconSize(int w, int h, PluginsItem *trashPlugin, PluginsItem *shutdownPlugin, PluginsItem *keyboardPlugin, PluginsItem *notificationPlugin);
|
void calcuDockIconSize(int w, int h, PluginsItem *trashPlugin, PluginsItem *shutdownPlugin, PluginsItem *keyboardPlugin, PluginsItem *notificationPlugin);
|
||||||
void resizeDesktopWidget();
|
void resizeDesktopWidget();
|
||||||
|
|
||||||
|
void updateFixedAreaIcon();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void insertItem(const int index, DockItem *item);
|
void insertItem(const int index, DockItem *item);
|
||||||
void removeItem(DockItem *item);
|
void removeItem(DockItem *item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user