mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: error value of decrease fashion icon size
Change-Id: I76eb65a05e8260360e77314fed1f75e3e8d2191b
This commit is contained in:
parent
85f8625c48
commit
92ac6dc377
Notes:
gerrit
2018-11-12 15:04:01 +08:00
Verified+1: <jenkins@deepin.com> Verified+1: zhaofangfangdeepin <zhaofangfang@linuxdeepin.com> Code-Review+2: listenerri <listenerri@gmail.com> Submitted-by: listenerri <listenerri@gmail.com> Submitted-at: Mon, 12 Nov 2018 15:04:00 +0800 Reviewed-on: https://cr.deepin.io/39665 Project: dde/dde-dock Branch: refs/heads/master
@ -500,7 +500,13 @@ void MainPanel::adjustItemSize()
|
||||
base = h;
|
||||
}
|
||||
|
||||
const double decrease = double(overflow - base) / totalAppItemCount;
|
||||
// FIXME:
|
||||
// 时尚模式下使用整形否则会出现图标大小计算不正确的问题
|
||||
// 高校模式下使用浮点数否则会出现图标背景色连到一起的问题
|
||||
const double decrease = m_displayMode == Dock::Fashion ?
|
||||
int(overflow - base) / totalAppItemCount :
|
||||
double(overflow - base) / totalAppItemCount;
|
||||
|
||||
int extraDecrease = overflow - base - decrease * totalAppItemCount;
|
||||
|
||||
for (auto item : itemList)
|
||||
|
Loading…
x
Reference in New Issue
Block a user