Skip to content

Commit

Permalink
给对局信息界面下方友方 / 敌方按钮增加了边框
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Feb 9, 2024
1 parent bb36b68 commit 7ce5dcd
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion app/view/game_info_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from PyQt5.QtGui import QPixmap, QFont, QPainter, QColor, QPalette, QImage, QFontMetrics

from ..common.qfluentwidgets import (SmoothScrollArea, TransparentTogglePushButton,
ToolTipFilter, ToolTipPosition)
ToolTipFilter, ToolTipPosition, setCustomStyleSheet)

from ..common.icons import Icon
from ..common.style_sheet import StyleSheet
Expand Down Expand Up @@ -201,6 +201,8 @@ def __initWidget(self):
self.stackedWidget.addWidget(self.enemySummoners)
self.stackedWidget.setCurrentIndex(0)

self.__setStyleSheet()

def __initLayout(self):
self.buttonsLayout.addWidget(self.allyButton)
self.buttonsLayout.addWidget(self.enemyButton)
Expand All @@ -223,6 +225,22 @@ def __onEnemyButtonClicked(self):
else:
self.enemyButton.setChecked(True)

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

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

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


class TeamSummoners(QFrame):

Expand Down

0 comments on commit 7ce5dcd

Please sign in to comment.