summaryrefslogtreecommitdiff
path: root/lockscreen
diff options
authorJonas Schwabe <>2014-04-25 14:58:08 -0700
committerBrandon Schaefer <brandontschaefer@gmail.com>2014-04-25 14:58:08 -0700
commit70e31f5ce2ed70e1f3ef3853d972cc57d95adaa9 (patch)
treee8d8d88c4287098ea8c727b919da53dfe5f7eb13 /lockscreen
parent47be822ab331222346986559ba5ee9bdc6ab3ac3 (diff)
* Set the max width, so the static text wraps (and doesn't go out of the view!)
Fixes LP: #1312749 (bzr r3791.4.1)
Diffstat (limited to 'lockscreen')
-rw-r--r--lockscreen/UserPromptView.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lockscreen/UserPromptView.cpp b/lockscreen/UserPromptView.cpp
index 2e852ceff..3878baad6 100644
--- a/lockscreen/UserPromptView.cpp
+++ b/lockscreen/UserPromptView.cpp
@@ -378,10 +378,12 @@ void UserPromptView::AddPrompt(std::string const& message, bool visible, Promise
void UserPromptView::AddMessage(std::string const& message, nux::Color const& color)
{
+ nux::Geometry const& geo = GetGeometry();
auto* view = new unity::StaticCairoText("");
view->SetFont(Settings::Instance().font_name());
view->SetTextColor(color);
view->SetText(message);
+ view->SetMaximumWidth(geo.width);
msg_layout_->AddView(view);