From 928c54649bb00108988dc564c4674c06bb9dbf7f Mon Sep 17 00:00:00 2001 From: NekoSilverFox Date: Sat, 10 Dec 2022 11:13:44 +0300 Subject: [PATCH] Optimize the interface --- PolyChatApp/chatboxwidget.ui | 9 +-- PolyChatApp/chatlist.ui | 122 ++++++++++++++++++++---------- PolyChatApp/icons/add.png | Bin 0 -> 2885 bytes PolyChatApp/resource.qrc | 1 + PolyChatApp/uil_chatboxwidget.cpp | 2 +- PolyChatApp/uil_chatlist.cpp | 2 +- 6 files changed, 86 insertions(+), 50 deletions(-) create mode 100644 PolyChatApp/icons/add.png diff --git a/PolyChatApp/chatboxwidget.ui b/PolyChatApp/chatboxwidget.ui index e6b325f..f693db3 100644 --- a/PolyChatApp/chatboxwidget.ui +++ b/PolyChatApp/chatboxwidget.ui @@ -93,13 +93,8 @@ - 0 + 2 - - - 8 - - 10 @@ -442,7 +437,7 @@ - Return + Shift+Return diff --git a/PolyChatApp/chatlist.ui b/PolyChatApp/chatlist.ui index 18da970..d8293df 100644 --- a/PolyChatApp/chatlist.ui +++ b/PolyChatApp/chatlist.ui @@ -28,17 +28,39 @@ Qt::Horizontal - - QSizePolicy::Expanding - - 20 + 40 20 + + + + + 0 + 0 + + + + + 50 + 50 + + + + + + + :/icon/icons/logo_fox.png + + + true + + + @@ -57,37 +79,14 @@ Qt::Horizontal - - QSizePolicy::Fixed - - 25 + 40 20 - - - - ... - - - - :/icon/icons/plus.png:/icon/icons/plus.png - - - - 20 - 16 - - - - true - - - @@ -129,6 +128,41 @@ + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + + + + + + :/icon/icons/add.png:/icon/icons/add.png + + + + 20 + 25 + + + + Qt::ToolButtonIconOnly + + + true + + + @@ -143,7 +177,7 @@ 0 0 334 - 493 + 470 @@ -155,9 +189,15 @@ + + false + Your info + + false + @@ -172,10 +212,10 @@ - - + + - Name: + NO_NAME @@ -186,24 +226,24 @@ - - + + - name + Name: - - + + - XXXX/XXXXXX + 000.000.0.0 - - + + - 000.000.0.0 + XXXX/XXXXXX diff --git a/PolyChatApp/icons/add.png b/PolyChatApp/icons/add.png new file mode 100644 index 0000000000000000000000000000000000000000..13572f51251feb6b4d934b4858126b6dd8923cc6 GIT binary patch literal 2885 zcmeHJYcLz=8jd6zmj(%ATcm_zOErkbhH(uWO|&i@TX&_Ti>gaYwN*l6-F1s~Z56Ab zrv#P8Jyn_@RHH>*inlxy+n@=SR=Xne*fO-kI;6@11#{@BN?bASJZHTVA;BwOr^B;5n>F zXf+|_=)Olgbc*RnmAu2L85CqVKGm0i>PR>~x^X5K{l4DMs=4dQyO3tR?3-DB1Bz}k zV1e>jFvz{2@q6&u5)Cj=M<)S=@U1kgb&n@v8oJ6s>i5lJnp@xYM{zt_qj=2uDDe;L z14j97+?@n5==d-W2`hp^qnpHl(+h2FASg^CT^u42?+*ZVKvxw?^9`My+5wacm){{6 z`C`D6pMP;u(8nPa6b(2izq`29NRpE^6h^d$aP`v^kr}=du1;_e*fG;G{EaU};y=8; zeoS1@{<>rS%hui%+J}Vz?D04|4}-M6kZ;l&P>HnbI}6-bEaerm&aukPA@KUK&Pms+ zZxfsAxU8kyV;rtg?Zi}2X!wi8ChZ(Cpv_NVw)P}y3*74Vl{Y=x7r#Xv_|SHlR#(%O zI7%4c^=K(20pH{mYeRf|y*QGwzbU4OQXK$L?w$PdTi#EC-e63DvDQ3qFF^Hk74JtI zSDZ?~T^vFsBdBHL$zYKAg0udiap+b|QMTmL5r_o-;Jj^>PEpF%s6q$U$A4tpz43TAf&0m(8`~EmDt1y*S&Q$JLUS-70{|RHFHts9il4HpHV%APDdT|>F=lX^1 z9;~Hwr=(l&kVgua3pE?`JYUYxT?Y9`SYJD1u)}}Jb@?JZ#^UC!%^>sE&6ho13S;p& zJSepChJAu0QM($?e7@QT`DQ?^{S02xQipAV}#DoA05XGPpQ~S?yL=t(;rNnu^oI@F*szc7y zKYSbUw%p;Atj5^y2V-&Mi)7eNjzNuRt~IkY^B})&nF!I0P%T*ia}@HpqZRtFWu*eu z1??z8#sdie8Pm8YJ@6o6f{?ISpzp~WgbzOVTj>T$oh4{Y6Y`F7{ zH?v77(+#?^X`%{d{F!46JL-chp#<=^EgAb&@x*f~#G7T9ngH)}ky$lpbS~wRkQ@6x z_+G?v{?Rho(n-a9cvt>m6RM0tg%L^A4NHjw_^G*ZpI`i^0uJC;spOAVQ+f+C+-zFE zQe&neGihIMA-ceDxxK_JjzV1x_Bt$Cg+pGK*+?T&VztIi^q)P{C^V^|LlK!ScKlve zPb$eSJ55f>$Wiaqgg~3M$dlyAezAnyA7A8c%dll_*Dled5g%0Z_e|wtW}OB1E zjh*FB%kgmc@>RzT2ZlM+y6_PpvB@_;R?_;ZblT}}; zdIkTLf%a^jW|=}bP5W2LQbg7XSRdjm{g3~70{c7j#Da9bF7x~=vPD(8<|IzwO6ux9 zok{iI*e%<>$gdbV0ajPqnO)zVkOr_fMpwp<~ zkyo!c{q0;OW+-+ym~q?jxm|5RBrWPJ3vy=|KuK1OFR$ys(7l+CM@}q33p|eGRi7L| zTVQZV83!woA`b*&i^FI}N&-K0!zLr!*45hphqQOF9$Fd4GRif^toPBO5yfX&z;zr5 z{AuT|!QS$%xP*Dx#<|vYzwH9?%QexqAn@rYPcP(sj~!K3i_eoEF{WcMO>Umb1(jb((#v{t@cGnx+WFiWiG= UrXtPFMZOqdV{MPGwz?Ge7h+rNO8@`> literal 0 HcmV?d00001 diff --git a/PolyChatApp/resource.qrc b/PolyChatApp/resource.qrc index 3d8e238..5548edb 100644 --- a/PolyChatApp/resource.qrc +++ b/PolyChatApp/resource.qrc @@ -16,5 +16,6 @@ icons/register-add-friend.png icons/logo_fox.png icons/send-file.png + icons/add.png diff --git a/PolyChatApp/uil_chatboxwidget.cpp b/PolyChatApp/uil_chatboxwidget.cpp index c03df9a..c8466f5 100644 --- a/PolyChatApp/uil_chatboxwidget.cpp +++ b/PolyChatApp/uil_chatboxwidget.cpp @@ -290,7 +290,7 @@ void ChatBoxWidget::receiveUDPMessage() // 追加聊天记录 ui->msgTextBrowser->setTextColor(Qt::red); ui->msgTextBrowser->append(">>> [FILE] " + time); - ui->msgTextBrowser->append(QString("

[Name]: %2 [Size]: %3Kb

").arg(msg_7).arg(QFileInfo(msg_7).fileName()).arg(QFileInfo(msg_7).size())); + ui->msgTextBrowser->append(QString("").arg(msg_7).arg(QFileInfo(msg_7).fileName()).arg(QFileInfo(msg_7).size())); break; case SignalType::UserJoin: diff --git a/PolyChatApp/uil_chatlist.cpp b/PolyChatApp/uil_chatlist.cpp index 178e082..152df77 100644 --- a/PolyChatApp/uil_chatlist.cpp +++ b/PolyChatApp/uil_chatlist.cpp @@ -14,7 +14,7 @@ ChatList::ChatList(QWidget* parent, QString localUserName, QString localUserGrou ui(new Ui::ChatList) { ui->setupUi(this); - this->setWindowTitle("Chat list"); + this->setWindowTitle("PolyChat Chat list"); this->setWindowIcon(QIcon(":/icon/icons/logo_fox.png"));