Skip to content

Commit

Permalink
修复生涯背景设置皮肤选择组件图片渐变不平滑的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Nov 14, 2024
1 parent f1ed754 commit d5736e6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/components/champion_icon_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def paintEvent(self, e):
painter.setClipPath(path)

grad = QLinearGradient(0, 0, 0, self.rect().height())
grad.setColorAt(0.65, Qt.GlobalColor.black)
grad.setColorAt(0.7, Qt.GlobalColor.black)
grad.setColorAt(1, Qt.GlobalColor.transparent)
self.opacity.setOpacityMask(grad)

Expand Down
6 changes: 4 additions & 2 deletions app/components/multi_champion_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ def __init__(self, skinList, parent=None):

self.vBoxLayout = QVBoxLayout(self)

self.viewLayout = QVBoxLayout()
self.viewWidget = QWidget()
self.viewLayout = QVBoxLayout(self.viewWidget)

self.buttonsGroup = QWidget()
self.buttonsLayout = QVBoxLayout()
Expand Down Expand Up @@ -254,7 +255,7 @@ def __initLayout(self):
self.vBoxLayout.setContentsMargins(1, 0, 1, 0)
self.vBoxLayout.setSpacing(0)

self.vBoxLayout.addLayout(self.viewLayout)
self.vBoxLayout.addWidget(self.viewWidget)
self.vBoxLayout.addWidget(self.buttonsGroup)

def __initWidget(self):
Expand All @@ -268,6 +269,7 @@ def __initWidget(self):
self.pager.setCurrentIndex(0)

self.buttonsGroup.setObjectName("buttonsGroup")
self.viewWidget.setObjectName("viewWidget")

@asyncSlot(int)
async def __onChangeSplashes(self, idx):
Expand Down
14 changes: 10 additions & 4 deletions app/resource/qss/dark/auxiliary_interface.qss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ SplashesSelectWidget>#buttonsGroup {
border-top-right-radius: 0px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
border-top: none;
border-left: none;
border-right: none;
border-bottom: none;
border: none;
}

SplashesSelectWidget>#viewWidget {
background-color: rgb(32, 32, 32);
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
border: none;
}
15 changes: 11 additions & 4 deletions app/resource/qss/light/auxiliary_interface.qss
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@ ChampionsCard {

SplashesSelectWidget>#buttonsGroup {
background-color: rgb(243, 243, 243);
/* background-color: rgb(0, 255, 0, 0.5); */
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
border-top: none;
border-left: none;
border-right: none;
border-bottom: none;
border: none;
}

SplashesSelectWidget>#viewWidget {
background-color: rgb(243, 243, 243);
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
border: none;
}

0 comments on commit d5736e6

Please sign in to comment.