Skip to content

Commit

Permalink
UI|Client: Improved sidebar layout
Browse files Browse the repository at this point in the history
Take header widget width into account when positioning groups.
  • Loading branch information
skyjake committed Jan 2, 2016
1 parent 3b7cda1 commit 5041b90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
6 changes: 6 additions & 0 deletions doomsday/apps/client/src/ui/editors/variablegroupeditor.cpp
Expand Up @@ -286,6 +286,12 @@ void VariableGroupEditor::commit()
OperatorRule::maximum(w->rule().width(), d->firstColumnWidth));
}
}
if(d->header)
{
// Make sure the editor is wide enough to fit the entire header.
d->content->rule().setInput(Rule::Width,
OperatorRule::maximum(d->layout.width(), d->header->rule().width()));
}
}

void VariableGroupEditor::fetch()
Expand Down
11 changes: 0 additions & 11 deletions doomsday/apps/client/src/ui/widgets/sidebarwidget.cpp
Expand Up @@ -84,17 +84,6 @@ SidebarWidget::SidebarWidget(String const &titleText, String const &name)

d->layout.reset(new SequentialLayout(area.left(), d->title->rule().bottom(), Down));

// Update container size.
// Now we can define the first column width.
#if 0
d->container->setContentSize(OperatorRule::maximum(d->layout->width(),
/*profLabel->rule().width() +
d->profile->rule().width() +
d->profile->button().rule().width(),*/
style().rules().rule("sidebar.width")),
title->rule().height() + d->layout->height());
#endif

d->container->rule().setSize(d->container->contentRule().width() +
d->container->margins().width(),
rule().height());
Expand Down

0 comments on commit 5041b90

Please sign in to comment.