Skip to content

Commit

Permalink
修复了对局信息界面下方按钮边框消失的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Jun 30, 2024
1 parent f1b8e31 commit 2ea5e6f
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions app/view/game_info_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,25 @@ def __onEnemyButtonClicked(self):
self.enemyButton.setChecked(True)

def __setStyleSheet(self):
light = '''
TransparentTogglePushButton,
TransparentTogglePushButton:hover {
border: 1px solid rgba(0, 0, 0, 0.073);
}'''
light = "rgba(0, 0, 0, 0.073)"
dark = "rgba(255, 255, 255, 0.053)"

dark = '''
qss = '''
TransparentTogglePushButton,
TransparentTogglePushButton:hover {
border: 1px solid rgba(255, 255, 255, 0.053);
}'''
TransparentTogglePushButton:hover,
TransparentTogglePushButton:disabled {{
border: 1px solid {};
}}
TransparentTogglePushButton:checked,
TransparentTogglePushButton:checked:hover {{
border: none;
}}
'''

light = qss.format(light)
dark = qss.format(dark)

setCustomStyleSheet(self.allyButton, light, dark)
setCustomStyleSheet(self.enemyButton, light, dark)
Expand Down

0 comments on commit 2ea5e6f

Please sign in to comment.