mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix window ratio error
Change-Id: I9ed42bbc30f34a249ebb63adbd376f8f06210382
This commit is contained in:
parent
c2d027b7dd
commit
e09abc3888
Notes:
Deepin Code Review
2017-09-15 17:13:51 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Fri, 15 Sep 2017 17:13:50 +0800 Reviewed-on: https://cr.deepin.io/26340 Project: dde/dde-dock Branch: refs/heads/master
@ -376,8 +376,9 @@ void DockSettings::resetFrontendGeometry()
|
||||
void DockSettings::calculateWindowConfig()
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
const int defaultHeight = AppItem::itemBaseHeight();
|
||||
const int defaultWidth = AppItem::itemBaseWidth();
|
||||
const auto ratio = qApp->devicePixelRatio();
|
||||
const int defaultHeight = AppItem::itemBaseHeight() / ratio;
|
||||
const int defaultWidth = AppItem::itemBaseWidth() / ratio;
|
||||
|
||||
if (m_displayMode == Dock::Efficient)
|
||||
{
|
||||
@ -401,22 +402,6 @@ void DockSettings::calculateWindowConfig()
|
||||
}
|
||||
else if (m_displayMode == Dock::Fashion)
|
||||
{
|
||||
// int perfectWidth = 0;
|
||||
// int perfectHeight = 0;
|
||||
// const QList<DockItem *> itemList = m_itemController->itemList();
|
||||
// for (auto item : itemList)
|
||||
// {
|
||||
// switch (item->itemType())
|
||||
// {
|
||||
// case DockItem::Launcher:
|
||||
// case DockItem::App: perfectWidth += defaultWidth;
|
||||
// perfectHeight += defaultHeight; break;
|
||||
// case DockItem::Plugins: perfectWidth += item->sizeHint().width();
|
||||
// perfectHeight += item->sizeHint().height(); break;
|
||||
// default:;
|
||||
// }
|
||||
// }
|
||||
|
||||
int visibleItemCount = 0;
|
||||
const QList<DockItem *> itemList = m_itemController->itemList();
|
||||
for (auto item : itemList)
|
||||
|
Loading…
x
Reference in New Issue
Block a user