From f7969f838116d76feb72c978f49a65eeaee290e6 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 22 Mar 2016 21:00:42 +0300 Subject: [PATCH] ui improvements and bug fix --- src/images/accept.png | Bin 469 -> 2481 bytes src/images/call.png | Bin 0 -> 1158 bytes src/list_items.py | 4 ++-- src/mainscreen.py | 7 +++++-- src/profile.py | 6 ++++-- src/styles/style.qss | 1 + 6 files changed, 12 insertions(+), 6 deletions(-) create mode 100755 src/images/call.png diff --git a/src/images/accept.png b/src/images/accept.png index 5612f2693f46c3bb960c093ec6176e68a7b7aa73..5b0fba644310da4c1e5edb71677bcedb24565842 100755 GIT binary patch literal 2481 zcmZ`*dpJ~E8{Zhi7?)uf6RDvyZZnD;N^)(GWIj*FWz)o_T#6z!iHb2U&EQmDr*UaK zE`8F)V7p9DBFBtd84i+LN|&RY@HJEvxqN#%U(flT=Y0LK_I~&Kd)K?x+UvL0@8$Z? zJ=9e6Q~&@_^W06_2LN(Zq@^gM5zmLnkH`mriQ64`0sydhS(5{<77`IB>EP~t-T;t9 z1^`wX04%N{@3#QJv;=@D2mp5E1AuPq<&buFr2jTgnv3u0Co|8+{yDZCm)UQ)M{YZ6 za$@;lX>q5Y-n47hN<#66CSA>#v+^^6(mT>Gy3Xuy3?P!nQJrA`g+(4B`J0EoJns!% zS)K1RpSzuq{2;dO?DBL3#uRtMV=d9h81ymnsb02M+zXfZmTg$vDJFwHw!Tj19OtyC z>E`dOv3Zc8uehDLyq;iiaBwlP5H4BlIQ1l6>?+u4!fub;HtRTBph=Bkl)A$>$}|fa zEdw<~;y3l1l?k@j=MltR@Cy`*588sl@_X-L2(|{w1Z78dMo)x+B9^Z@Z3Y7Di~$x? zhZKU{%_6x?iNChKTJ&_qdh;X=+wX^}p9wWM_bOhYi7rPFg)G+j6kV z(1;DCIvar;4=KJHO7$_4&Eh9@wjxPpP|W@`6qN}qNKTm`b0Wy!Y{c<3P_ag+bOs%4KG%|02PGc2T*yvJ41D3WA8sPSCM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xEuBQYscvzx<9gW2bN&_%l!P}#k--EWg6L0fdMAeB(<`ha0lefbni$is)!Au zyxbL57wA+7FKLu}M?RBX%1MdMlw*vF_vc%U>*?D=d)E8#`D3_+DaV)EW+t_F)yIOi5 zmxZ6y7f+Gm$z@0C+q!gD51Sy9ys$p0ChRem(WRVd35;94@6`m!Hc zkvttyI2OgQ@7)U$=v;yK7l!5K6V(GDiBL{Q4GJ0x0000DNk~Le0000o0000$2nGNE09e%|dyyeSe*s%b zL_t(|+U%M^vcoV4LoFuvzd_H+-*wUHwEiIB*u~pAE-wNsCxN?<6UH^h7l_M@ErQ6*F9Gr5>!gY-8Fm9TDA!jif?X7ufxylns8FVhy+M>-t9lm>tPiFl zD{ZoW`+wU2Vk!>X2;yTrwi(26e_hL&AP`y(Fcq0Srh*I*@@2N_4of*=V4RZT<`$-pR_H8QEChVg717dbc&bRiGS1-sZ; zfl0lVI#sC7TIqhhvN@=2yjPuZtUz|JIH*Nl^dJE4qV=C$@=i8BwT>kYb5v{?C~BlS z7$kmoRoB9bv@}v$Md#Aa`^tR;h03{lLxft1cZ#UKQaI|373&=$R)fftcm?rQ0qmAq za%E>sqqiar^1~okq_A!(fVHfu#O>=8`_00000NkvXX Hu0mjftvsx) diff --git a/src/images/call.png b/src/images/call.png new file mode 100755 index 0000000000000000000000000000000000000000..ca7b586c308ab20d1f15340cd8038c97eecd86ca GIT binary patch literal 1158 zcmYjRYfxKN5I*;ELqmXY39ncJ+{RQMp@OY+0#v!NsU~zlptMZ@0f7z$oZ)2$8eR!1 zBv|k!rBEZ5LQ|zQqyz@~n1VQ@4p=KST5(V)1|$aBp~xUmDD?*Y;q2`B_UyNN&hD9= zql}Av%bB*51^{pt2?Yrxj@XoHPp(~J{RI*n3WSnk036+H3IR{|G67UmCCmv1m)t?E`njd1TyB4cF9@6uD zXro^M{)xGbrrz_%^5(4}6Te?rTYt7-nd|qnmKIvPlH1~X`XddxIBHXwT-N4qFzWE3 zxbOf+R&K#F>3jU4IBS?>nh3k;OJ(KCv*ZVflw~KlX5zKx;HePn0d%3QX}pU<=NGX^ zzMkZtmjCR<(~f0Ny=~Bb&23sCJPep=ty=6Nadl+ZhbUHv)L=21GyQ_Vl*aA3kt*^O zz=Egt=s4FpT&$p|QVbm2CR$O_$5mBjm8+^&^A%^}No%5By!bAX2+u|^iH=v%+9X+d zVVLYlIHuZs7(yllMHP!(FWZ^#(+Fh&2pq$RfJn49Q3ir=RxFfp2vHmi#1S1(nV?Ts zew?TSYzLIvuEk*n#D>hByKz8Nu zx*9zdc}>8;-oAm$Cd<~O_UaVDR8A+=IDG4W4CadIB{0I^vX2J~f1)U^Zl`g^>Tp=0 zjmC8fAQ#9=PkLb|jv)*jlOw38UM6;hU?mv!;*gdQ$Pq@^%?y6~a97OW*yA=kZtcNB4+nJw^jgn^lWX=u>UF2aEseJx%%ZhZur(G9J@y0naug|fxX?{(Y%!F zm3~LcLnXw{<1gDfAzQ@RIQbNW3|8nIuxfH|u0V{%O0X0dfa{dN@RH{50obUaqOHV~ zx6K3Hkpgo86_uP_kHP>%X{efQ-apIZK{b^4)}x~30RYojda*t&9l&>6#0eq3SeOA} z%1#a*4P2ec!PDh1TEY7cqF_b$T`Xh#f5(v=NTuw<>wIal7#;OE9I?X~cDM&KZCPA! zt(;PLPyOFi8|y}-rNZWhJqi!iN;hU&q8QjczLA~?qwgDorH-PUF#odQ1S^xw%+tbJ z!Q+B6K$X<*i&{zouWS~zNYL>;eM5zFWZ<_mJX>J&470+1DW!dXs9ucbwVQa`pbi~` u5chNPr5J26H8ePyGDF9@1AG+YTTb9Ee(4gOTYj4SLxAW|tU&)pdi6h=hrU7p literal 0 HcmV?d00001 diff --git a/src/list_items.py b/src/list_items.py index e96e49b..3132a4e 100644 --- a/src/list_items.py +++ b/src/list_items.py @@ -227,7 +227,7 @@ class FileTransferItem(QtGui.QListWidget): def cancel_transfer(self, friend_number, file_number): pr = profile.Profile.get_instance() pr.cancel_transfer(friend_number, file_number) - self.setStyleSheet('QListWidget { background-color: red; }') + self.setStyleSheet('QListWidget { background-color: #B40404; }') self.cancel.setVisible(False) self.accept.setVisible(False) self.pb.setVisible(False) @@ -243,7 +243,7 @@ class FileTransferItem(QtGui.QListWidget): def update(self, state, progress): self.pb.setValue(int(progress * 100)) if state == TOX_FILE_TRANSFER_STATE['CANCELED']: - self.setStyleSheet('QListWidget { background-color: red; }') + self.setStyleSheet('QListWidget { background-color: #B40404; }') self.cancel.setVisible(False) self.accept.setVisible(False) self.pb.setVisible(False) diff --git a/src/mainscreen.py b/src/mainscreen.py index 7b268ad..9f776ec 100644 --- a/src/mainscreen.py +++ b/src/mainscreen.py @@ -190,9 +190,12 @@ class MainWindow(QtGui.QMainWindow): self.account_status.setFont(font) self.account_status.setObjectName("account_status") self.callButton = QtGui.QPushButton(Form) - self.callButton.setGeometry(QtCore.QRect(550, 30, 75, 30)) + self.callButton.setGeometry(QtCore.QRect(550, 30, 50, 50)) self.callButton.setObjectName("callButton") - self.callButton.setText(QtGui.QApplication.translate("Form", "Start call", None, QtGui.QApplication.UnicodeUTF8)) + pixmap = QtGui.QPixmap(curr_directory() + '/images/call.png') + icon = QtGui.QIcon(pixmap) + self.callButton.setIcon(icon) + self.callButton.setIconSize(QtCore.QSize(50, 50)) QtCore.QMetaObject.connectSlotsByName(Form) def setup_left_center(self, widget): diff --git a/src/profile.py b/src/profile.py index 2e727ae..b80dbfd 100644 --- a/src/profile.py +++ b/src/profile.py @@ -733,8 +733,8 @@ class Profile(Contact, Singleton): friend = self.get_friend_by_number(friend_number) if settings['allow_auto_accept'] and friend.tox_id in settings['auto_accept_from_friends']: path = settings['auto_accept_path'] or curr_directory() - self.accept_transfer(path + '/' + file_name.decode('utf-8'), friend_number, file_number) - self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, False) + item = self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, False) + self.accept_transfer(item, path + '/' + file_name.decode('utf-8'), friend_number, file_number) else: self.create_file_transfer_item(file_name.decode('utf-8'), size, friend_number, file_number, True) @@ -743,6 +743,8 @@ class Profile(Contact, Singleton): tr = self._file_transfers[(friend_number, file_number)] tr.cancel() del self._file_transfers[(friend_number, file_number)] + else: + self._tox.file_control(friend_number, file_number, TOX_FILE_CONTROL['CANCEL']) def accept_transfer(self, item, path, friend_number, file_number, size): rt = ReceiveTransfer(path, self._tox, friend_number, size, file_number) diff --git a/src/styles/style.qss b/src/styles/style.qss index 8f9a577..f40befb 100644 --- a/src/styles/style.qss +++ b/src/styles/style.qss @@ -1244,4 +1244,5 @@ MessageEdit:hover QListWidget QPushButton { background-color: transparent; + border: none; } \ No newline at end of file