Bug 254144

Summary: kTorrent share ratio color
Product: [Applications] ktorrent Reporter: Jaromir Smrcek <jaromir.smrcek>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: wishlist CC: 4plague
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jaromir Smrcek 2010-10-14 13:17:08 UTC
Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

The column with share ratio uses two colors (good feature), but I cannot set the threshold for bad(red) ratio becoming good(green). Please add this to the settings.

Reproducible: Always

Steps to Reproduce:
Go to settings


Actual Results:  
There is no setting for the ratio threshold

Expected Results:  
There should be a setting for that

On a side note, at the moment I am editing the source code to make the threshold 1.0. As a programmer that piece of code is really gross, couse you use only literals and no defines/constants for that: "if (col==11) color = ratio < 0.8 ? red : green;". I mean come on...
Comment 1 Joris Guisson 2010-10-16 13:47:26 UTC
SVN commit 1186436 by guisson:

Make ratio configurable at which the share ratio becomes green 

BUG: 254144

 M  +1 -0      ChangeLog  
 M  +39 -7     ktorrent/pref/qmpref.ui  
 M  +4 -3      ktorrent/view/viewmodel.cpp  
 M  +20 -0     libktcore/dbus/dbussettings.cpp  
 M  +4 -0      libktcore/dbus/dbussettings.h  
 M  +4 -0      libktcore/ktorrent.kcfg  
 M  +2 -2      plugins/infowidget/downloadedchunkbar.cpp  
 M  +1 -1      plugins/infowidget/downloadedchunkbar.h  
 M  +2 -1      plugins/infowidget/statustab.cpp  
 M  +1 -1      scripts/kcfg_qobject_gen.py  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1186436
Comment 2 Jaromir Smrcek 2010-10-17 11:20:18 UTC
I know i shouldn't post here like on a forum, but still: Thanks!