Bug 306631 - oxygen-transparent: 1-2 pixels mismatch for blur mask
Summary: oxygen-transparent: 1-2 pixels mismatch for blur mask
Alias: None
Product: Oxygen
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
Depends on:
Reported: 2012-09-11 19:51 UTC by Ruslan Kabatsayev
Modified: 2013-11-25 16:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:

Screenshot (164.10 KB, image/png)
2012-09-11 20:02 UTC, Ruslan Kabatsayev
Screenshot for compact mode (6.96 KB, image/png)
2013-11-18 14:27 UTC, Yichao Yu

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan Kabatsayev 2012-09-11 19:51:12 UTC
See this screenshot: http://6g6.eu/sih0-screenshot-09112012-113948-pm.png
There's a 1px line without blur under dolphin directory contents widget.

Reproducible: Always

Steps to Reproduce:
1. Set some good transparency ratio in oxygen-transparent, e.g. 0.5
2. Make sure window background is blurred
3. Open some image with high frequency components, e.g. text
4. In Dolphin, open a directory with few enough files, so that horizontal scrollbar doesn't appear
5. Move dolphin window so that bottom of icon view is above the text as in screenshot
6. Observe a line lacking blur
Comment 1 Myriam Schweingruber 2012-09-11 19:58:52 UTC
Which exact KDE version is this about? Also please attach the image to the bug report, please do not use external storage facilities
Comment 2 Ruslan Kabatsayev 2012-09-11 20:02:53 UTC
Created attachment 73839 [details]

Here's the screenshot.
As for KDE version, oxygen-transparent isn't official part of KDE, thus I don't think the version is applicable. Anyway, I can reproduce this in both 4.8.2 and 4.9.00.
Comment 3 Hugo Pereira Da Costa 2012-09-11 20:07:00 UTC
yes. Can reproduce.
since it does not happen with other types of QScrollArea's (right ? like e.g. in KSysGuard), this is likely related to dolphins (hacked) QGraphicsView, used for the file view ... Maybe some margins that are not properly accounted for in oxygen-transparent. Quick fix would be to reduce all "flat" regions tagged by oxygen transparent by 1 pixel around border. I'll see if I can find a somewhat better solution ... 

PS: Ruslan: I'm not forgetting oxygen-gtk. We still have one crash and one 100% CPU to fix. I'll try give it a shot before next release, due some time this week (after having skipped the august release :)).
Comment 4 Ruslan Kabatsayev 2012-09-11 20:10:59 UTC
Hi Hugo. Yes, it doesn't happen with KSysGuard.
As you can reproduce, setting back to NEW.
Comment 5 Hugo Pereira Da Costa 2012-09-11 20:28:02 UTC
... adding peter in CC.

Peter: the way blur "clipping" is done is by removing the rect() of widgets that are tagged opaque from the area to be blurred. Here, my best guess is that its the GraphicsView viewport ... Any chance that it would have a rect that is 1 pixel too large with respect to its actual painted area ? 


Comment 6 Hugo Pereira Da Costa 2012-09-11 20:29:48 UTC
Git commit 6733dba740f612742fbc4dbc5b9edb975ac23ba8 by Hugo Pereira Da Costa.
Committed on 11/09/2012 at 22:29.
Pushed by hpereiradacosta into branch 'master'.

add 1 pixel margin before removing "blur" region.
quickFix. Will try find something better.

M  +1    -1    style/oxygenblurhelper.cpp

Comment 7 Hugo Pereira Da Costa 2012-09-11 20:30:38 UTC
Ruslan: that's the quick fix. 
I'll try something better.
In fact there are other similar bugs around. Will investigate some more ...
Comment 8 Yichao Yu 2013-11-16 21:49:04 UTC
Can you have a look if this[1] is related? I am running into this issue in QtCurve (actually the opposite way). Since it seems that Oxygen has a 0/-2 spacing, resulting in a content rect larger than the visible region in Dolphin, I am wondering if this can be related.

[1] https://git.reviewboard.kde.org/r/113902/
Comment 9 Yichao Yu 2013-11-18 14:04:19 UTC
I can confirm the problem after reverting your oxygen quick fix and can also confirm that the problem is fixed with my dolphin patch.
Comment 10 Hugo Pereira Da Costa 2013-11-18 14:16:25 UTC
Thanks for all the checks. So do I get it right that once your dolphin patch is pushed (I hope it will)
I can remove my quick fix, and close this bug ?
Comment 11 Yichao Yu 2013-11-18 14:21:05 UTC
I think so. (Although it would be nice if you can test and confirm that it indeed fixes the problem).
The patch has already passed the review. I'm just waiting for someone who has an KDE git account to push it....
Comment 12 Yichao Yu 2013-11-18 14:27:48 UTC
Created attachment 83620 [details]
Screenshot for compact mode
Comment 13 Yichao Yu 2013-11-18 14:36:01 UTC
Sorry.... wrong bug report.....
Comment 14 Frank Reininghaus 2013-11-18 22:44:25 UTC
Git commit 39e7ba46e87a49b574f45e2f13b0f61ff8a32fd3 by Frank Reininghaus, on behalf of Yichao Yu.
Committed on 18/11/2013 at 22:40.
Pushed by freininghaus into branch 'KDE/4.11'.

Fix scrollbar spacing when no scrollbar is visible in dolphin.

Before this commit, Dolphin reserved space for the scrollbar spacing
even when no scrollbar is visible resulting in a ugly gap in the view

1. the theme uses QStyle::SH_ScrollView_FrameOnlyAroundContents and
2. the theme has a positive PM_ScrollView_ScrollBarSpacing.

QtCurve can have both while Oxygen have 1 but not 2.
To reproduce the problem with Oxygen style. Replace the
`width += ....` (which returns -2 or 0 for Oxygen) with `width += 2`.

See more info here:
FIXED-IN: 4.11.4
REVIEW: 113902

M  +4    -3    dolphin/src/kitemviews/kitemlistcontainer.cpp

Comment 15 Hugo Pereira Da Costa 2013-11-25 14:42:52 UTC
Git commit f5a3d2e5932eaf3ab245703612060a8265666e33 by Hugo Pereira Da Costa.
Committed on 25/11/2013 at 14:27.
Pushed by hpereiradacosta into branch 'master'.

Removed hack on blur region rect, added to bypass dolpĥin's bug.

M  +2    -6    style/oxygenblurhelper.cpp

Comment 16 Hugo Pereira Da Costa 2013-11-25 16:36:07 UTC
Will be fixed in dolphin (if not already)
I reverted the hack