Skip to content

Commit

Permalink
Fix layout
Browse files Browse the repository at this point in the history
They don't seem to like fractional units, like half the default spacing.

Fixes: #36
  • Loading branch information
lonemadmax authored and humdingerb committed Oct 30, 2024
1 parent 5675ecd commit 39ebac5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,19 @@ MainWindow::MainWindow()
fScrollView = new BScrollView("ScrollList", fListView, B_WILL_DRAW, false, true);

// Build the layout
float spacing = be_control_look->DefaultItemSpacing();

BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.AddGroup(B_HORIZONTAL, 0)
.Add(fSearchBox)
.AddStrut(spacing)
.AddStrut(B_USE_ITEM_SPACING)
.Add(fSetupButton)
.AddStrut(spacing / 2)
.AddStrut(B_USE_HALF_ITEM_SPACING)
.Add(fHelpButton)
.SetInsets(spacing / 2)
.SetInsets(B_USE_HALF_ITEM_SPACING)
.End()
.AddGroup(B_VERTICAL, 0)
.Add(fScrollView)
.SetInsets(spacing / 2, 0, spacing / 2, spacing / 2)
.SetInsets(B_USE_HALF_ITEM_SPACING, 0, B_USE_HALF_ITEM_SPACING, B_USE_HALF_ITEM_SPACING)
.End();

fSearchBox->MakeFocus(true);
Expand Down Expand Up @@ -620,4 +619,4 @@ MainWindow::_ShowFavorites()
fListView->AddItem(new MainListItem(&entry, appName, fIconHeight, true));
}
}
}
}

0 comments on commit 39ebac5

Please sign in to comment.