From 06212c7d8dc20b11f49d54e42f8299740f90a231 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 9 Nov 2008 17:44:24 +0000 Subject: improved client notifications, minor bugfixes --- src/client/notifications.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client/notifications.cc') diff --git a/src/client/notifications.cc b/src/client/notifications.cc index 256f110..25cbe0b 100644 --- a/src/client/notifications.cc +++ b/src/client/notifications.cc @@ -6,6 +6,7 @@ #include "client/notifications.h" #include "core/application.h" +#include "ui/ui.h" namespace client { @@ -20,6 +21,7 @@ Notifications::Notifications(ui::Widget *parent) : ui::Widget(parent) notify_scrollpane = new ui::ScrollPane(this, notify_log); notify_scrollpane->set_border(false); + notify_scrollpane->set_alignment(ui::AlignTop); } Notifications::~Notifications() @@ -54,13 +56,14 @@ void Notifications::draw() t = notify_timestamp.begin(); } - const float margin = 8.0f; + const float margin = ui::UI::elementmargin; math::Vector2f s(size()); s.x -= margin*2; s.y -= margin*2; notify_scrollpane->set_location(margin, margin); notify_scrollpane->set_size(s.x, s.y ); + } -- cgit v1.2.3