Tray icon cropped on Plasma 5
Reported by
bajk...@googlemail.com,
Jan 5 2018
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36 Steps to reproduce the problem: 1. Run an Electron app that shows a system tray icon on Plasma 5 2. 3. What is the expected behavior? The system tray icon is properly rendered What went wrong? The system tray icon is cut off. I traced it back to commit 9bf1973b0fe56de26cf85009457c9ed8f5e757d7 which tries to work around blurry icon rendering on Plasma 4. The system tray implementation in Plasma 5 is vastly different and enforces specific icon sizes and shouldn't exhibit this behavior as badly. Even if it did, there is an issue with the code: chromium/src/chrome/browser/ui/libgtkui/app_indicator_icon.h // If |bitmap| is not 24x24, KDE does some really ugly resizing. Pad |bitmap| // with transparent pixels to make it 24x24. const int kDesiredSize = 24; SkBitmap scaled_bitmap; [...] SkCanvas canvas(scaled_bitmap); canvas.drawBitmap(bitmap, (kDesiredSize - bitmap.width()) / 2, (kDesiredSize - bitmap.height()) / 2); When the bitmap provided to the function is larger than 24x24 px which seems to be the case usually, the icon is rendered out of bounds (e.g. a 48x48 icon will be rendered at coordinates -12,-12) and you can only see the center 24x24px of the icon. Did this work before? N/A Chrome version: 63.0.3239.108 Channel: n/a OS Version: Flash Version: Downstream KDE bug report https://bugs.kde.org/show_bug.cgi?id=366062
,
Aug 13
I've just sent a patch for this issue: https://chromium-review.googlesource.com/c/chromium/src/+/1173235
,
Sep 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1f44fb08adf37a6de75bc4e335156b21594d5a9f commit 1f44fb08adf37a6de75bc4e335156b21594d5a9f Author: Sebastian Krzyszkowiak <dos@dosowisko.net> Date: Fri Sep 07 21:05:41 2018 Fix system tray icons being cropped under KDE The code that adds padding to too small icons was breaking the larger ones by cutting the minimal size (22x22px) out of their center. Bug: 799427 Change-Id: I7a87d0229e063420a4814256528fbd070c62e503 Reviewed-on: https://chromium-review.googlesource.com/1173235 Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#589638} [modify] https://crrev.com/1f44fb08adf37a6de75bc4e335156b21594d5a9f/AUTHORS [modify] https://crrev.com/1f44fb08adf37a6de75bc4e335156b21594d5a9f/chrome/browser/ui/libgtkui/app_indicator_icon.cc
,
Sep 7
Should be fixed with the cl from c#3 |
||
►
Sign in to add a comment |
||
Comment 1 by sc00335...@techmahindra.com
, Jan 11 2018Labels: Needs-Triage-M63 Triaged-ET TE-NeedsTriageHelp