Bug 270541 - Visual glitch on horizontal separators in GTK
Summary: Visual glitch on horizontal separators in GTK
Status: CLOSED FIXED
Alias: None
Product: Oxygen
Classification: Unclassified
Component: gtk2-engine (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-10 01:14 UTC by Sam Lade
Modified: 2011-07-29 23:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Lade 2011-04-10 01:14:23 UTC
Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

Compare the following two screenshots:
Good: http://img848.imageshack.us/img848/6222/oxygengtkglitchgood.png
Bad: http://img846.imageshack.us/img846/4379/oxygengtkglitch.png

There is a visual glitch just below the separator between the menu and tab bars in the bad screenshot, causing a sharp-edged patch of a slightly lighter gradient.

This glitch was introduced by commit bcd081da2f7679c4199019f0ba0e0bcb5d1741fd "Apply inner shadow hack on GtkViewport", determined by git bisect.

Reproducible: Always

Steps to Reproduce:
Open an affected application (BOINC Manager in my testing). Observe separator.

Actual Results:  
Narrow line of lighter gradient visible below separator

Expected Results:  
No gradient difference visible

oxygen-gtk from git on Kubuntu 11.04 beta, KDE 4.6.2
Comment 1 Hugo Pereira Da Costa 2011-04-10 15:41:48 UTC
mmm. Cannot reproduce here. Ruslan ? Can you ?
Comment 2 Sam Lade 2011-04-10 15:45:37 UTC
I should add that 11.04 has GTK 2.24.4.

The glitch also doesn't appear to manifest if BOINC manager loads when the system starts (i.e., I left it open when shutting down the computer). Close and reopen it and it appears, and continues to do so reliably from that point on.
Comment 3 Ruslan Kabatsayev 2011-04-10 18:02:38 UTC
Can't reproduce this on GTK 2.24.3.
Comment 4 Ruslan Kabatsayev 2011-06-10 15:48:55 UTC
Sam Lade,

Does this gradient appear if you apply this patch (it will make oxygen-gtk not draw window background, but is needed to somewhat localize the problem):

diff --git a/src/oxygenstyle.cpp b/src/oxygenstyle.cpp
index dbdf92e..8e5d81c 100644
--- a/src/oxygenstyle.cpp
+++ b/src/oxygenstyle.cpp
@@ -228,6 +228,7 @@ namespace Oxygen
         GdkRectangle* clipRect, gint x, gint y, gint w, gint h,
         const StyleOptions& options, TileSet::Tiles tiles )
     {
+        return;
 
         // define colors
         ColorUtils::Rgba base( color( Palette::Window, options ) );


? Possibly let me see the screenshot with this patch applied.
Comment 5 Sam Lade 2011-06-10 16:22:02 UTC
The glitch isn't visible with this patch applied. Here are screenshots with and without the patch:
http://img684.imageshack.us/img684/7368/boincback.png
http://img6.imageshack.us/img6/1816/boincnoback.png
Comment 6 Ruslan Kabatsayev 2011-06-10 17:09:14 UTC
OK. Could you test (on clean master) if the glitch appears with ENABLE_INNER_SHADOWS_HACK set to 0 in CMakeLists.txt?
If it doesn't, could you give output with this patch (having ENABLE_INNER_SHADOWS_HACK reverted to 1):

diff --git a/src/animations/oxygeninnershadowdata.cpp b/src/animations/oxygeninnershadowdata.cpp
index 6014657..8845051 100644
--- a/src/animations/oxygeninnershadowdata.cpp
+++ b/src/animations/oxygeninnershadowdata.cpp
@@ -19,6 +19,8 @@
 * MA 02110-1301, USA.
 */
 
+#define OXYGEN_DEBUG 1
+
 #include <gtk/gtk.h>
 #include "oxygeninnershadowdata.h"
 #include "../oxygengtkutils.h"
Comment 7 Sam Lade 2011-06-10 17:18:52 UTC
Glitch doesn't appear with INNER_SHADOWS_HACK disabled. Here's the output with the debug patch:
http://pastebin.com/bAQGtsf7
Comment 8 Ruslan Kabatsayev 2011-06-10 20:13:30 UTC
Git commit 9e29948a7e00c2bcc29d8e4f0d1066a18f2a55c6 by Ruslan Kabatsayev.
Committed on 10/06/2011 at 20:13.
Pushed by kabatsayev into branch 'master'.

Disable inner shadow hack for GtkPizza
CCBUG: 270541

M  +8    -4    src/animations/oxygeninnershadowdata.cpp     

http://commits.kde.org/oxygen-gtk/9e29948a7e00c2bcc29d8e4f0d1066a18f2a55c6
Comment 9 Ruslan Kabatsayev 2011-06-10 20:30:39 UTC
Please confirm that the above commit fixes this and close if yes.
Comment 10 Sam Lade 2011-06-10 20:31:47 UTC
Yup, that's fixed. Thanks!