summaryrefslogtreecommitdiff
path: root/src/interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/Label.cpp8
-rw-r--r--src/interface/Label.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp
index d4bd82e..e19b6b8 100644
--- a/src/interface/Label.cpp
+++ b/src/interface/Label.cpp
@@ -59,6 +59,14 @@ void Label::SetText(std::string text)
}
}
+void Label::AutoHeight()
+{
+ bool oldAH = autoHeight;
+ autoHeight = true;
+ updateMultiline();
+ autoHeight = oldAH;
+}
+
void Label::updateMultiline()
{
int lines = 1;
diff --git a/src/interface/Label.h b/src/interface/Label.h
index f701580..f5fa1a7 100644
--- a/src/interface/Label.h
+++ b/src/interface/Label.h
@@ -55,6 +55,7 @@ namespace ui
virtual bool HasSelection();
virtual void ClearSelection();
+ virtual void AutoHeight();
void SetTextColour(Colour textColour) { this->textColour = textColour; }