Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/container.cc')
-rw-r--r--src/ui/container.cc17
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());
+}
+
}