Skip to content

Commit

Permalink
修复设置卡片组的高度在 Linux 系统中过小的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyiYo committed Jan 16, 2023
1 parent 6e8de34 commit 8e32a9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/View/setting_interface/setting_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def __initLayout(self):

# add setting card group to layout
self.expandLayout.setSpacing(28)
self.expandLayout.setContentsMargins(0, 5, 0, 30)
self.expandLayout.setContentsMargins(32, 5, 32, 30)
self.expandLayout.addWidget(self.musicInThisPCGroup)
self.expandLayout.addWidget(self.personalGroup)
self.expandLayout.addWidget(self.mediaInfoGroup)
Expand Down
4 changes: 2 additions & 2 deletions app/components/settings/setting_card_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, title: str, parent=None):
self.vBoxLayout = QVBoxLayout(self)
self.cardLayout = ExpandLayout()

self.vBoxLayout.setContentsMargins(32, 0, 32, 0)
self.vBoxLayout.setContentsMargins(0, 0, 0, 0)
self.vBoxLayout.setAlignment(Qt.AlignTop)
self.vBoxLayout.setSpacing(0)
self.cardLayout.setContentsMargins(0, 0, 0, 0)
Expand All @@ -42,5 +42,5 @@ def addSettingCards(self, cards: List[QWidget]):
self.addSettingCard(card)

def adjustSize(self):
h = self.cardLayout.heightForWidth(self.width()) + 50
h = self.cardLayout.heightForWidth(self.width()) + 52
return self.resize(self.width(), h)

0 comments on commit 8e32a9c

Please sign in to comment.