Skip to content

Commit

Permalink
UI|Client: Added an icon for a "Close" action
Browse files Browse the repository at this point in the history
Currently used in the Renderer Appearance editor.

Todo: Evaluate use of this elsewhere in the UI and tweak appearance.
  • Loading branch information
skyjake committed Nov 6, 2014
1 parent b949a24 commit e701599
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -31,6 +31,7 @@ group logo {
image fold { path = "graphics/fold.png" }
image gauge { path = "graphics/gauge.png" }
image gear { path = "graphics/gear.png" }
image close { path = "graphics/close.png" }
image alert { path = "graphics/alert.png" }

# Subsystems:
Expand Down
12 changes: 7 additions & 5 deletions doomsday/client/src/ui/editors/rendererappearanceeditor.cpp
Expand Up @@ -269,9 +269,9 @@ DENG2_OBSERVES(App, GameChange)
Group *partGroup;

Instance(Public *i)
: Base(i),
settings(ClientApp::renderSystem().appearanceSettings()),
firstColumnWidth(new IndirectRule)
: Base(i)
, settings(ClientApp::renderSystem().appearanceSettings())
, firstColumnWidth(new IndirectRule)
{
// The editor will close automatically when going to Ring Zero.
App::app().audienceForGameChange() += this;
Expand All @@ -286,7 +286,9 @@ DENG2_OBSERVES(App, GameChange)
container->add(close = new ButtonWidget);
container->add(profile = new ProfilePickerWidget(settings, tr("appearance")));

close->setText(tr("Close"));
// close->setText(tr("Close"));
close->setImage(style().images().image("close"));
close->setOverrideImageSize(style().fonts().font("title").height().valuei());
close->setAction(new SignalAction(thisPublic, SLOT(close())));

// Sky settings.
Expand Down Expand Up @@ -727,7 +729,7 @@ RendererAppearanceEditor::RendererAppearanceEditor()
.setInput(Rule::Left, area.left());
d->close->rule()
.setInput(Rule::Right, area.right())
.setInput(Rule::Top, area.top());
.setInput(Rule::Bottom, title->rule().bottom() - d->close->margins().bottom());

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

Expand Down

0 comments on commit e701599

Please sign in to comment.