From 737a814ea0a38b3e32b06f88f2507190930f5db7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 8 Sep 2018 22:12:55 +0200 Subject: [PATCH] Make the knobs and rack buttons more white-theme friendly --- resources/bitmaps/button_distrho-black.png | Bin 0 -> 513 bytes ...n_distrho.png => button_distrho-white.png} | Bin .../bitmaps/button_distrho_down-black.png | Bin 0 -> 735 bytes ...down.png => button_distrho_down-white.png} | Bin .../bitmaps/button_distrho_hover-black.png | Bin 0 -> 947 bytes ...ver.png => button_distrho_hover-white.png} | Bin resources/bitmaps/button_edit-black.png | Bin 0 -> 447 bytes ...{button_edit.png => button_edit-white.png} | Bin resources/bitmaps/button_edit_down-black.png | Bin 0 -> 489 bytes ...it_down.png => button_edit_down-white.png} | Bin resources/bitmaps/button_edit_hover-black.png | Bin 0 -> 691 bytes ..._hover.png => button_edit_hover-white.png} | Bin resources/bitmaps/button_file-black.png | Bin 0 -> 283 bytes ...{button_file.png => button_file-white.png} | Bin resources/bitmaps/button_file_down-black.png | Bin 0 -> 375 bytes ...le_down.png => button_file_down-white.png} | Bin resources/bitmaps/button_file_hover-black.png | Bin 0 -> 729 bytes ..._hover.png => button_file_hover-white.png} | Bin resources/bitmaps/button_gui-black.png | Bin 0 -> 505 bytes .../{button_gui.png => button_gui-white.png} | Bin resources/bitmaps/button_gui_down-black.png | Bin 0 -> 661 bytes ...gui_down.png => button_gui_down-white.png} | Bin resources/bitmaps/button_gui_hover-black.png | Bin 0 -> 865 bytes ...i_hover.png => button_gui_hover-white.png} | Bin resources/resources.qrc | 36 ++++++---- resources/ui/carla_about.ui | 12 ++-- source/frontend/carla_skin.py | 68 +++++++++++++----- source/frontend/carla_widgets.py | 7 +- source/frontend/widgets/pixmapdial.py | 5 ++ 29 files changed, 90 insertions(+), 38 deletions(-) create mode 100644 resources/bitmaps/button_distrho-black.png rename resources/bitmaps/{button_distrho.png => button_distrho-white.png} (100%) create mode 100644 resources/bitmaps/button_distrho_down-black.png rename resources/bitmaps/{button_distrho_down.png => button_distrho_down-white.png} (100%) create mode 100644 resources/bitmaps/button_distrho_hover-black.png rename resources/bitmaps/{button_distrho_hover.png => button_distrho_hover-white.png} (100%) create mode 100644 resources/bitmaps/button_edit-black.png rename resources/bitmaps/{button_edit.png => button_edit-white.png} (100%) create mode 100644 resources/bitmaps/button_edit_down-black.png rename resources/bitmaps/{button_edit_down.png => button_edit_down-white.png} (100%) create mode 100644 resources/bitmaps/button_edit_hover-black.png rename resources/bitmaps/{button_edit_hover.png => button_edit_hover-white.png} (100%) create mode 100644 resources/bitmaps/button_file-black.png rename resources/bitmaps/{button_file.png => button_file-white.png} (100%) create mode 100644 resources/bitmaps/button_file_down-black.png rename resources/bitmaps/{button_file_down.png => button_file_down-white.png} (100%) create mode 100644 resources/bitmaps/button_file_hover-black.png rename resources/bitmaps/{button_file_hover.png => button_file_hover-white.png} (100%) create mode 100644 resources/bitmaps/button_gui-black.png rename resources/bitmaps/{button_gui.png => button_gui-white.png} (100%) create mode 100644 resources/bitmaps/button_gui_down-black.png rename resources/bitmaps/{button_gui_down.png => button_gui_down-white.png} (100%) create mode 100644 resources/bitmaps/button_gui_hover-black.png rename resources/bitmaps/{button_gui_hover.png => button_gui_hover-white.png} (100%) diff --git a/resources/bitmaps/button_distrho-black.png b/resources/bitmaps/button_distrho-black.png new file mode 100644 index 0000000000000000000000000000000000000000..121e29313ef01b3d7af03417c941d9597ae12cce GIT binary patch literal 513 zcmV+c0{;DpP)7Ehtn2wTl1%0g_2XK~yNu zwbS2ARACUt@y~hRv%APDnp-Ru{wgx5F4CLO|DU8QMFS>EOV^&Qt()T4D6W{orc7K86f@XS8TrugRjzVt23m0jV_*N_J z5pT|VZL1u{6oAv{(|`*Fq-+k$n|8Xj42=*&{+r*?QK zD=!0RXkpHdU`<~|RYl*LV85b0e%Cqn-wZj8-XAWIz`|6XCMP=HJbqjWGbS_iKJS~sP zlQ3_|4?R~(Q&yE}ld$S2o&K9Q?&-RF`T1`?<^RP`SEaj&A37dE00000NkvXXu0mjf Da~j}Q literal 0 HcmV?d00001 diff --git a/resources/bitmaps/button_distrho.png b/resources/bitmaps/button_distrho-white.png similarity index 100% rename from resources/bitmaps/button_distrho.png rename to resources/bitmaps/button_distrho-white.png diff --git a/resources/bitmaps/button_distrho_down-black.png b/resources/bitmaps/button_distrho_down-black.png new file mode 100644 index 0000000000000000000000000000000000000000..98981735f2f84959aaacc9906e1327d5ef327a52 GIT binary patch literal 735 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H3?x5i&EaHVU@Q#q32_w_6%`Q?5e5Sx7=Umg z;(~&LKw%)8kB<+?hA?bHl}f z42Ufd5r`CA8IS=q5N;ZT0T%=^-~gx$XabxIaTSD%CWR~ru@oo*bRN)Zi0u$T2njR? z$UycZL_!@hljQC0!qCAg z>jC6&7I;J!GcfQS0b$0e+I-SLLG}_)Usv`=oE*Zs7M@#{z6T0D_jGX#k+{5e!f9`& zM3JNX({#C*T3eXzYAnjo=Q*-T=R~<+$n2)3TOuh=b@%W5Joo48-9op(=@%pCRR1V^ zXxFe`bK|yocOqJ6+Y1Y4Wp`?Axwow&{j8Fy+0<*hCVxD7?&Z3V-yY2HaDPnM<;+KW_YTcqkuO+wjCMw#VvUiI;ygV_U2fyA9}N22WQ%mvv4FO#oE5t%3jm literal 0 HcmV?d00001 diff --git a/resources/bitmaps/button_distrho_down.png b/resources/bitmaps/button_distrho_down-white.png similarity index 100% rename from resources/bitmaps/button_distrho_down.png rename to resources/bitmaps/button_distrho_down-white.png diff --git a/resources/bitmaps/button_distrho_hover-black.png b/resources/bitmaps/button_distrho_hover-black.png new file mode 100644 index 0000000000000000000000000000000000000000..30a938f7b52e8317ba2228a94a9c6d4554b7b01c GIT binary patch literal 947 zcmZWnTSydP7#)i;byt!yG7C#G9}Fv0vIx@JO}C3kDO4DkO5`Q*O0TWN=I*$zJ3H5% z>(0)umrSjcsJA4-3lfxyn)T2_g!T|xgwR80l%9g`pPB#r&v(A>oPXS)S8%o6N-Wmq-mMsz@SP}zpnSF>Lx&77{>3XyxxG%#{~jG zjuQfbu%e(A5*~-c3diBJyR);KB)i;h1V__6O@mP7I3UfjbzK((d7~ZJfCL5%Y#`tz zN!0QT16ok&q6jUhl0}iBD9Y#S@^}ye%VH8p!x7{2dEIWb;3>*PVkDOJcXs+n5_xd4 z6a@n#ih=>40_0Rz7rOYpULc`DWEdS@DGDUOd^Ck>k>`Ol#|{R~j4byWMpV;6l7tp8 z6WUGr3}d#YY13Ys);BH)mj$a4pv9G8izhsX&t^u`dNwlnz*L(i-zwPh8GlSn>(!EL zM8VhjJLab9Qjv}5*mj^8o4Cf}8!ZHp_{Ll@OjcqllCiChEB4qgaXWTpCwy{nr%_{d z*b2+`eyFZIn9$hR+_d&%H54BoM|ODJBuP4o)7=*xQyo*26ItUE6P~OwJ5ydZJCm22 zk~`Yg`fKLr?J?Jdw?|5&%&26gYcuZ+B^uJL3a9aCRLQi>e=M5joUh-VJ$SssdFXKN z(f#TBlTwnWcc#YHWMt&PpUC-#IkudXz0X=63@n}5?rI-P=j#^kx~jUDsT$Y&XCuwM z3;w!fi>179HZQ|sY3r*keST^=b)U2BQhjRo_ivV!_E*C_FNV@4rTp5}-TeLN`epS* z%Upx&<=WR{*Ym5BmVT35?)XY}#p26`(BPkDWBBIN=GnUSy!yFuZpdz3Y+E_mur#s| aaC!)0XIf!ZNe$BkuLy^|#5Q=Yvi&b<&*dxt literal 0 HcmV?d00001 diff --git a/resources/bitmaps/button_distrho_hover.png b/resources/bitmaps/button_distrho_hover-white.png similarity index 100% rename from resources/bitmaps/button_distrho_hover.png rename to resources/bitmaps/button_distrho_hover-white.png diff --git a/resources/bitmaps/button_edit-black.png b/resources/bitmaps/button_edit-black.png new file mode 100644 index 0000000000000000000000000000000000000000..b057035ed05fadb5b4b8c003a26c1f2f1b2e83a0 GIT binary patch literal 447 zcmV;w0YLtVP)7BqtSq6H@>H0Z>UqK~yNu zwUf^;LqQaUzvoVkDph$U`h&#Nm9WvE5>bCYiG-wL(GaOxP^1;9k*Tq0^Sr*i3JdqH zCiCTF?m2fn$M0+E4=f5`0Dw+YWQA8==$L*Sl$dgnSeEqCE5-bRW@&2l2cWstf9fWRucvsUYHIIge=$|j_E{LuW+aXtpOiR7gP$5&t&By zSIkkad1hRn)ph}1!kO5Hx zk%gN8;X*8e3j$RFb@B1>wa>b|1L$AIk|4ie28U-i(m@#zUjU7e?kV~E7%GV|T*#_%pOPeJ+mMexZ3I-}DK76RysipH)>9E4{hc7kzm&Knvd-w3+%cs31ePhnb zs=Ru-v@dU=8FTZz?bD~*iEWo)yjm@lEc*S6!C{f@U%q@P*nUWao%41A*X^o`8;RUZ e?&`0OiZLAM7GmICXHo`q34^DrpUXO@geCyrvuZv7 literal 0 HcmV?d00001 diff --git a/resources/bitmaps/button_edit_down.png b/resources/bitmaps/button_edit_down-white.png similarity index 100% rename from resources/bitmaps/button_edit_down.png rename to resources/bitmaps/button_edit_down-white.png diff --git a/resources/bitmaps/button_edit_hover-black.png b/resources/bitmaps/button_edit_hover-black.png new file mode 100644 index 0000000000000000000000000000000000000000..38805a35ed78b9d01bf4a96e7826e36039100d56 GIT binary patch literal 691 zcmZ9JU1(Ba7{`xRObvGvjM`|_%@`Y_jV@x*g@vXvC!&sUdLb!`0w5^`mlmKa8) zX@G%bSyh)51z;#Hvn)cee_%9?EL9LBjzfxF9KGP%kRXQ$1$fviBnbr=I?FCrtMG9R z&jmJ&W{P4>Q5vQRvC45ZS;lKvlGOMkf&n~uNs!8kCL6s!C9d_rT;C1{hM@zwdAe2X{V{x=Ike?e20s9qk=}*i#5k2YNocT?d9nQop=8NRPw* z)5(L|b6I*YJNNBVdua2`u_MEG0-0na<1F1sO-|-o^WXbr=gC!H>;2o#-kDBoYvbeD zoe!IX)9coPT3Wj&Jv&icp>Fx;U@V^x4J+3!Bny#ThP-ssc{lMSaq4G$duyV7+{#_H zcCL)KclUc19=@I$Z@=3Z9Z{8um$T_}Gmpkx#q?~oFHMZ42YwvwqrL!+2nV8m<4pGU EZ$U_C-v9sr literal 0 HcmV?d00001 diff --git a/resources/bitmaps/button_edit_hover.png b/resources/bitmaps/button_edit_hover-white.png similarity index 100% rename from resources/bitmaps/button_edit_hover.png rename to resources/bitmaps/button_edit_hover-white.png diff --git a/resources/bitmaps/button_file-black.png b/resources/bitmaps/button_file-black.png new file mode 100644 index 0000000000000000000000000000000000000000..87783eb52c018d445384b83f57b6ea9259f3071c GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H0wnYHF4+L2n3BBRT^Rni_n+Ah4nJ z@ErkR#;MwT(m+A>5>H=O_D7r?!g|sN{=&Si^-6uHNIYgMLbWo zol(4sdGCMLE6N?S7yW2+1#F2U|}*Q~jy1N8my9K`BKw4Y{;xjZ1~j zY@uJW-YoJ=TVAFTR^oS%Cpt$d;skS=iMY2_Ynbwnh_Gd=1TUqA*SWm&Ubc6q@%pzC zP1CqvM(OW4y;m_~u@bEy?aB^~TfB`!@yZ2G8WkBl~OM?7@ z862M7NCR<_yxm;OkH}&M2EHR8%s5q>PZ}u5UgGKN%KnIxLs(CvUhf%5 zU9YE$V~E7%t>^CY9a7+Fd-(E-L}_x~pDkNj@BR;6cXKpSNVx{d-+gyKqo TzW!Y<&|wUou6{1-oD!M)y-J>J&27VhKL68Q; zkaP@o(P`G#!g~BPg(64|HhNzvOC=KjW4%y#kVnkl*j8 zX}8l!IUFR8yD7>`QEWI23~7#w1Ok4yn|3;#IR4yXv75~fyWK;QL7y)Xi7;L-VYk~b z%xpAbdc76H;-L_zPy}JeFr!v$&}vOOoz-N5Tk%LF;PKck7QIHJQ>#q|18%dqNYd|e z+014@(gXo6;MAzoSxhDuK_p>zpAWZMfdSZH1`kCou`F2dxm=(Eia?l4rN9w*^wKm< zk_3*sC@Rb_`E(i{BoqjME*J!-FvHsN@=7KHB%l=wg~E%A005`Y4DUMOGitPBBjbqV zXn*#!cswkZBCfj2Lr|deLk~3w(ztn=HPN2NOVH$L6%S;*1GN5P@6GD)wH0XXE2MXn ztvfT**|zCNs+r37!-Kq%AP$;_F6pMsn!DyHrA5{*DCWVvZdt2r0@^0|6 zOt9O3{g(LljlRAe@mqNs*9Qholf&-OCtFFYx`&M_(!$6 zQ9Umah#Ja#buFLwjdQl6^uPeOf9|i7l%L2uQMpY1e)DUo^rf!U-Hvv5U0prlxS%n75BPLz#KDJLiP%F3yUUGY{Mf|QKCJs(w9 Q7QiE-kc~)R4o*A%0d7-HA^-pY literal 0 HcmV?d00001 diff --git a/resources/bitmaps/button_file_hover.png b/resources/bitmaps/button_file_hover-white.png similarity index 100% rename from resources/bitmaps/button_file_hover.png rename to resources/bitmaps/button_file_hover-white.png diff --git a/resources/bitmaps/button_gui-black.png b/resources/bitmaps/button_gui-black.png new file mode 100644 index 0000000000000000000000000000000000000000..17751ee76e0daf4188e64f128458be7aaa669e32 GIT binary patch literal 505 zcmV7F9*%!>QDdx0g6dPK~yNu zwUfia56s->2RB=8#|rP&qsLq3yt2~YO4jy2YD8E8jU%2D zYDz-x)}Wk3kW%Q9Pp)j36_63Q*S2Cvi>WWbmK?Ij2lw6vjO>eV1nekN^tZAUDbr5F z>`OC_?3?$0fEuUF-C|2K*BlV?6F@1?fQ6e@RYhDk-B8zt47hTa0GjZNuPk_Chkg#; zS>vFo1!&Qw~B`9YYYY?Zsv+gPMekU0M4_by$QO)%}6%j{EnF$ z;+mP5n>%K55Ln3zh8Fwp;FtE2wqY>`wA@Dk9dnGB`(@prU1e%jeyVewE3Hl~W!k+r zZuVJI>8@H-BMu?o0 vf@bTs({&_JPiKl0=}bM4)cMDs^8f5NEe(Ej2xyV@00000NkvXXu0mjfFlXK= literal 0 HcmV?d00001 diff --git a/resources/bitmaps/button_gui.png b/resources/bitmaps/button_gui-white.png similarity index 100% rename from resources/bitmaps/button_gui.png rename to resources/bitmaps/button_gui-white.png diff --git a/resources/bitmaps/button_gui_down-black.png b/resources/bitmaps/button_gui_down-black.png new file mode 100644 index 0000000000000000000000000000000000000000..cf56fec5a028cc1e47c6842c8e52b74ad49500b5 GIT binary patch literal 661 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H3?x5i&EaHVU~~!a32_w_6%_#kAOi@5goFeI z1%-u$fnpF5AR8hG6zAvX7Z4BtGJpWC2Eqn%feb!AK8OOKN^UUVf&m^L9$sEvpiw{t zKrtW}s2HLP$OTFPwE$%~IXQv)fKm{ZKrT=vPz0g?NCE*w4NwqbCPWY-4m1j=7bp%? z17t&-0hEH62Gjx+gaC*GfC_-J5OIisKye@dvVmHFJ_3dV(7`}uK&JvthS&vB05k`v z0BDh}p{qJDSQ$%#{DK)Ap4~_Tagw~Fdh=h?7HDU(nJZo)IW?%G1R$MB?(=3Fo;P9Yv1MXBKz0)ZkjEvcF!>Q>4qnvQVJx z?78amfBu(GzBw!R_T(D<&o6`DpWV*>Az7%?V)h>UAi=Lb%qcPY+!J=UAB*R|F1)Yr z!<{`}S;IYClw2ZtbTxlQtYZktb}7x4W;!WgY|4Byt9p`EoAs^o>i9SNSw9_kp{RZA zqWE#)`4w4P7Jto=TN61UsBOa4OaFEzg+?>yY&)?#;NaeQs#AnI`LD^TZd|uu@%+hO u4>4L8&o6cEn)CWlP4DhEZ(07IW#;nBXHc9qD=bz4`taSiWty6E*FOAbh>#S!HU<*uNmQVLY7B89_06O zoZI0L>~_v(bFpmH$nSP5g23DDPKFs|7}jE8tyXN23JgA;chEEx8%@&|i*;atHk+Yv z4o8#_`H?{y9JG<7jiRC=B1w~p8W`a0c3@8^Nr%L!~0mqkPn5w_4$jQ=4&Vm;#Xjrx2j4R?Vsj$sfFFI0riz{`uK zxm>a&NlqsQL|{l92go6h2d8h(X(ZfzOjot8hA3S6&>Gn^m6w$eh7Fk-Y}6f^`c8sK znv2XBHaBSp#P}|4Woi7PT9tMC@9cE9>s@FZanUU$?Lq!pkiMs&^ls{3i7aA-_Mg zpkGR#?YP)m*49*4+|yHB*VLBWF#CA?W^hhhznfMn_~SR?f=qqksb1ZWhOB~JhdQ<% eY?w9N9w7+o(&_aX`jp5|L}*KOC4sYzcm4v>#bitmaps/button_calf3_down.png bitmaps/button_calf1_hover.png bitmaps/button_calf2_hover.png - bitmaps/button_distrho.png - bitmaps/button_distrho_down.png - bitmaps/button_distrho_hover.png - bitmaps/button_edit.png - bitmaps/button_edit_down.png - bitmaps/button_edit_hover.png - bitmaps/button_file.png - bitmaps/button_file_down.png - bitmaps/button_file_hover.png - bitmaps/button_gui.png - bitmaps/button_gui_down.png - bitmaps/button_gui_hover.png + bitmaps/button_distrho-black.png + bitmaps/button_distrho-white.png + bitmaps/button_distrho_down-black.png + bitmaps/button_distrho_down-white.png + bitmaps/button_distrho_hover-black.png + bitmaps/button_distrho_hover-white.png + bitmaps/button_edit-black.png + bitmaps/button_edit-white.png + bitmaps/button_edit_down-black.png + bitmaps/button_edit_down-white.png + bitmaps/button_edit_hover-black.png + bitmaps/button_edit_hover-white.png + bitmaps/button_file-black.png + bitmaps/button_file-white.png + bitmaps/button_file_down-black.png + bitmaps/button_file_down-white.png + bitmaps/button_file_hover-black.png + bitmaps/button_file_hover-white.png + bitmaps/button_gui-black.png + bitmaps/button_gui-white.png + bitmaps/button_gui_down-black.png + bitmaps/button_gui_down-white.png + bitmaps/button_gui_hover-black.png + bitmaps/button_gui_hover-white.png bitmaps/button_off.png bitmaps/button_on.png diff --git a/resources/ui/carla_about.ui b/resources/ui/carla_about.ui index 485f25008..cd1f19f23 100644 --- a/resources/ui/carla_about.ui +++ b/resources/ui/carla_about.ui @@ -281,7 +281,7 @@ - + 22 @@ -298,12 +298,12 @@ - :/bitmaps/button_gui_down.png + :/bitmaps/button_gui_down-white.png - + 22 @@ -320,12 +320,12 @@ - :/bitmaps/button_edit_down.png + :/bitmaps/button_edit_down-white.png - + 22 @@ -342,7 +342,7 @@ - :/bitmaps/button_file_down.png + :/bitmaps/button_file_down-white.png diff --git a/source/frontend/carla_skin.py b/source/frontend/carla_skin.py index ca309b0be..4a47dd000 100755 --- a/source/frontend/carla_skin.py +++ b/source/frontend/carla_skin.py @@ -168,7 +168,7 @@ def getColorFromCategory(category): # ------------------------------------------------------------------------------------------------------------ # -def setPixmapDialStyle(widget, parameterId, parameterCount, skinStyle): +def setPixmapDialStyle(widget, parameterId, parameterCount, darkStyle, skinStyle): if skinStyle.startswith("calf"): widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_NO_GRADIENT) widget.setPixmap(7) @@ -185,8 +185,10 @@ def setPixmapDialStyle(widget, parameterId, parameterCount, skinStyle): else: if parameterId == PARAMETER_DRYWET: widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_CARLA_WET) + elif parameterId == PARAMETER_VOLUME: widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_CARLA_VOL) + else: _r = 255 - int((float(parameterId)/float(parameterCount))*200.0) _g = 55 + int((float(parameterId)/float(parameterCount))*200.0) @@ -194,8 +196,15 @@ def setPixmapDialStyle(widget, parameterId, parameterCount, skinStyle): widget.setCustomPaintColor(QColor(_r, _g, _b)) widget.setCustomPaintMode(PixmapDial.CUSTOM_PAINT_MODE_COLOR) + if darkStyle: + colorEnabled = QColor("#BBB") + colorDisabled = QColor("#555") + else: + colorEnabled = QColor("#111") + colorDisabled = QColor("#AAA") + + widget.setLabelColor(colorEnabled, colorDisabled) widget.setPixmap(3) - widget.forceWhiteLabelGradientText() # ------------------------------------------------------------------------------------------------------------ # Abstract plugin slot @@ -218,6 +227,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): self.fPluginInfo = host.get_plugin_info(self.fPluginId) self.fSkinColor = skinColor self.fSkinStyle = skinStyle + self.fDarkStyle = QColor(skinColor[0], skinColor[1], skinColor[2]).blackF() > 0.4 # ------------------------------------------------------------- # Internal stuff @@ -347,37 +357,54 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): def ready(self): self.fIsActive = bool(self.host.get_internal_parameter_value(self.fPluginId, PARAMETER_ACTIVE) >= 0.5) - isCalfSkin = self.fSkinStyle.startswith("calf") and not isinstance(self, PluginSlot_Compact) + isCalfSkin = self.fSkinStyle.startswith("calf") and not isinstance(self, PluginSlot_Compact) + imageSuffix = "white" if self.fDarkStyle else "black" if self.b_enable is not None: self.b_enable.setChecked(self.fIsActive) self.b_enable.clicked.connect(self.slot_enableClicked) if isCalfSkin: - self.b_enable.setPixmaps(":/bitmaps/button_calf3.png", ":/bitmaps/button_calf3_down.png", ":/bitmaps/button_calf3.png") + self.b_enable.setPixmaps(":/bitmaps/button_calf3.png", + ":/bitmaps/button_calf3_down.png", + ":/bitmaps/button_calf3.png") else: - self.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png") + self.b_enable.setPixmaps(":/bitmaps/button_off.png", + ":/bitmaps/button_on.png", + ":/bitmaps/button_off.png") if self.b_gui is not None: self.b_gui.clicked.connect(self.slot_showCustomUi) self.b_gui.setEnabled(bool(self.fPluginInfo['hints'] & PLUGIN_HAS_CUSTOM_UI)) if isCalfSkin: - self.b_gui.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_calf2.png", + ":/bitmaps/button_calf2_down.png", + ":/bitmaps/button_calf2_hover.png") elif self.fPluginInfo['iconName'] == "distrho" or self.fSkinStyle in ("3bandeq","3bandsplitter","pingpongpan", "nekobi"): - self.b_gui.setPixmaps(":/bitmaps/button_distrho.png", ":/bitmaps/button_distrho_down.png", ":/bitmaps/button_distrho_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_distrho-{}.png", + ":/bitmaps/button_distrho_down-{}.png", + ":/bitmaps/button_distrho_hover-{}.png") elif self.fPluginInfo['iconName'] == "file": - self.b_gui.setPixmaps(":/bitmaps/button_file.png", ":/bitmaps/button_file_down.png", ":/bitmaps/button_file_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_file-{}.png".format(imageSuffix), + ":/bitmaps/button_file_down-{}.png".format(imageSuffix), + ":/bitmaps/button_file_hover-{}.png".format(imageSuffix)) else: - self.b_gui.setPixmaps(":/bitmaps/button_gui.png", ":/bitmaps/button_gui_down.png", ":/bitmaps/button_gui_hover.png") + self.b_gui.setPixmaps(":/bitmaps/button_gui-{}.png".format(imageSuffix), + ":/bitmaps/button_gui_down-{}.png".format(imageSuffix), + ":/bitmaps/button_gui_hover-{}.png".format(imageSuffix)) if self.b_edit is not None: self.b_edit.clicked.connect(self.slot_showEditDialog) if isCalfSkin: - self.b_edit.setPixmaps(":/bitmaps/button_calf2.png", ":/bitmaps/button_calf2_down.png", ":/bitmaps/button_calf2_hover.png") + self.b_edit.setPixmaps(":/bitmaps/button_calf2.png".format(imageSuffix), + ":/bitmaps/button_calf2_down.png".format(imageSuffix), + ":/bitmaps/button_calf2_hover.png".format(imageSuffix)) else: - self.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png") + self.b_edit.setPixmaps(":/bitmaps/button_edit-{}.png".format(imageSuffix), + ":/bitmaps/button_edit_down-{}.png".format(imageSuffix), + ":/bitmaps/button_edit_hover-{}.png".format(imageSuffix)) else: # Edit button *must* be available @@ -494,6 +521,13 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): styleSheet2 = "background-color: rgb(%i, %i, %i);" % self.fSkinColor styleSheet2 += "background-image: url(:/bitmaps/background_noise1.png);" + if self.fDarkStyle: + colorEnabled = "#BBB" + colorDisabled = "#555" + else: + colorEnabled = "#111" + colorDisabled = "#AAA" + styleSheet = """ QFrame#PluginWidget { %s @@ -503,9 +537,9 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): QLabel#label_audio_in, QLabel#label_audio_out, QLabel#label_midi, - QLabel#label_presets { color: #BBB; } - QLabel#label_name:disabled { color: #555; } - """ % styleSheet2 + QLabel#label_presets { color: %s; } + QLabel#label_name:disabled { color: %s; } + """ % (styleSheet2, colorEnabled, colorDisabled) styleSheet += """ QComboBox#cb_presets, @@ -560,7 +594,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): if isInteger: widget.setPrecision(paramRanges['max']-paramRanges['min'], True) - setPixmapDialStyle(widget, i, parameterCount, self.fSkinStyle) + setPixmapDialStyle(widget, i, parameterCount, self.fDarkStyle, self.fSkinStyle) index += 1 self.fParameterList.append([i, widget]) @@ -571,7 +605,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): widget.setLabel("Dry/Wet") widget.setMinimum(0.0) widget.setMaximum(1.0) - setPixmapDialStyle(widget, PARAMETER_DRYWET, 0, self.fSkinStyle) + setPixmapDialStyle(widget, PARAMETER_DRYWET, 0, self.fDarkStyle, self.fSkinStyle) self.fParameterList.append([PARAMETER_DRYWET, widget]) self.w_knobs_right.layout().addWidget(widget) @@ -581,7 +615,7 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): widget.setLabel("Volume") widget.setMinimum(0.0) widget.setMaximum(1.27) - setPixmapDialStyle(widget, PARAMETER_VOLUME, 0, self.fSkinStyle) + setPixmapDialStyle(widget, PARAMETER_VOLUME, 0, self.fDarkStyle, self.fSkinStyle) self.fParameterList.append([PARAMETER_VOLUME, widget]) self.w_knobs_right.layout().addWidget(widget) diff --git a/source/frontend/carla_widgets.py b/source/frontend/carla_widgets.py index 920b4e081..3af22c994 100755 --- a/source/frontend/carla_widgets.py +++ b/source/frontend/carla_widgets.py @@ -79,10 +79,11 @@ class CarlaAboutW(QDialog): "
Copyright (C) 2011-2018 falkTX
" "" % (VERSION, extraInfo))) - if self.ui.about.palette().color(QPalette.Background).blackF() > 0.5: - self.ui.l_icons.setPixmap(QPixmap(":/bitmaps/carla_about_white.png")) - else: + if self.ui.about.palette().color(QPalette.Background).blackF() < 0.5: self.ui.l_icons.setPixmap(QPixmap(":/bitmaps/carla_about_black.png")) + self.ui.ico_example_edit.setPixmap(QPixmap(":/bitmaps/button_file-black.png")) + self.ui.ico_example_file.setPixmap(QPixmap(":/bitmaps/button_edit-black.png")) + self.ui.ico_example_gui.setPixmap(QPixmap(":/bitmaps/button_gui-black.png")) if host.isControl: self.ui.l_extended.hide() diff --git a/source/frontend/widgets/pixmapdial.py b/source/frontend/widgets/pixmapdial.py index 510dd2d83..9191a4e3c 100644 --- a/source/frontend/widgets/pixmapdial.py +++ b/source/frontend/widgets/pixmapdial.py @@ -140,6 +140,11 @@ class PixmapDial(QDial): self.fLabelGradientColor2 = QColor(0, 0, 0, 0) self.fLabelGradientColorT = [Qt.white, Qt.darkGray] + def setLabelColor(self, enabled, disabled): + self.fLabelGradientColor1 = QColor(0, 0, 0, 255) + self.fLabelGradientColor2 = QColor(0, 0, 0, 0) + self.fLabelGradientColorT = [enabled, disabled] + def updateSizes(self): self.fPixmapWidth = self.fPixmap.width() self.fPixmapHeight = self.fPixmap.height()