Skip to content

Commit

Permalink
Tests|libappfw: Added a test button
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent bf1fea5 commit cbd4283
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doomsday/tests/test_appfw/src/mainwindow.cpp
Expand Up @@ -21,6 +21,7 @@
#include "approotwidget.h"
#include "globalshortcuts.h"

#include <de/ButtonWidget>
#include <de/CommandLine>
#include <de/CompositorWidget>
#include <de/GLState>
Expand Down Expand Up @@ -113,6 +114,14 @@ DE_PIMPL(MainWindow)
.setSize(label->rule().width(), label->rule().height());
compositor->add(label2);

ButtonWidget *button = new ButtonWidget;
button->setSizePolicy(ui::Expand, ui::Expand);
button->setText("Press Me");
button->rule()
.setMidAnchorX(test->rule().midX())
.setInput(Rule::Bottom, test->rule().bottom());
compositor->add(button);

// Mouse cursor.
cursor = new LabelWidget;
cursor->setBehavior(Widget::Unhittable);
Expand Down

0 comments on commit cbd4283

Please sign in to comment.