From f8dfa03d4f3a40990b3461f64ac0a5d479fab7d8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 16 Jul 2014 09:56:23 +0200 Subject: [PATCH] Core: High-Dpi rendering of ManhattanStyle PE_PanelLineEdit New @2x variants for inputfield.png and inputfield_disabled.png. Loading them with Utils::StyleHelper::dpiSpecificPixmap(). Small adjustments for resolution independent drawing of the focus/hover rect. Change-Id: I6e1322e597c1fca7fc4ff7cce8801e99ce03e57a Reviewed-by: Eike Ziller --- src/plugins/coreplugin/core.qrc | 2 + src/plugins/coreplugin/images/inputfield.png | Bin 379 -> 293 bytes .../coreplugin/images/inputfield@2x.png | Bin 0 -> 529 bytes .../coreplugin/images/inputfield_disabled.png | Bin 379 -> 332 bytes .../images/inputfield_disabled@2x.png | Bin 0 -> 597 bytes src/plugins/coreplugin/manhattanstyle.cpp | 6 +- src/tools/icons/qtcreatoricons.svg | 137 +++++++++++------- 7 files changed, 89 insertions(+), 56 deletions(-) create mode 100644 src/plugins/coreplugin/images/inputfield@2x.png create mode 100644 src/plugins/coreplugin/images/inputfield_disabled@2x.png diff --git a/src/plugins/coreplugin/core.qrc b/src/plugins/coreplugin/core.qrc index b55908bc60e..301bfdb1104 100644 --- a/src/plugins/coreplugin/core.qrc +++ b/src/plugins/coreplugin/core.qrc @@ -17,7 +17,9 @@ images/logo/128/QtProject-qtcreator.png images/logo/32/QtProject-qtcreator.png images/inputfield.png + images/inputfield@2x.png images/inputfield_disabled.png + images/inputfield_disabled@2x.png images/linkicon.png images/linkicon@2x.png images/locked.png diff --git a/src/plugins/coreplugin/images/inputfield.png b/src/plugins/coreplugin/images/inputfield.png index 40bdfc4a048fcde317a295c3ea224865bd034f73..965e9f55a435e91bcd741ff23fa4bcaac6c3586f 100644 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4rT@h1`S>QU#twG{{R2az`&rWsF<6Z z+t=3zHh_VRjSa$Rd@^$Z0|SF}NswQ#lrcK6wY9ZvXm3AuCWygWgMon|!_&nvL}KdN zenY-P4m>RBxy>wIlb`+jZznZL?1ZlC4w02Ji?(blbM-d-@Gao-@5+v!k4{||x@G*$ zDBe3e^UjTIZKYBbp4KVtH(VA5{Bh~`V|d)o!lM39$tJOXkH=O_M05?Jkkt_hi`6V zU|{&|>EalYaqsOdLoa4Wk%ou)lfE)I`lLQj)j7hwWZP+5ot(FO8n-TZP`V|6+ye=%on%bICJg~YhJY@{|a~y ze-OUEs_5jD1isBS(p{og@9)35MuO|eGJ&Zbfs0v_6xkDpMilvS6A1_ z$jIE>+|kj|&CSi*+dCj2ASx;Gy}hTWXX3<()22?%TKT@ZrNJPMkP<_U!fR*YDi9^YG!rXV0F!e*OBxhYw%Be*N|9 z7sM_G1_m)PF>i10#Kc4fFkoe6WoKsxGZ94D^OkE23=GC4L4Lsu#zX*fD=RCjwA|d> z3A>J;K4W|<59G%$o-U3d7N_4%_Vsfz6lvXG9IfDXR8u4vD_(|tjhiWTLX(-cowQgx{o@Xs^S2Gw)kUWJmD}e(dThDV eK4<0f@_me^9{KN>sw*`?f$8b$=d#Wzp$Py5t<&NF literal 0 HcmV?d00001 diff --git a/src/plugins/coreplugin/images/inputfield_disabled.png b/src/plugins/coreplugin/images/inputfield_disabled.png index b713a59c8a056058411f1f7b383340a906b4d41e..b09e2ce4cf8502a8f71561857d52c482e68016a7 100644 GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4rT@h1`S>QU{gns34t3S=bo6jn3eS=4*b}r>ZR@HZqAgiHs>=c&aRtrZro8sz xq^7rd-?l#3|9|s-hV9?ZZ_J#}_&oWMtlxH=O_M05?JkrXCm#jF< zz`*d^)5S3)3@IhUbt$(VNtyToy^v9n+N+6T7zvKGuyW9S^UcKh-4gBUZFVC z{*TSF-!@L#rLj>=@zbuuLh}_raNqVw=2{b-B7QKsEbxtTz2)5fxQ6O+(L4O~aMJNi*Mi-ktJa zW!jV*Q;rfQs^9s;#C+Gr$Kv4gZ43+y44$rjF6*2UngDU#oFo7M diff --git a/src/plugins/coreplugin/images/inputfield_disabled@2x.png b/src/plugins/coreplugin/images/inputfield_disabled@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7ef857806d6942c48b8767a66ed55d84f6f7d060 GIT binary patch literal 597 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4rT@h2A3sW#~2tG_6GQbxc>kDp8*EsF(lv$ON^^2*A} zs;a6Q8yj0&TRS^DdwY8)PMkPn#*8_0<}6sSV9Amt%a<=-y?XWf_3Jlp-ps(jU}a_H z>+8$Fz#u3nXklUD=H>>mpM`~mot>S5fq{jEg^i63B8Z<9`M0!#fq}ukB*-tAfy3OH zAaHSW^YrxeOe-oXs;H=#FnQ*#efy7}K6Cc`1>p+jDGUsZ9G)(YAr}5`CmH%N8w$AI zm#_A82ozbU5E$UZ&RX!F`$B+&yPku%qJT=`U(GV%iM=}+_iuW(cjNJCtcBCvu58Mi z&fWbwGQ_Z9`gzM`PyfDN+O__e`eyID{r2-#NjymVHB(r-Rpo+y(uUZuC3iM>cwUlY zPu?9nM>f?%)9I4KhS)1k>Q7$r-Dfg#G3mOHz&8C-&K*umC0;)U_vj*Z53hyIvOP=V zI5fYdPY4xRDt_Ui>B9A?zr>~Z9?G%En0*&)y0K1M;s$5^^Y|OWH6D9}V-C+v>fkMQ z{_b7Re&G3mteJTiKE&Zg0MvELT)H+fS|d)yGX7kIYO%_hia* Y+rRY77vAS)F9?bNPgg&ebxsLQ0ORJ)2LJ#7 literal 0 HcmV?d00001 diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 730268fc88c..9317802865c 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -130,8 +130,8 @@ public: }; ManhattanStylePrivate::ManhattanStylePrivate() : - lineeditImage(QLatin1String(":/core/images/inputfield.png")), - lineeditImage_disabled(QLatin1String(":/core/images/inputfield_disabled.png")), + lineeditImage(Utils::StyleHelper::dpiSpecificPixmap(QStringLiteral(":/core/images/inputfield.png")).toImage()), + lineeditImage_disabled(Utils::StyleHelper::dpiSpecificPixmap(QStringLiteral(":/core/images/inputfield_disabled.png")).toImage()), extButtonPixmap(QLatin1String(":/core/images/extension.png")), closeButtonPixmap(QLatin1String(Core::Constants::ICON_CLOSE)) { @@ -463,7 +463,7 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption hover.setAlpha(50); painter->setPen(QPen(hover, 1)); - painter->drawRect(option->rect.adjusted(1, 1, -2 ,-2)); + painter->drawRect(QRectF(option->rect).adjusted(1.5, 1.5, -1.5, -1.5)); } painter->restore(); } diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index 9f5e4f1fee8..05a0cee4263 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -51,17 +51,6 @@ offset="1" id="stop3873" /> - - - - - + + + + + + + + + + + + transform="translate(-211,-80)" + style="opacity:1;stroke:none"> + + + - - + y="584.5" + ry="2" /> - + x="0" + style="filter:url(#filter3230)" /> +