D15069: Make thumbnail frame-and-shadow drawing criteria match those of the file dialog

Mark Gaiser noreply at phabricator.kde.org
Sat Aug 25 12:28:01 BST 2018


markg added a comment.


  Hi Nate,
  
  I'm afraid this will give inconsistent frames, at least that will be the perception of the user.
  The hasAlpha function on a QPixmap (probably) boils down to executing this function:
  
    bool QX11PlatformPixmap::hasAlphaChannel() const                                                                                                                                                                                                                           
    {                                                                                                                                                                                                                                                                          
        if (picture && d == 32)                                                                                                                                                                                                                                                
            return true;                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                               
        if (x11_mask && d == 1)                                                                                                                                                                                                                                                
            return true;                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                               
        return false;                                                                                                                                                                                                                                                          
    } 
  
  But there are quite some places in Qt where the alpha channel checks are done differently.The above would be for X11, it's likely different on wayland, etc...
  
  So where is this going to be inconsistent? Well, with images that "have" an alpha channel but don't use it.
  This happens when saving an image. It's often a setting to keep transparency or not (it is in photoshop and gimp).
  Therefore you can - and will - have people that have images with an alpha channel but don't use it so they don't get a frame. While the very same image when saved differently (and in png as well) will have a frame. That's going to be a bug report from that user i guess ;)
  
  Having said that, i'm much more in favor of an all-or-nothing approach. Not some logic somewhere that dictates when an image has a frame and when it doesn't.
  We've had frames for years so perhaps it's time to just flip the switch and see how users like it. So just flip that switch by default to no frames.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D15069

To: ngraham, #dolphin, broulik, elvisangelaccio
Cc: markg, anthonyfieroni, elvisangelaccio, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180825/d7d167d8/attachment.htm>


More information about the kfm-devel mailing list