After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640465 - border color seems to affect fill for .dash-search-button {}
border color seems to affect fill for .dash-search-button {}
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 641839 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-24 20:22 UTC by Jakub Steiner
Modified: 2011-02-16 01:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
blue buttons, even though the should be semi-opaque white (417.34 KB, image/png)
2011-01-24 20:22 UTC, Jakub Steiner
  Details
tests: show off translucent gradients (1.70 KB, patch)
2011-01-24 21:39 UTC, Ray Strode [halfline]
committed Details | Review
StThemeNodeDrawing: Ignore border fill in interior (1.38 KB, patch)
2011-01-24 21:39 UTC, Ray Strode [halfline]
committed Details | Review
StThemeNodeDrawing: fill background behind translucent gradients (2.00 KB, patch)
2011-01-24 21:39 UTC, Ray Strode [halfline]
committed Details | Review
Revert "StThemeNodeDrawing: fill background behind translucent gradients" (2.16 KB, patch)
2011-02-15 22:50 UTC, Ray Strode [halfline]
committed Details | Review
StThemeNodeDrawing: clear out node interior before filling pattern (4.29 KB, patch)
2011-02-15 22:50 UTC, Ray Strode [halfline]
committed Details | Review

Description Jakub Steiner 2011-01-24 20:22:36 UTC
Created attachment 179220 [details]
blue buttons, even though the should be semi-opaque white

I was going to tweak the shading for the search buttons but found out the border color seems to affect the fill on those buttons:

diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 65aaaf2..92c0c6a 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -452,7 +452,7 @@ StTooltip StLabel {
     background-gradient-direction: vertical;
     background-gradient-start: rgba(255, 255, 255, 0.2);
     background-gradient-end: rgba(255, 255, 255, 0);
-/*    border: 1px solid #808080;*/
+    border: 1px solid blue;
     border-radius: 10px;
     height: 32px;
     width: 300px;

recolors the whole button blue as demonstrated by the attached screenshot.
Comment 1 Ray Strode [halfline] 2011-01-24 21:39:52 UTC
Created attachment 179233 [details] [review]
tests: show off translucent gradients

Right now border color is leaking through.
Demonstrate that.
Comment 2 Ray Strode [halfline] 2011-01-24 21:39:56 UTC
Created attachment 179234 [details] [review]
StThemeNodeDrawing: Ignore border fill in interior

We need to be careful to ignore any preexisting color information
in the interior of the node when filling it with the background color,
since the border color may have leaked into the interior and the
background color may be translucent.
Comment 3 Ray Strode [halfline] 2011-01-24 21:39:59 UTC
Created attachment 179235 [details] [review]
StThemeNodeDrawing: fill background behind translucent gradients

If a background gradient isn't fully opaque, then we need to first
fill in the background color so the border color doesn't leak into
the interior.
Comment 4 Florian Müllner 2011-02-08 15:28:56 UTC
*** Bug 641839 has been marked as a duplicate of this bug. ***
Comment 5 Florian Müllner 2011-02-08 15:35:43 UTC
Review of attachment 179234 [details] [review]:

I had planned to review that, but somehow forgot about it - sorry for that. Looks good.
Comment 6 Florian Müllner 2011-02-08 15:39:37 UTC
Review of attachment 179235 [details] [review]:

OK.
Comment 7 Florian Müllner 2011-02-08 15:43:38 UTC
Review of attachment 179233 [details] [review]:

Sure.
Comment 8 Ray Strode [halfline] 2011-02-10 23:25:11 UTC
coolio
Comment 9 Ray Strode [halfline] 2011-02-15 22:45:13 UTC
So drago01 noticed attachment 179235 [details] [review] causes rendering regressions in the alt-tab pop up
Comment 10 Ray Strode [halfline] 2011-02-15 22:50:34 UTC
Created attachment 180949 [details] [review]
Revert "StThemeNodeDrawing: fill background behind translucent gradients"

This reverts commit b4ec342d0603f1dc39cdadec62d9dcd7ec49f17d.

The alpha > 0 checks should actually be alpha < 255 for the commit to
make sense as designed. The design isn't right either, though,
since we need to preserve the translucency in translucent gradients,
not block it with a solid color fill.
Comment 11 Ray Strode [halfline] 2011-02-15 22:50:43 UTC
Created attachment 180950 [details] [review]
StThemeNodeDrawing: clear out node interior before filling pattern

If we aren't going to fill the content area of the node with a solid
background color, then we need to clear it of any artifacts left over
from drawing the border.
Comment 12 drago01 2011-02-15 23:14:57 UTC
Review of attachment 180949 [details] [review]:

Not sure I would have gone with the "revert + fix" rather then just "fix" but there is nothing wrong with that.
Comment 13 drago01 2011-02-15 23:20:09 UTC
Review of attachment 180950 [details] [review]:

Looks good (and fixes the problem I saw) but seems like to introduce a similar issue elsewhere, which we could either fix
later (in both code paths) or fallback to always use the cairo path in this case as you suggested on IRC.

::: src/st/st-theme-node-drawing.c
@@ +827,3 @@
+       * background image, because it either always fills the entire area
+       * opaquely, or we draw the solid background behind it.
+       */

I am not sure about this part, this sounds like it will cause the same problems again when the background image is *not* fully opaque.
But as noted on IRC we do the same in the cogl path, so we should either change both or maintain consistency.
Comment 14 Ray Strode [halfline] 2011-02-16 01:06:42 UTC
Given every change has the potential to break status quo, let's
deal with the background image case later if/when we run into it.