From f470d9325e550f92488a76405f829f155d6b7b19 Mon Sep 17 00:00:00 2001 From: Zzaphkiel <1278228162@qq.com> Date: Thu, 21 Sep 2023 00:33:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E7=BB=98=E4=BF=AE=E6=94=B9=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E7=AD=BE=E5=90=8D=E5=8A=9F=E8=83=BD=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/resource/i18n/Seraphine.zh_CN.qm | Bin 16898 -> 17009 bytes app/resource/i18n/Seraphine.zh_CN.ts | 107 ++++++++++++++------------- app/view/auxiliary_interface.py | 61 ++++++++++----- 3 files changed, 100 insertions(+), 68 deletions(-) diff --git a/app/resource/i18n/Seraphine.zh_CN.qm b/app/resource/i18n/Seraphine.zh_CN.qm index 321074dbb537f8d374d062c7f42b962286457690..e498ef469e99d581d2e250f2c9f6ccd43e624e3a 100644 GIT binary patch delta 1439 zcmX9-dr(w$6#nks-@SKt?>-RG6=c~3cL5C$8@Oni|V8f7WtgAptx$<%y5s>vsgno7sHf9!nwyL0B8^F7Y8D(-$2x5lf_ zC_wN4=3h-y*Q(u|Uiqu!c{7;8d_q2J}A;)*S_~SztFEfbBZi zV|rV1z@EHC%{D>MFu9Ia_zx3`e+FU|2$!LFr}UgblK8y%iaS7o#$$n5mo&z zPI*ogV<&OzpR@x*o^kcRxq&Dz?v!OT;Jt^t)ss#23zQd}#s7Dn?WQe!HN4TW0C4p1 z&N=;nh&Vp{%$tDUH6==8 zxdI5RV;%=?5!1oUVeb-@qEa+Xi@e zvF#@m>e|Y7gwQ*n6poOs;^W6>k&4(LNytkizr0n9Tqv0y(7xgZDR5yDVV5*`+F2kxLyGLo z0*397lB(l?um&k3>q|;Ui?k%)i}-~qP0Y`8*koz{PTGH{qSYRtIl=vui_D^1tsS?Q zqV?K7vq!$=* zML%tGHCgt7icwqitJZW-6!Y}kJ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0%zCErEt_w|1PbNx1GrUtPQv|LDbx&ao!Y|pnWrN4WN6eUA=jXhTxob z&Fk~x)3OGPOGc%^H(R?esDkFTLtFN%FBvP>e*S4Lkvt@2Dh;__x?DT)Q#I;}4$+#p z6zj@*iSrUSUF)u66m?y9jVUH8zsnkSS=Zkz()}ylfL|jJeNlJ6DU`B$=q96RcfEO+ zw4?_#8)MQ9rJ?+&%dI~8S1sG-@`r+;G8PeuQGmTh%soe4h^-bY_bO AutoAcceptMatchingCard - + Delay seconds after match made: 在对局找到后接受对局前延迟的秒数: @@ -34,17 +34,17 @@ 已启用,延迟: - + seconds - + Disabled 未启用 - + Enabled, delay: 已启用,延迟: @@ -62,7 +62,7 @@ - + Champion name 请输入英雄名 @@ -72,17 +72,17 @@ 将要自动选择的英雄 - + Enabled, champion: 已启用,自动选择: - + Disabled 未启用 - + Champion will be seleted automatically: 将要自动选择的英雄: @@ -394,7 +394,7 @@ 房间名 - + Create 创建 @@ -404,7 +404,7 @@ 房间密码 - + Lobby's name: (cannot be empty) 房间名:(不可为空) @@ -414,17 +414,17 @@ 房间密码:(可为空) - + Please input lobby's name 请输入房间名 - + Please input password 请输入房间密码 - + Password: (password will NOT be set if it's empty) 房间密码:(若留空则不设密码) @@ -432,7 +432,7 @@ DodgeCard - + Dodge 秒退 @@ -716,27 +716,27 @@ OnlineAvailabilityCard - + Apply 应用 - + chat 在线 - + away 离开 - + offline 离线 - + Availability 在线状态 @@ -744,12 +744,12 @@ OnlineStatusCard - + Please input your status 请输入你的签名 - + Apply 应用 @@ -763,6 +763,11 @@ Set your profile online status 修改你个人卡片的的签名 + + + Online status you want to change to: + 你想要改成的在线状态(签名): + ProfileBackgroundCard @@ -772,17 +777,17 @@ 请输入英雄名 - + Apply 应用 - + Place input champion name 请输入英雄名 - + Place select skin 请选择皮肤 @@ -790,92 +795,92 @@ ProfileTierCard - + Apply 应用 - + Teamfight Tactics 云顶之弈 - + Ranked solo 单 / 双排 - + Ranked flex 灵活排位 - + Na 未定级 - + Iron 坚韧黑铁 - + Bronze 英勇黄铜 - + Silver 不屈白银 - + Gold 荣耀黄金 - + Platinum 华贵铂金 - + Emerald 流光翡翠 - + Diamond 璀璨钻石 - + Master 超凡大师 - + Grandmaster 傲世宗师 - + Challenger 最强王者 - + Game mode 游戏模式 - + Tier 段位 - + Division 等级 @@ -883,7 +888,7 @@ RemoveTokensCard - + Remove 卸下 @@ -1212,42 +1217,42 @@ when they are used by Seraphine, which will cost more time 召唤师名 - + Spectate 观战 - + Summoner not found 召唤师未找到 - + Please check the summoner's name and retry 请检查召唤师名后重试 - + Summoner isn't in game 召唤师不在游戏中 - + Spectate successfully 观战拉起成功 - + Please wait 请等待游戏观战启动 - + Summoners's name you want to spectate: 你想观战的召唤师名: - + Please input summoner's name 请输入召唤师名 diff --git a/app/view/auxiliary_interface.py b/app/view/auxiliary_interface.py index fcf5bf41..6c567161 100644 --- a/app/view/auxiliary_interface.py +++ b/app/view/auxiliary_interface.py @@ -167,16 +167,9 @@ def setEnabled(self, a0: bool) -> None: return super().setEnabled(a0) def __connectSignalToSlot(self): - self.onlineStatusCard.pushButton.clicked.connect( - self.__onSetStatusButtonClicked) self.profileBackgroundCard.pushButton.clicked.connect( self.__onSetProfileBackgroundButtonClicked) - def __onSetStatusButtonClicked(self): - msg = self.onlineStatusCard.lineEdit.text() - threading.Thread( - target=lambda: connector.setOnlineStatus(msg)).start() - def __onSetProfileBackgroundButtonClicked(self): champion = self.profileBackgroundCard.championEdit.text() skin = self.profileBackgroundCard.skinComboBox.currentText() @@ -189,20 +182,54 @@ def _(): threading.Thread(target=_).start() -class OnlineStatusCard(SettingCard): - +class OnlineStatusCard(ExpandGroupSettingCard): def __init__(self, title, content, parent=None): - super().__init__(Icon.COMMENT, title, content, parent) - self.lineEdit = LineEdit(self) - self.lineEdit.setMinimumWidth(422) - self.lineEdit.setPlaceholderText(self.tr("Please input your status")) + + self.inputWidget = QWidget(self.view) + self.inputLayout = QHBoxLayout(self.inputWidget) + self.statusLabel = QLabel( + self.tr("Online status you want to change to:")) + self.lineEdit = LineEdit() + + self.buttonWidget = QWidget() + self.buttonLayout = QHBoxLayout(self.buttonWidget) self.pushButton = PushButton(self.tr("Apply"), self) + + self.__initLayout() + self.__initWidget() + + def __initLayout(self): + self.inputLayout.setSpacing(19) + self.inputLayout.setAlignment(Qt.AlignTop) + self.inputLayout.setContentsMargins(48, 18, 44, 18) + + self.inputLayout.addWidget( + self.statusLabel, alignment=Qt.AlignLeft) + self.inputLayout.addWidget(self.lineEdit, alignment=Qt.AlignRight) + self.inputLayout.setSizeConstraint(QHBoxLayout.SetMinimumSize) + + self.buttonLayout.setContentsMargins(48, 18, 44, 18) + self.buttonLayout.addWidget(self.pushButton, 0, Qt.AlignRight) + self.buttonLayout.setSizeConstraint(QHBoxLayout.SetMinimumSize) + + self.viewLayout.setSpacing(0) + self.viewLayout.setContentsMargins(0, 0, 0, 0) + self.addGroupWidget(self.inputWidget) + self.addGroupWidget(self.buttonWidget) + + def __initWidget(self): + self.lineEdit.setMinimumWidth(250) + self.lineEdit.setPlaceholderText(self.tr("Please input your status")) + self.pushButton.setMinimumWidth(100) - self.hBoxLayout.addWidget(self.lineEdit) - self.hBoxLayout.addSpacing(16) - self.hBoxLayout.addWidget(self.pushButton) - self.hBoxLayout.addSpacing(16) + self.pushButton.clicked.connect(self.__onPushButtonClicked) + + def __onPushButtonClicked(self): + msg = self.lineEdit.text() + + threading.Thread( + target=lambda: connector.setOnlineStatus(msg)).start() def clear(self): self.lineEdit.clear()