Skip to content

Commit

Permalink
libappfw|Widgets: Color theme in dialog widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jan 10, 2017
1 parent 8310385 commit ac0821f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/sdk/libappfw/include/de/widgets/popupwidget.h
Expand Up @@ -101,6 +101,8 @@ class LIBAPPFW_PUBLIC PopupWidget : public PanelWidget

void setColorTheme(ColorTheme theme);

ColorTheme colorTheme() const;

void enableCloseButton(bool enable);

/**
Expand Down
1 change: 1 addition & 0 deletions doomsday/sdk/libappfw/src/widgets/dialogwidget.cpp
Expand Up @@ -318,6 +318,7 @@ DENG_GUI_PIMPL(DialogWidget)
if (ButtonItem const *i = item.maybeAs<ButtonItem>())
{
ButtonWidget &but = widget.as<ButtonWidget>();
but.setColorTheme(self().colorTheme());
if (!i->action())
{
if (i->role() & (Accept | Yes))
Expand Down
5 changes: 5 additions & 0 deletions doomsday/sdk/libappfw/src/widgets/popupwidget.cpp
Expand Up @@ -321,6 +321,11 @@ void PopupWidget::setColorTheme(ColorTheme theme)
d->updateStyle();
}

GuiWidget::ColorTheme PopupWidget::colorTheme() const
{
return d->colorTheme;
}

void PopupWidget::enableCloseButton(bool enable)
{
if (enable && !d->close)
Expand Down

0 comments on commit ac0821f

Please sign in to comment.