From 1a28393dabf4f4696bf433ddde52e7a25253c955 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 16 Oct 2008 16:34:15 +0000 Subject: various user interface related updates --- src/ui/container.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/ui/container.cc') diff --git a/src/ui/container.cc b/src/ui/container.cc index 5a12e8e..37fbea8 100644 --- a/src/ui/container.cc +++ b/src/ui/container.cc @@ -6,6 +6,7 @@ #include "ui/container.h" +#include "ui/paint.h" namespace ui { @@ -31,9 +32,8 @@ void Container::resize() { float w = container_childsize.width() * 1.5f; float h = children().size() * (container_childsize.height() + margin()) + container_childsize.height(); - set_size(w, h); - + const float x = container_childsize.width() * 0.25f; float y = container_childsize.height() * 0.5f; @@ -56,4 +56,17 @@ void Container::set_margin(const float margin) container_margin = margin; } +void Container::draw_border() +{ + if (!border()) + return; + + if(focus()) { + paint::color(palette()->foreground()); + } else { + paint::color(palette()->border()); + } + paint::border(global_location(), size()); +} + } -- cgit v1.2.3