Option for WindowHeap to not alter the layout
Bring back the DesktopGrid option to not alter window position so that the grid look like perfect screenshots of each desktop BUG:455350
This commit is contained in:
parent
3ae8e8fa6d
commit
a8d0d7f8a5
3 changed files with 20 additions and 0 deletions
|
@ -142,6 +142,11 @@
|
|||
<string>Natural</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
|
|
@ -292,6 +292,9 @@ void ExpoLayout::updatePolish()
|
|||
case LayoutNatural:
|
||||
calculateWindowTransformationsNatural();
|
||||
break;
|
||||
case LayoutNone:
|
||||
resetTransformations();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -701,3 +704,13 @@ void ExpoLayout::calculateWindowTransformationsNatural()
|
|||
cell->setHeight(rect.height());
|
||||
}
|
||||
}
|
||||
|
||||
void ExpoLayout::resetTransformations()
|
||||
{
|
||||
for (ExpoCell *cell : std::as_const(m_cells)) {
|
||||
cell->setX(cell->naturalX());
|
||||
cell->setY(cell->naturalY());
|
||||
cell->setWidth(cell->naturalWidth());
|
||||
cell->setHeight(cell->naturalHeight());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ public:
|
|||
enum LayoutMode : uint {
|
||||
LayoutClosest = 0,
|
||||
LayoutNatural = 1,
|
||||
LayoutNone = 2
|
||||
};
|
||||
Q_ENUM(LayoutMode)
|
||||
|
||||
|
@ -65,6 +66,7 @@ Q_SIGNALS:
|
|||
private:
|
||||
void calculateWindowTransformationsClosest();
|
||||
void calculateWindowTransformationsNatural();
|
||||
void resetTransformations();
|
||||
|
||||
QList<ExpoCell *> m_cells;
|
||||
LayoutMode m_mode = LayoutNatural;
|
||||
|
|
Loading…
Reference in a new issue