Review Request 127809: [Platform xcb] Get best icon size when he's not specified

Martin Gräßlin mgraesslin at kde.org
Mon May 2 14:28:09 UTC 2016



> On May 2, 2016, 4:02 p.m., Martin Gräßlin wrote:
> > What is the "best" size if it's not specified? Why is your change better than how it was?
> > 
> > This change adjusts a very important part of the icon lookup functionality used by KWin and Plasma. I'm a little bit scared of touching it.
> > 
> > The change does not come with a test, so I have problems understanding what you want to change. Could you please extend the tests to ensure that this does not break existing functionality?
> 
> Anthony Fieroni wrote:
>     I, personally, don't know when NETWinInfo->icon or icccmIconPixmap can fail but when it happend function returns icon with size 16x16 when is called like this -> KWindowSystem::icon (wid);

well that's what we have unit test for. They can show us whether the code fails.


> On May 2, 2016, 4:02 p.m., Martin Gräßlin wrote:
> > src/platforms/xcb/kwindowsystem.cpp, lines 740-741
> > <https://git.reviewboard.kde.org/r/127809/diff/1/?file=462034#file462034line740>
> >
> >     This makes the code way more difficult to read. I'm no longer able to grasp what's going on there.
> 
> Anthony Fieroni wrote:
>     Threshold down/up scale was wrong.

The code is still pretty much unreadable.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127809/#review95084
-----------------------------------------------------------


On May 2, 2016, 4:04 p.m., Anthony Fieroni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127809/
> -----------------------------------------------------------
> 
> (Updated May 2, 2016, 4:04 p.m.)
> 
> 
> Review request for KDE Frameworks, KDE Usability and Martin Gräßlin.
> 
> 
> Bugs: 362324
>     https://bugs.kde.org/show_bug.cgi?id=362324
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> The api function is KWindowSystem::icon (WId win, int width=-1, int height=-1, bool scale=false) so caller must get best size not worst when width/height is not specified.
> 
> 
> Diffs
> -----
> 
>   src/platforms/xcb/kwindowsystem.cpp 5b7c65a 
> 
> Diff: https://git.reviewboard.kde.org/r/127809/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> before
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/05/01/6d718ef6-26cf-4866-94d2-4ffbdfc906fe__Screenshot_20160426_232109.png
> after
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/05/01/7dcab4ae-e451-4d43-8799-a0fcab471a3d__Screenshot_20160501_224642.png
> 
> 
> Thanks,
> 
> Anthony Fieroni
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160502/202a503e/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list