Skip to content

Commit

Permalink
libappfw|LabelWidget: Content size available as rules
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 7, 2014
1 parent 4e1f63f commit 94817cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/libappfw/include/de/widgets/labelwidget.h
Expand Up @@ -101,6 +101,9 @@ class LIBAPPFW_PUBLIC LabelWidget : public GuiWidget, public AssetGroup
*/
Vector2ui textSize() const;

Rule const &contentWidth() const;
Rule const &contentHeight() const;

/**
* Sets the gap between the text and image. Defaults to "label.gap".
*
Expand Down
10 changes: 10 additions & 0 deletions doomsday/libappfw/src/widgets/labelwidget.cpp
Expand Up @@ -601,6 +601,16 @@ Vector2ui LabelWidget::textSize() const
return d->textSize();
}

Rule const &LabelWidget::contentWidth() const
{
return *d->width;
}

Rule const &LabelWidget::contentHeight() const
{
return *d->height;
}

void LabelWidget::setTextGap(DotPath const &styleRuleId)
{
d->gapId = styleRuleId;
Expand Down

0 comments on commit 94817cb

Please sign in to comment.