提交 1b7d725c 编写于 作者: 之一Yo's avatar 之一Yo

修复图标界面显示不全的问题

上级 cdd03cea
......@@ -204,12 +204,19 @@ class IconCardView(QWidget):
""" search icons """
items = self.trie.items(keyWord.lower())
indexes = {i[1] for i in items}
for i in range(len(self.cards)):
self.cards[i].setVisible(i in indexes)
self.flowLayout.removeAllWidgets()
for i, card in enumerate(self.cards):
isVisible = i in indexes
card.setVisible(isVisible)
if isVisible:
self.flowLayout.addWidget(card)
def showAllIcons(self):
self.flowLayout.removeAllWidgets()
for card in self.cards:
card.show()
self.flowLayout.addWidget(card)
class IconInterface(GalleryInterface):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册