diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-16 16:34:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-16 16:34:15 +0000 |
commit | 1a28393dabf4f4696bf433ddde52e7a25253c955 (patch) | |
tree | 4d4fa4034f30fc882a78ab6ea148a32e83b9e88c /src/ui/container.cc | |
parent | 1e0df536c2fae85c317ce9c3cc17603d5f98c911 (diff) |
various user interface related updates
Diffstat (limited to 'src/ui/container.cc')
-rw-r--r-- | src/ui/container.cc | 17 |
1 files changed, 15 insertions, 2 deletions
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()); +} + } |