diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-10-05 16:18:40 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-10-05 16:18:40 +0200 |
| commit | c1425d32847cc3e46d90aa05c82498fc69a51a44 (patch) | |
| tree | 49a312a6366299a297ff951d9e9569fa79055776 /plugins/unityshell/src | |
| parent | c47551165518cd014f886fb4f670fcba992fae25 (diff) | |
UnityWindow: paint the scale glow in glPaint instead of glDraw, and also inside a window based on rounded corners
(bzr r2807.1.2)
Diffstat (limited to 'plugins/unityshell/src')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 48fcfd5d8..78dc0ab3a 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -112,7 +112,7 @@ namespace decoration const unsigned CLOSE_SIZE = 19; const unsigned ITEMS_PADDING = 5; const unsigned RADIUS = 8; -const unsigned GLOW = 20; +const unsigned GLOW = 30; const nux::Color GLOW_COLOR(221, 72, 20); } // decoration namespace } // scale namespace @@ -2459,6 +2459,15 @@ bool UnityWindow::glPaint(const GLWindowPaintAttrib& attrib, } } + if (WindowManager::Default()->IsScaleActive() && ScaleScreen::get(screen)->getSelectedWindow() == window->id()) + { + nux::Geometry scaled_geo = GetScaledGeometry(); + int inside_glow = scale::decoration::RADIUS/4; + scaled_geo.Expand(-inside_glow, -inside_glow); + glow::Quads const& quads = computeGlowQuads(scaled_geo, glow_texture_, scale::decoration::GLOW); + paintGlow(matrix, attrib, region, quads, glow_texture_, scale::decoration::GLOW_COLOR, mask); + } + return gWindow->glPaint(wAttrib, matrix, region, mask); } @@ -2520,17 +2529,6 @@ bool UnityWindow::glDraw(const GLMatrix& matrix, uScreen->paintPanelShadow(region); } - if (WindowManager::Default().IsScaleActive() && - ScaleScreen::get(screen)->getSelectedWindow() == window->id()) - { - if (!region.isEmpty()) - { - double scale = ScaleWindow::get(window)->getCurrentPosition().scale; - glow::Quads const& quads = computeGlowQuads(glow_texture_, scale::decoration::GLOW, scale); - paintGlow(matrix, attrib, region, quads, glow_texture_, scale::decoration::GLOW_COLOR, mask); - } - } - return ret; } |
