summaryrefslogtreecommitdiff
path: root/plugins
diff options
authorJason Smith <jason.smith@canonical.com>2011-10-24 12:04:55 -0400
committerJason Smith <jason.smith@canonical.com>2011-10-24 12:04:55 -0400
commit1ddbd670a890c70d687e67960878d7ae46322f6c (patch)
treeaac619fbca366c6d5ddcc8caa205d9ea042d7abb /plugins
parentb1e70a69d434fa991d17dba6d0abb6da1e69e1a4 (diff)
fix hardcoded values
(bzr r1724)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/DashView.cpp8
-rw-r--r--plugins/unityshell/src/Launcher.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/unityshell/src/DashView.cpp b/plugins/unityshell/src/DashView.cpp
index 8c1363cf3..153c20d29 100644
--- a/plugins/unityshell/src/DashView.cpp
+++ b/plugins/unityshell/src/DashView.cpp
@@ -376,8 +376,8 @@ void DashView::Draw(nux::GraphicsEngine& gfx_context, bool force_draw)
texxform_absolute_bg.flip_v_coord = false;
- texxform_absolute_bg.uoffset = (1.0f / 707) * (GetAbsoluteGeometry().x); // TODO (gord) don't use absolute values here
- texxform_absolute_bg.voffset = (1.0f / 737) * (GetAbsoluteGeometry().y);
+ texxform_absolute_bg.uoffset = (1.0f / bg_shine_texture_->GetWidth()) * (GetAbsoluteGeometry().x);
+ texxform_absolute_bg.voffset = (1.0f / bg_shine_texture_->GetHeight()) * (GetAbsoluteGeometry().y);
gfx_context.GetRenderStates().SetColorMask(true, true, true, false);
gfx_context.GetRenderStates().SetBlend(true, GL_DST_COLOR, GL_ONE);
@@ -485,8 +485,8 @@ void DashView::DrawContent(nux::GraphicsEngine& gfx_context, bool force_draw)
rop.SrcBlend = GL_DST_COLOR;
rop.DstBlend = GL_ONE;
texxform_absolute_bg.flip_v_coord = false;
- texxform_absolute_bg.uoffset = (1.0f / 707) * (GetAbsoluteGeometry().x); // TODO (gord) don't use absolute values here
- texxform_absolute_bg.voffset = (1.0f / 737) * (GetAbsoluteGeometry().y);
+ texxform_absolute_bg.uoffset = (1.0f / bg_shine_texture_->GetWidth()) * (GetAbsoluteGeometry().x);
+ texxform_absolute_bg.voffset = (1.0f / bg_shine_texture_->GetHeight()) * (GetAbsoluteGeometry().y);
nux::GetPainter().PushTextureLayer(gfx_context, bg_layer_->GetGeometry(),
bg_shine_texture_,
diff --git a/plugins/unityshell/src/Launcher.cpp b/plugins/unityshell/src/Launcher.cpp
index c04117297..da9557504 100644
--- a/plugins/unityshell/src/Launcher.cpp
+++ b/plugins/unityshell/src/Launcher.cpp
@@ -2130,7 +2130,7 @@ void Launcher::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw)
texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
texxform.SetWrap(nux::TEXWRAP_CLAMP, nux::TEXWRAP_CLAMP);
texxform.uoffset = (1.0f / launcher_sheen_->GetWidth()) * (GetAbsoluteGeometry().x); // TODO (gord) don't use absolute values here
- texxform.voffset = (1.0f / launcher_sheen_->GetWidth()) * (GetAbsoluteGeometry().y);
+ texxform.voffset = (1.0f / launcher_sheen_->GetHeight()) * (GetAbsoluteGeometry().y);
GfxContext.QRP_1Tex(base.x, base.y, base.width, base.height,
launcher_sheen_->GetDeviceTexture(),
texxform,