2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-17 14:19:43 +00:00

Add EditPeerPermissionsBox.

This commit is contained in:
John Preston
2019-01-08 14:54:18 +04:00
parent f4d52b82b4
commit eff90395b6
20 changed files with 469 additions and 142 deletions

View File

@@ -36,11 +36,13 @@ QMargins VerticalLayout::getMargins() const {
int VerticalLayout::naturalWidth() const {
auto result = 0;
for (auto &row : _rows) {
auto natural = row.widget->naturalWidth();
const auto natural = row.widget->naturalWidth();
if (natural < 0) {
return natural;
}
accumulate_max(result, natural);
accumulate_max(
result,
row.margin.left() + natural + row.margin.right());
}
return result;
}