Improve the look of torrents with errors a bit (Qt client)

Display emblem over mime icon if torrent has error(s) to indicate the
issue.
Use normal text color instead of red when drawing selected item: there
is no easy way to be sure that red color looks nice on selection
background, and most of the time it doesn't. Using red color for non-
selected items is questionable too, but let's leave it at that for now.
This commit is contained in:
Mike Gelfand 2015-01-17 01:23:51 +00:00
parent bdcd69537e
commit 9eea4ada83
7 changed files with 501 additions and 20 deletions

View File

@ -71,6 +71,8 @@
<file>categories/16/preferences-system.png</file>
<file>categories/22/preferences-system.png</file>
<file>categories/24/preferences-system.png</file>
<file>emblems/16/emblem-important.icon</file>
<file>emblems/16/emblem-important.png</file>
<file>status/16/network-error.png</file>
<file>status/16/network-idle.png</file>
<file>status/16/network-receive.png</file>

View File

@ -0,0 +1,84 @@
[Icon Data]
DisplayName=Important
DisplayName[af]=Belangrik
DisplayName[am]=አስፈላጊ
DisplayName[ar]=مهمّ
DisplayName[az]=Vacib
DisplayName[be]=Важны
DisplayName[be@latin]=Važny
DisplayName[bg]=Важно
DisplayName[bn]=গুরুত্বপূর্ণ
DisplayName[bn_IN]=গুরুত্বপূর্ণ
DisplayName[bs]=Važno
DisplayName[ca]=Important
DisplayName[cs]=Důležité
DisplayName[cy]=Pwysig
DisplayName[da]=Vigtig
DisplayName[de]=Wichtig
DisplayName[dz]=གལ་ཅན།
DisplayName[el]=Σημαντικό
DisplayName[en_CA]=Important
DisplayName[en_GB]=Important
DisplayName[es]=Importante
DisplayName[et]=Tähtis
DisplayName[eu]=Garrantzitsua
DisplayName[fa]=مهم
DisplayName[fi]=Tärkeä
DisplayName[fr]=Important
DisplayName[fur]=Impuartant
DisplayName[ga]=Tábhachtach
DisplayName[gl]=Importante
DisplayName[gu]=મહત્વનુ
DisplayName[he]=חשוב
DisplayName[hi]=महत्वपूर्ण
DisplayName[hr]=Važno
DisplayName[hu]=Fontos
DisplayName[id]=Penting
DisplayName[is]=Mikilvægt
DisplayName[it]=Importante
DisplayName[ja]=重要
DisplayName[ka]=მნიშვნელოვანი
DisplayName[ko]=중요
DisplayName[li]=Wichtig
DisplayName[lt]=Svarbu
DisplayName[lv]=Svarīgs
DisplayName[mg]=Manan-danja
DisplayName[mk]=Важно
DisplayName[ml]=സുപ്രധാനമായ
DisplayName[mn]=Чухал
DisplayName[mr]=महत्वाचे
DisplayName[ms]=Penting
DisplayName[nb]=Viktig
DisplayName[ne]=महत्वपूर्ण
DisplayName[nl]=Belangrijk
DisplayName[nn]=Viktig
DisplayName[oc]=Important
DisplayName[or]=ଗୁରୁତ୍ବପୂର୍ଣ୍ଣ
DisplayName[pa]=ਖਾਸ
DisplayName[pl]=Ważny
DisplayName[pt]=Importante
DisplayName[pt_BR]=Importante
DisplayName[ro]=Important
DisplayName[ru]=Важно
DisplayName[rw]=By'ingirakamaro
DisplayName[si]=වැදගත්
DisplayName[sk]=Dôležitý
DisplayName[sl]=Pomembno
DisplayName[sq]=I rëndësishëm
DisplayName[sr]=Важно
DisplayName[sr@Latn]=Važno
DisplayName[sv]=Viktig
DisplayName[ta]=முக்கியம்
DisplayName[te]=ముఖ్యమైన
DisplayName[th]=สำคัญ
DisplayName[tk]=Möhüm
DisplayName[tr]=Önemli
DisplayName[uk]=Важливе
DisplayName[vi]=Quan trọng
DisplayName[wa]=Impôrtant
DisplayName[xh]=Ibalulekile
DisplayName[zh_CN]=重要
DisplayName[zh_HK]=重要
DisplayName[zh_TW]=重要

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

View File

@ -0,0 +1,84 @@
[Icon Data]
DisplayName=Important
DisplayName[af]=Belangrik
DisplayName[am]=አስፈላጊ
DisplayName[ar]=مهمّ
DisplayName[az]=Vacib
DisplayName[be]=Важны
DisplayName[be@latin]=Važny
DisplayName[bg]=Важно
DisplayName[bn]=গুরুত্বপূর্ণ
DisplayName[bn_IN]=গুরুত্বপূর্ণ
DisplayName[bs]=Važno
DisplayName[ca]=Important
DisplayName[cs]=Důležité
DisplayName[cy]=Pwysig
DisplayName[da]=Vigtig
DisplayName[de]=Wichtig
DisplayName[dz]=གལ་ཅན།
DisplayName[el]=Σημαντικό
DisplayName[en_CA]=Important
DisplayName[en_GB]=Important
DisplayName[es]=Importante
DisplayName[et]=Tähtis
DisplayName[eu]=Garrantzitsua
DisplayName[fa]=مهم
DisplayName[fi]=Tärkeä
DisplayName[fr]=Important
DisplayName[fur]=Impuartant
DisplayName[ga]=Tábhachtach
DisplayName[gl]=Importante
DisplayName[gu]=મહત્વનુ
DisplayName[he]=חשוב
DisplayName[hi]=महत्वपूर्ण
DisplayName[hr]=Važno
DisplayName[hu]=Fontos
DisplayName[id]=Penting
DisplayName[is]=Mikilvægt
DisplayName[it]=Importante
DisplayName[ja]=重要
DisplayName[ka]=მნიშვნელოვანი
DisplayName[ko]=중요
DisplayName[li]=Wichtig
DisplayName[lt]=Svarbu
DisplayName[lv]=Svarīgs
DisplayName[mg]=Manan-danja
DisplayName[mk]=Важно
DisplayName[ml]=സുപ്രധാനമായ
DisplayName[mn]=Чухал
DisplayName[mr]=महत्वाचे
DisplayName[ms]=Penting
DisplayName[nb]=Viktig
DisplayName[ne]=महत्वपूर्ण
DisplayName[nl]=Belangrijk
DisplayName[nn]=Viktig
DisplayName[oc]=Important
DisplayName[or]=ଗୁରୁତ୍ବପୂର୍ଣ୍ଣ
DisplayName[pa]=ਖਾਸ
DisplayName[pl]=Ważny
DisplayName[pt]=Importante
DisplayName[pt_BR]=Importante
DisplayName[ro]=Important
DisplayName[ru]=Важно
DisplayName[rw]=By'ingirakamaro
DisplayName[si]=වැදගත්
DisplayName[sk]=Dôležitý
DisplayName[sl]=Pomembno
DisplayName[sq]=I rëndësishëm
DisplayName[sr]=Важно
DisplayName[sr@Latn]=Važno
DisplayName[sv]=Viktig
DisplayName[ta]=முக்கியம்
DisplayName[te]=ముఖ్యమైన
DisplayName[th]=สำคัญ
DisplayName[tk]=Möhüm
DisplayName[tr]=Önemli
DisplayName[uk]=Важливе
DisplayName[vi]=Quan trọng
DisplayName[wa]=Impôrtant
DisplayName[xh]=Ibalulekile
DisplayName[zh_CN]=重要
DisplayName[zh_HK]=重要
DisplayName[zh_TW]=重要

View File

@ -0,0 +1,290 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="96"
height="96"
id="svg2"
style="display:inline">
<defs
id="defs4">
<linearGradient
id="linearGradient3655">
<stop
id="stop3657"
style="stop-color:#ad0707;stop-opacity:1"
offset="0" />
<stop
id="stop3659"
style="stop-color:#f75535;stop-opacity:1"
offset="1" />
</linearGradient>
<clipPath
id="clipPath3266">
<path
d="M 0,0 0,96 96,96 96,0 0,0 z m 12,6 72,0 c 3.324,0 6,2.676 6,6 l 0,72 c 0,3.324 -2.676,6 -6,6 L 12,90 C 8.676,90 6,87.324 6,84 L 6,12 C 6,8.676 8.676,6 12,6 z"
inkscape:connector-curvature="0"
id="path3268"
style="opacity:0.3;color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</clipPath>
<linearGradient
x1="32.251034"
y1="6.1317081"
x2="32.251034"
y2="90.238609"
id="linearGradient3101"
xlink:href="#ButtonShadow-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" />
<linearGradient
x1="45.447727"
y1="92.539597"
x2="45.447727"
y2="7.0165396"
id="ButtonShadow-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0058652,0,0,0.994169,100,0)">
<stop
id="stop3750-8"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop3752-5"
style="stop-color:#000000;stop-opacity:0.58823532"
offset="1" />
</linearGradient>
<linearGradient
x1="32.251034"
y1="6.1317081"
x2="32.251034"
y2="90.238609"
id="linearGradient3780"
xlink:href="#ButtonShadow-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" />
<linearGradient
x1="32.251034"
y1="6.1317081"
x2="32.251034"
y2="90.238609"
id="linearGradient3772"
xlink:href="#ButtonShadow-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" />
<linearGradient
x1="32.251034"
y1="6.1317081"
x2="32.251034"
y2="90.238609"
id="linearGradient3725"
xlink:href="#ButtonShadow-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" />
<linearGradient
x1="48"
y1="90"
x2="48"
y2="5.9877172"
id="linearGradient3052"
xlink:href="#ButtonColor-6"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="10.31979"
y1="21"
x2="10.31979"
y2="0.99929649"
id="ButtonColor-6"
gradientUnits="userSpaceOnUse">
<stop
id="stop3189-4"
style="stop-color:#c8c8c8;stop-opacity:1"
offset="0" />
<stop
id="stop3191-0"
style="stop-color:#e6e6e6;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="36.357143"
y1="6"
x2="36.357143"
y2="63.893143"
id="linearGradient3188"
xlink:href="#linearGradient3737"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3737">
<stop
id="stop3739"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3741"
style="stop-color:#ffffff;stop-opacity:0"
offset="1" />
</linearGradient>
<radialGradient
cx="48"
cy="90.171875"
r="42"
fx="48"
fy="90.171875"
id="radialGradient3619"
xlink:href="#linearGradient3737"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1573129,0,0,0.99590774,-7.551021,0.1971319)" />
<linearGradient
x1="32.251034"
y1="6.1317081"
x2="32.251034"
y2="90.238609"
id="linearGradient4186"
xlink:href="#ButtonShadow-0"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-97)" />
<linearGradient
x1="12"
y1="4.5"
x2="12"
y2="20.5"
id="linearGradient3182"
xlink:href="#linearGradient3655"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(4,0,0,4,0,-82)" />
<filter
color-interpolation-filters="sRGB"
id="filter3899">
<feGaussianBlur
id="feGaussianBlur3901"
stdDeviation="0.57" />
</filter>
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1">
<g
clip-path="url(#clipPath3266)"
id="g3202"
style="display:inline">
<path
d="m 12,-95.03125 c -5.5110903,0 -10.03125,4.52016 -10.03125,10.03125 l 0,71 c 0,5.5110902 4.5201598,10.03125 10.03125,10.03125 l 72,0 c 5.51109,0 10.03125,-4.5201597 10.03125,-10.03125 l 0,-71 c 0,-5.51109 -4.52016,-10.03125 -10.03125,-10.03125 l -72,0 z"
transform="scale(1,-1)"
id="path3786"
style="opacity:0.07999998;fill:url(#linearGradient3101);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<path
d="m 12,-94.03125 c -4.971633,0 -9.03125,4.059617 -9.03125,9.03125 l 0,71 c 0,4.9716329 4.0596171,9.03125 9.03125,9.03125 l 72,0 c 4.971633,0 9.03125,-4.059617 9.03125,-9.03125 l 0,-71 c 0,-4.971633 -4.059617,-9.03125 -9.03125,-9.03125 l -72,0 z"
transform="scale(1,-1)"
id="path3778"
style="opacity:0.1;fill:url(#linearGradient3780);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<path
d="m 12,-93 c -4.4091333,0 -8,3.590867 -8,8 l 0,71 c 0,4.4091333 3.5908667,8 8,8 l 72,0 c 4.409133,0 8,-3.5908667 8,-8 l 0,-71 c 0,-4.409133 -3.590867,-8 -8,-8 l -72,0 z"
transform="scale(1,-1)"
id="path3770"
style="opacity:0.2;fill:url(#linearGradient3772);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<rect
width="86"
height="85"
rx="7"
ry="7"
x="5"
y="-92"
transform="scale(1,-1)"
id="rect3723"
style="opacity:0.3;fill:url(#linearGradient3725);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<rect
width="84"
height="84"
rx="6"
ry="6"
x="6"
y="-91"
transform="scale(1,-1)"
id="rect3716"
style="opacity:0.45;fill:url(#linearGradient4186);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
</g>
<rect
width="84"
height="84"
rx="6"
ry="6"
x="6"
y="6"
id="rect2419"
style="opacity:0.75;fill:url(#linearGradient3052);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<path
d="M 12,6 C 8.676,6 6,8.676 6,12 l 0,2 0,68 0,2 c 0,0.334721 0.04135,0.6507 0.09375,0.96875 0.0487,0.295596 0.09704,0.596915 0.1875,0.875 0.00988,0.03038 0.020892,0.0636 0.03125,0.09375 0.098865,0.287771 0.2348802,0.547452 0.375,0.8125 0.1445918,0.273507 0.3156161,0.535615 0.5,0.78125 0.1843839,0.245635 0.3737765,0.473472 0.59375,0.6875 0.439947,0.428056 0.94291,0.814526 1.5,1.09375 0.278545,0.139612 0.5734731,0.246947 0.875,0.34375 -0.2562018,-0.100222 -0.4867109,-0.236272 -0.71875,-0.375 -0.00741,-0.0044 -0.023866,0.0045 -0.03125,0 -0.031933,-0.0193 -0.062293,-0.04251 -0.09375,-0.0625 -0.120395,-0.0767 -0.2310226,-0.163513 -0.34375,-0.25 -0.1061728,-0.0808 -0.2132809,-0.161112 -0.3125,-0.25 C 8.4783201,88.557317 8.3087904,88.373362 8.15625,88.1875 8.0486711,88.057245 7.9378561,87.922215 7.84375,87.78125 7.818661,87.74287 7.805304,87.69538 7.78125,87.65625 7.716487,87.553218 7.6510225,87.451733 7.59375,87.34375 7.4927417,87.149044 7.3880752,86.928049 7.3125,86.71875 7.30454,86.69694 7.288911,86.6782 7.28125,86.65625 7.2494249,86.5643 7.2454455,86.469419 7.21875,86.375 7.188418,86.268382 7.148361,86.171969 7.125,86.0625 7.052121,85.720988 7,85.364295 7,85 L 7,83 7,15 7,13 C 7,10.218152 9.2181517,8 12,8 l 2,0 68,0 2,0 c 2.781848,0 5,2.218152 5,5 l 0,2 0,68 0,2 c 0,0.364295 -0.05212,0.720988 -0.125,1.0625 -0.04415,0.206893 -0.08838,0.397658 -0.15625,0.59375 -0.0077,0.02195 -0.0233,0.04069 -0.03125,0.0625 -0.06274,0.173739 -0.138383,0.367449 -0.21875,0.53125 -0.04158,0.0828 -0.07904,0.169954 -0.125,0.25 -0.0546,0.09721 -0.126774,0.18835 -0.1875,0.28125 -0.09411,0.140965 -0.204921,0.275995 -0.3125,0.40625 -0.143174,0.17445 -0.303141,0.346998 -0.46875,0.5 -0.01117,0.0102 -0.01998,0.02115 -0.03125,0.03125 -0.138386,0.125556 -0.285091,0.234436 -0.4375,0.34375 -0.102571,0.07315 -0.204318,0.153364 -0.3125,0.21875 -0.0074,0.0045 -0.02384,-0.0044 -0.03125,0 -0.232039,0.138728 -0.462548,0.274778 -0.71875,0.375 0.301527,-0.0968 0.596455,-0.204138 0.875,-0.34375 0.55709,-0.279224 1.060053,-0.665694 1.5,-1.09375 0.219973,-0.214028 0.409366,-0.441865 0.59375,-0.6875 0.184384,-0.245635 0.355408,-0.507743 0.5,-0.78125 0.14012,-0.265048 0.276135,-0.524729 0.375,-0.8125 0.01041,-0.03078 0.02133,-0.06274 0.03125,-0.09375 0.09046,-0.278085 0.1388,-0.579404 0.1875,-0.875 C 89.95865,84.6507 90,84.334721 90,84 l 0,-2 0,-68 0,-2 C 90,8.676 87.324,6 84,6 L 12,6 z"
inkscape:connector-curvature="0"
id="rect3728"
style="opacity:0.5;fill:url(#linearGradient3188);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
<path
d="M 12,90 C 8.676,90 6,87.324 6,84 L 6,82 6,14 6,12 c 0,-0.334721 0.04135,-0.6507 0.09375,-0.96875 0.0487,-0.295596 0.09704,-0.596915 0.1875,-0.875 C 6.29113,10.12587 6.302142,10.09265 6.3125,10.0625 6.411365,9.774729 6.5473802,9.515048 6.6875,9.25 6.8320918,8.976493 7.0031161,8.714385 7.1875,8.46875 7.3718839,8.223115 7.5612765,7.995278 7.78125,7.78125 8.221197,7.353194 8.72416,6.966724 9.28125,6.6875 9.559795,6.547888 9.8547231,6.440553 10.15625,6.34375 9.9000482,6.443972 9.6695391,6.580022 9.4375,6.71875 c -0.00741,0.0044 -0.023866,-0.0045 -0.03125,0 -0.031933,0.0193 -0.062293,0.04251 -0.09375,0.0625 -0.120395,0.0767 -0.2310226,0.163513 -0.34375,0.25 -0.1061728,0.0808 -0.2132809,0.161112 -0.3125,0.25 C 8.4783201,7.442683 8.3087904,7.626638 8.15625,7.8125 8.0486711,7.942755 7.9378561,8.077785 7.84375,8.21875 7.818661,8.25713 7.805304,8.30462 7.78125,8.34375 7.716487,8.446782 7.6510225,8.548267 7.59375,8.65625 7.4927417,8.850956 7.3880752,9.071951 7.3125,9.28125 7.30454,9.30306 7.288911,9.3218 7.28125,9.34375 7.2494249,9.4357 7.2454455,9.530581 7.21875,9.625 7.188418,9.731618 7.148361,9.828031 7.125,9.9375 7.052121,10.279012 7,10.635705 7,11 l 0,2 0,68 0,2 c 0,2.781848 2.2181517,5 5,5 l 2,0 68,0 2,0 c 2.781848,0 5,-2.218152 5,-5 l 0,-2 0,-68 0,-2 C 89,10.635705 88.94788,10.279012 88.875,9.9375 88.83085,9.730607 88.78662,9.539842 88.71875,9.34375 88.71105,9.3218 88.69545,9.30306 88.6875,9.28125 88.62476,9.107511 88.549117,8.913801 88.46875,8.75 88.42717,8.6672 88.38971,8.580046 88.34375,8.5 88.28915,8.40279 88.216976,8.31165 88.15625,8.21875 88.06214,8.077785 87.951329,7.942755 87.84375,7.8125 87.700576,7.63805 87.540609,7.465502 87.375,7.3125 87.36383,7.3023 87.35502,7.29135 87.34375,7.28125 87.205364,7.155694 87.058659,7.046814 86.90625,6.9375 86.803679,6.86435 86.701932,6.784136 86.59375,6.71875 c -0.0074,-0.0045 -0.02384,0.0044 -0.03125,0 -0.232039,-0.138728 -0.462548,-0.274778 -0.71875,-0.375 0.301527,0.0968 0.596455,0.204138 0.875,0.34375 0.55709,0.279224 1.060053,0.665694 1.5,1.09375 0.219973,0.214028 0.409366,0.441865 0.59375,0.6875 0.184384,0.245635 0.355408,0.507743 0.5,0.78125 0.14012,0.265048 0.276135,0.524729 0.375,0.8125 0.01041,0.03078 0.02133,0.06274 0.03125,0.09375 0.09046,0.278085 0.1388,0.579404 0.1875,0.875 C 89.95865,11.3493 90,11.665279 90,12 l 0,2 0,68 0,2 c 0,3.324 -2.676,6 -6,6 l -72,0 z"
inkscape:connector-curvature="0"
id="path3615"
style="opacity:0.2;fill:url(#radialGradient3619);fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
</g>
<g
transform="translate(0,80)"
id="layer2"
style="display:inline">
<path
d="m 43,-62 c -1.662,0 -3,1.338 -3,3 l 0,3 0,24 0,3 c 0,1.662 1.338,3 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-24 0,-3 c 0,-1.662 -1.423288,-2.474429 -3,-3 l -3,0 -4,0 z m 0,44 c -1.662,0 -3,1.338 -3,3 l 0,3 0,4 0,3 c 0,1.662 1.423288,2.4744295 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-4 0,-3 c 0,-1.662 -1.338,-3 -3,-3 l -3,0 -4,0 z"
inkscape:connector-curvature="0"
id="path3129"
style="opacity:0.2;color:#000000;fill:none;stroke:#ffffff;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3899);enable-background:accumulate" />
<path
d="m 43,-62 c -1.662,0 -3,1.338 -3,3 l 0,3 0,24 0,3 c 0,1.662 1.338,3 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-24 0,-3 c 0,-1.662 -1.423288,-2.474429 -3,-3 l -3,0 -4,0 z m 0,44 c -1.662,0 -3,1.338 -3,3 l 0,3 0,4 0,3 c 0,1.662 1.423288,2.4744295 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-4 0,-3 c 0,-1.662 -1.338,-3 -3,-3 l -3,0 -4,0 z"
inkscape:connector-curvature="0"
id="rect3734"
style="color:#000000;fill:url(#linearGradient3182);fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<rect
width="96"
height="96"
x="-100"
y="-80"
id="rect3682"
style="opacity:0.3;color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="m 43,18 c -1.662,0 -3,1.338 -3,3 l 0,3 0,24 0,3 c 0,1.662 1.338,3 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-24 0,-3 c 0,-1.662 -1.423288,-2.474429 -3,-3 l -3,0 -4,0 -3,0 z m 0,2 3,0 4,0 2.5625,0 c 0.542298,0.202571 1.022365,0.424486 1.21875,0.59375 C 54.008001,20.789186 54,20.738595 54,21 l 0,3 0,24 0,3 c 0,0.591074 -0.408926,1 -1,1 l -3,0 -4,0 -3,0 c -0.591074,0 -1,-0.408926 -1,-1 l 0,-3 0,-24 0,-3 c 0,-0.591074 0.408926,-1 1,-1 z m 0,42 c -1.662,0 -3,1.338 -3,3 l 0,3 0,4 0,3 c 0,1.662 1.423288,2.474429 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-4 0,-3 c 0,-1.662 -1.338,-3 -3,-3 l -3,0 -4,0 -3,0 z m 0,2 3,0 4,0 3,0 c 0.591074,0 1,0.408926 1,1 l 0,3 0,4 0,3 c 0,0.591074 -0.408926,1 -1,1 l -3,0 -4,0 -2.5625,0 C 42.895202,75.797429 42.415135,75.575514 42.21875,75.40625 41.991999,75.210814 42,75.261405 42,75 l 0,-3 0,-4 0,-3 c 0,-0.591074 0.408926,-1 1,-1 z"
inkscape:connector-curvature="0"
transform="translate(0,-80)"
id="path3956"
style="opacity:0.1;color:#000000;fill:#550000;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="m 43,18 c -1.662,0 -3,1.338 -3,3 l 0,3 0,24 0,3 c 0,1.662 1.338,3 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-24 0,-3 c 0,-1.662 -1.423288,-2.474429 -3,-3 l -3,0 -4,0 -3,0 z m 0,0.96875 3,0 4,0 2.75,0 c 0.697125,0.238635 1.338807,0.516278 1.71875,0.84375 0.393808,0.339423 0.5625,0.634351 0.5625,1.1875 l 0,3 0,24 0,3 c 0,1.139597 -0.891653,2.03125 -2.03125,2.03125 l -3,0 -4,0 -3,0 c -1.139597,0 -2.03125,-0.891653 -2.03125,-2.03125 l 0,-3 0,-24 0,-3 c 0,-1.139597 0.891653,-2.03125 2.03125,-2.03125 z M 43,62 c -1.662,0 -3,1.338 -3,3 l 0,3 0,4 0,3 c 0,1.662 1.423288,2.474429 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-3 0,-4 0,-3 c 0,-1.662 -1.338,-3 -3,-3 l -3,0 -4,0 -3,0 z m 0,0.96875 3,0 4,0 3,0 c 1.139597,0 2.03125,0.891653 2.03125,2.03125 l 0,3 0,4 0,3 c 0,1.139597 -0.891653,2.03125 -2.03125,2.03125 l -3,0 -4,0 -2.75,0 C 42.552875,76.792615 41.911193,76.514972 41.53125,76.1875 41.137442,75.848077 40.96875,75.553149 40.96875,75 l 0,-3 0,-4 0,-3 c 0,-1.139597 0.891653,-2.03125 2.03125,-2.03125 z"
inkscape:connector-curvature="0"
transform="translate(0,-80)"
id="path3184"
style="opacity:0.2;color:#000000;fill:#550000;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="m 43,18 c -1.662,0 -3,1.338 -3,3 l 0,1 c 0,-1.662 1.338,-3 3,-3 l 3,0 4,0 3,0 c 1.576712,0.525571 3,1.338 3,3 l 0,-1 c 0,-1.662 -1.423288,-2.474429 -3,-3 l -3,0 -4,0 -3,0 z m 0,44 c -1.662,0 -3,1.338 -3,3 l 0,1 c 0,-1.662 1.338,-3 3,-3 l 3,0 4,0 3,0 c 1.662,0 3,1.338 3,3 l 0,-1 c 0,-1.662 -1.338,-3 -3,-3 l -3,0 -4,0 -3,0 z"
inkscape:connector-curvature="0"
transform="translate(0,-80)"
id="path3966"
style="opacity:0.3;color:#000000;fill:#550000;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="m 40,51 0,1 c 0,1.662 1.338,3 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-1 c 0,1.662 -1.338,3 -3,3 l -3,0 -4,0 -3,0 c -1.662,0 -3,-1.338 -3,-3 z m 0,24 0,1 c 0,1.662 1.423288,2.474429 3,3 l 3,0 4,0 3,0 c 1.662,0 3,-1.338 3,-3 l 0,-1 c 0,1.662 -1.338,3 -3,3 l -3,0 -4,0 -3,0 c -1.576712,-0.525571 -3,-1.338 -3,-3 z"
inkscape:connector-curvature="0"
transform="translate(0,-80)"
id="path3975"
style="opacity:0.8;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -90,22 +90,25 @@ TorrentDelegateMin::drawTorrent (QPainter * painter,
const QString statusStr (shortStatusString (tor));
const QSize statusSize (statusFM.size (0, statusStr));
const bool isItemSelected ((option.state & QStyle::State_Selected) != 0);
const bool isItemEnabled ((option.state & QStyle::State_Enabled) != 0);
const bool isItemActive ((option.state & QStyle::State_Active) != 0);
painter->save();
if (option.state & QStyle::State_Selected)
if (isItemSelected)
{
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
QPalette::ColorGroup cg = isItemEnabled ? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !isItemActive)
cg = QPalette::Inactive;
painter->fillRect(option.rect, option.palette.brush(cg, QPalette::Highlight));
}
QIcon::Mode im;
if (isPaused || !(option.state & QStyle::State_Enabled))
if (isPaused || !isItemEnabled)
im = QIcon::Disabled;
else if (option.state & QStyle::State_Selected)
else if (isItemSelected)
im = QIcon::Selected;
else
im = QIcon::Normal;
@ -117,13 +120,13 @@ TorrentDelegateMin::drawTorrent (QPainter * painter,
qs = QIcon::On;
QPalette::ColorGroup cg = QPalette::Normal;
if (isPaused || !(option.state & QStyle::State_Enabled))
if (isPaused || !isItemEnabled)
cg = QPalette::Disabled;
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
if (cg == QPalette::Normal && !isItemActive)
cg = QPalette::Inactive;
QPalette::ColorRole cr;
if (option.state & QStyle::State_Selected)
if (isItemSelected)
cr = QPalette::HighlightedText;
else
cr = QPalette::Text;
@ -133,6 +136,9 @@ TorrentDelegateMin::drawTorrent (QPainter * painter,
progressBarState = QStyle::State_None;
progressBarState |= QStyle::State_Small;
const QIcon::Mode emblemIm = isItemSelected ? QIcon::Selected : QIcon::Normal;
const QIcon emblemIcon = tor.hasError () ? QIcon::fromTheme ("emblem-important") : QIcon ();
// layout
const QSize m (margin (*style));
QRect fillArea (option.rect);
@ -141,6 +147,9 @@ TorrentDelegateMin::drawTorrent (QPainter * painter,
fillArea.y() + (fillArea.height() - iconSize) / 2,
iconSize,
iconSize);
const QRect emblemRect (style->alignedRect (option.direction, Qt::AlignRight | Qt::AlignBottom,
emblemIcon.actualSize (QSize (iconSize / 2, iconSize / 2), emblemIm, qs),
iconArea));
const QRect barArea (fillArea.x() + fillArea.width() - BAR_WIDTH,
fillArea.y() + (fillArea.height() - BAR_HEIGHT) / 2,
BAR_WIDTH,
@ -155,11 +164,13 @@ TorrentDelegateMin::drawTorrent (QPainter * painter,
fillArea.height());
// render
if (tor.hasError())
if (tor.hasError() && !isItemSelected)
painter->setPen (QColor ("red"));
else
painter->setPen (option.palette.color (cg, cr));
tor.getMimeTypeIcon().paint (painter, iconArea, Qt::AlignCenter, im, qs);
if (!emblemIcon.isNull ())
emblemIcon.paint (painter, emblemRect, Qt::AlignCenter, emblemIm, qs);
painter->setFont (nameFont);
painter->drawText (nameArea, 0, nameFM.elidedText (nameStr, Qt::ElideRight, nameArea.width()));
painter->setFont (statusFont);

View File

@ -373,22 +373,25 @@ TorrentDelegate::drawTorrent (QPainter * painter,
const QString progressStr (statusString (tor));
const bool isPaused (tor.isPaused ());
const bool isItemSelected ((option.state & QStyle::State_Selected) != 0);
const bool isItemEnabled ((option.state & QStyle::State_Enabled) != 0);
const bool isItemActive ((option.state & QStyle::State_Active) != 0);
painter->save ();
if (option.state & QStyle::State_Selected)
if (isItemSelected)
{
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
QPalette::ColorGroup cg = isItemEnabled ? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !isItemActive)
cg = QPalette::Inactive;
painter->fillRect(option.rect, option.palette.brush(cg, QPalette::Highlight));
}
QIcon::Mode im;
if (isPaused || !(option.state & QStyle::State_Enabled))
if (isPaused || !isItemEnabled)
im = QIcon::Disabled;
else if (option.state & QStyle::State_Selected)
else if (isItemSelected)
im = QIcon::Selected;
else
im = QIcon::Normal;
@ -400,13 +403,13 @@ TorrentDelegate::drawTorrent (QPainter * painter,
qs = QIcon::On;
QPalette::ColorGroup cg = QPalette::Normal;
if (isPaused || !(option.state & QStyle::State_Enabled))
if (isPaused || !isItemEnabled)
cg = QPalette::Disabled;
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active))
if (cg == QPalette::Normal && !isItemActive)
cg = QPalette::Inactive;
QPalette::ColorRole cr;
if (option.state & QStyle::State_Selected)
if (isItemSelected)
cr = QPalette::HighlightedText;
else
cr = QPalette::Text;
@ -416,11 +419,16 @@ TorrentDelegate::drawTorrent (QPainter * painter,
progressBarState = QStyle::State_None;
progressBarState |= QStyle::State_Small;
const QIcon::Mode emblemIm = isItemSelected ? QIcon::Selected : QIcon::Normal;
const QIcon emblemIcon = tor.hasError () ? QIcon::fromTheme ("emblem-important") : QIcon ();
// layout
const QSize m (margin (*style));
QRect fillArea (option.rect);
fillArea.adjust (m.width(), m.height(), -m.width(), -m.height());
QRect iconArea (fillArea.x (), fillArea.y () + (fillArea.height () - iconSize) / 2, iconSize, iconSize);
QRect emblemRect (style->alignedRect (option.direction, Qt::AlignRight | Qt::AlignBottom,
emblemIcon.actualSize (QSize (iconSize / 2, iconSize / 2), emblemIm, qs), iconArea));
QRect nameArea (iconArea.x () + iconArea.width () + GUI_PAD, fillArea.y (),
fillArea.width () - GUI_PAD - iconArea.width (), nameSize.height ());
QRect statusArea (nameArea);
@ -433,11 +441,13 @@ TorrentDelegate::drawTorrent (QPainter * painter,
progArea.moveTop (barArea.y () + barArea.height ());
// render
if (tor.hasError ())
if (tor.hasError () && !isItemSelected)
painter->setPen (QColor ("red"));
else
painter->setPen (option.palette.color (cg, cr));
tor.getMimeTypeIcon().paint (painter, iconArea, Qt::AlignCenter, im, qs);
if (!emblemIcon.isNull ())
emblemIcon.paint (painter, emblemRect, Qt::AlignCenter, emblemIm, qs);
painter->setFont (nameFont);
painter->drawText (nameArea, 0, nameFM.elidedText (nameStr, Qt::ElideRight, nameArea.width ()));
painter->setFont (statusFont);