Skip to content

Commit

Permalink
将生涯背景预览图片边界改为圆角
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Sep 29, 2024
1 parent 3148a2a commit 67cb7d7
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 117 deletions.
13 changes: 9 additions & 4 deletions app/components/message_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from app.lol.connector import connector
from app.components.multi_champion_select import MultiChampionSelectWidget
from app.components.multi_lol_path_setting import PathDraggableWidget
from app.components.champion_icon_widget import RoundedLabel


class UpdateMessageBox(MessageBoxBase):
Expand Down Expand Up @@ -433,11 +434,13 @@ def __init__(self, skinList, parent=None):

self.skinList = skinList

self.splashesImg = QLabel(self)
self.splashesImg = RoundedLabel(borderWidth=0, radius=6.0, parent=self)
self.splashesImg.setFixedSize(1020, 565)
self.splashesNameLabel = QLabel(self)
self.splashesNameLabel.setFont(QFont('Microsoft YaHei', 13))
self.pager = HorizontalPipsPager(self)
self.pager.setPreviousButtonDisplayMode(PipsScrollButtonDisplayMode.ALWAYS)
self.pager.setPreviousButtonDisplayMode(
PipsScrollButtonDisplayMode.ALWAYS)
self.pager.setNextButtonDisplayMode(PipsScrollButtonDisplayMode.ALWAYS)
self.pager.setPageNumber(len(skinList))

Expand All @@ -452,6 +455,9 @@ def __init__(self, skinList, parent=None):
self.buttonLayout.addWidget(self.saveButton, 1, Qt.AlignVCenter)
self.buttonLayout.addWidget(self.cancelButton, 1, Qt.AlignVCenter)

self.yesButton.setText(self.tr("OK"))
self.cancelButton.setText(self.tr("Cancel"))

self.pager.currentIndexChanged.connect(self.__onChangeSplashes)
self.saveButton.clicked.connect(self.__onSaveSplashes)

Expand All @@ -463,8 +469,7 @@ async def __onChangeSplashes(self, idx):
self.splashesNameLabel.setText(skinItem[0])

url = await connector.getChampionSplashes(skinItem[1], False)
img = QPixmap(url).scaled(1020, 565)
self.splashesImg.setPixmap(img)
self.splashesImg.setPicture(url)

@asyncSlot()
async def __onSaveSplashes(self):
Expand Down
Binary file modified app/resource/i18n/Seraphine.zh_CN.qm
Binary file not shown.
Loading

0 comments on commit 67cb7d7

Please sign in to comment.