From 59b8c419067ae2c81eda9f0710510529aa111025 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Mon, 6 Jul 2015 23:05:49 -0400 Subject: [PATCH] border fix --- src/ui/GLPanel.cpp | 2 ++ src/ui/UITestContext.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ui/GLPanel.cpp b/src/ui/GLPanel.cpp index 4d3d943..e0d24ed 100644 --- a/src/ui/GLPanel.cpp +++ b/src/ui/GLPanel.cpp @@ -258,6 +258,8 @@ void GLPanel::calcTransform(mat4 transform_in) { } void GLPanel::draw() { + float min = -1.0, max = 1.0; + glLoadMatrixf(transform); if (fillType != GLPANEL_FILL_NONE) { diff --git a/src/ui/UITestContext.cpp b/src/ui/UITestContext.cpp index 5279d1f..8042981 100644 --- a/src/ui/UITestContext.cpp +++ b/src/ui/UITestContext.cpp @@ -12,15 +12,16 @@ PrimaryGLContext(canvas, sharedContext) { testPanel.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0)); testChildPanel.setPosition(0.0, 0.0); - testChildPanel.setMarginPx(10); + testChildPanel.setMarginPx(5); testChildPanel.setSize(1.0, 0.33); + testChildPanel.setCoordinateSystem(GLPanel::GLPANEL_Y_DOWN_ZERO_ONE); testChildPanel.setFill(GLPanel::GLPANEL_FILL_GRAD_BAR_X); testChildPanel.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0)); testChildPanel.setBorderPx(1); testChildPanel2.setPosition(0.0, -0.66); testChildPanel2.setSize(1.0, 0.33); - testChildPanel2.setMarginPx(10); + testChildPanel2.setMarginPx(5); testChildPanel2.setFill(GLPanel::GLPANEL_FILL_GRAD_X); testChildPanel2.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0)); testChildPanel2.setBorderColor(RGB(1.0,0.0,0.0)); @@ -28,7 +29,7 @@ PrimaryGLContext(canvas, sharedContext) { testChildPanel3.setPosition(0.0, 0.66); testChildPanel3.setSize(1.0, 0.33); - testChildPanel3.setMarginPx(10); + testChildPanel3.setMarginPx(5); testChildPanel3.setFill(GLPanel::GLPANEL_FILL_GRAD_X); testChildPanel3.setFillColor(RGB(0.0,0.0,1.0), RGB(0.0,1.0,0.0)); testChildPanel3.setBorderColor(RGB(1.0,0.0,0.0));