Skip to content

Commit

Permalink
Use a semitransparent black shadow for embiggened tray icons
Browse files Browse the repository at this point in the history
On X11, Psi previously added an opaque gray "shadow" to tray icons which
looks out of place on dark or colored panels. A semitransparent black
shadow should look cromulent on any panel color.
  • Loading branch information
FlorianFieber committed May 5, 2014
1 parent e342d03 commit ac56660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/psitrayicon.cpp
Expand Up @@ -139,10 +139,10 @@ QPixmap PsiTrayIcon::makeIcon()
// draw a dropshadow
for(n2 = 0; n2 < in.height(); ++n2) {
for(n = 0; n < in.width(); ++n) {
if(int a = qAlpha(in.pixel(n,n2))) {
if(int a = qAlpha(in.pixel(n,n2)) / 2) {
int x = n + xo + 2;
int y = n2 + yo + 2;
real.setPixel(x, y, qRgba(0x80,0x80,0x80,a));
real.setPixel(x, y, qRgba(0,0,0,a));
}
}
}
Expand Down

0 comments on commit ac56660

Please sign in to comment.