summaryrefslogtreecommitdiff
path: root/src/layout/algorithm/FloatingAlgorithm.cpp
blob: 058887bf0a6cfd89a9ac2e027ab8eb4e00efe8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "FloatingAlgorithm.hpp"
#include "Algorithm.hpp"
#include "../space/Space.hpp"

using namespace Layout;

void IFloatingAlgorithm::recalculate() {
    ;
}

void IFloatingAlgorithm::recenter(SP<ITarget> t) {
    const auto LAST = t->lastFloatingSize();

    if (LAST.x <= 5 || LAST.y <= 5)
        return;

    t->setPositionGlobal({m_parent->space()->workArea().middle() - LAST / 2.F, LAST});
}