mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 16:43:55 -07:00
Run formatter on all our files (#6942)
This commit is contained in:
parent
b3c89167c5
commit
1d5d3f2d38
19 changed files with 153 additions and 81 deletions
|
|
@ -70,8 +70,9 @@ bool FlowLayout::hasHeightForWidth() const
|
|||
*/
|
||||
int FlowLayout::heightForWidth(const int width) const
|
||||
{
|
||||
if (flowDirection != Qt::Horizontal)
|
||||
if (flowDirection != Qt::Horizontal) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int totalHeight = 0;
|
||||
int rowUsedWidth = 0;
|
||||
|
|
@ -181,8 +182,9 @@ int FlowLayout::layoutAllRows(const int originX, const int originY, const int av
|
|||
*/
|
||||
void FlowLayout::layoutSingleRow(const QVector<QLayoutItem *> &rowItems, int x, const int y, const int availableWidth)
|
||||
{
|
||||
if (rowItems.isEmpty())
|
||||
if (rowItems.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ── Pass 1: measure fixed width and count expanding items ────────────────
|
||||
int fixedWidth = 0;
|
||||
|
|
@ -211,12 +213,14 @@ void FlowLayout::layoutSingleRow(const QVector<QLayoutItem *> &rowItems, int x,
|
|||
|
||||
// ── Pass 2: place items ──────────────────────────────────────────────────
|
||||
for (QLayoutItem *item : rowItems) {
|
||||
if (!item || item->isEmpty())
|
||||
if (!item || item->isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QWidget *widget = item->widget();
|
||||
if (!widget)
|
||||
if (!widget) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const QSizePolicy::Policy hPolicy = widget->sizePolicy().horizontalPolicy();
|
||||
const QSize maxSize = widget->maximumSize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue