提交 5539504c 编写于 作者: 之一Yo's avatar 之一Yo

添加徽章插件

上级 10d0bc05
......@@ -3,7 +3,7 @@ from PyQt5.QtCore import Qt
from PyQt5.QtDesigner import QPyDesignerCustomWidgetPlugin
from qfluentwidgets import (InfoBar, ProgressBar, IndeterminateProgressBar, ProgressRing, StateToolTip, InfoBarPosition,
IndeterminateProgressRing)
IndeterminateProgressRing, InfoBadge)
from plugin_base import PluginBase
......@@ -96,3 +96,16 @@ class StateToolTipPlugin(StatusInfoPlugin, QPyDesignerCustomWidgetPlugin):
def name(self):
return "StateToolTip"
class InfoBadgePlugin(StatusInfoPlugin, QPyDesignerCustomWidgetPlugin):
""" State tool tip plugin """
def createWidget(self, parent):
return InfoBadge('10', parent)
def icon(self):
return super().icon("InfoBadge")
def name(self):
return "InfoBadge"
......@@ -438,8 +438,8 @@ class SlideRightFlyoutAnimationManager(FlyoutAnimationManager):
@FlyoutAnimationManager.register(FlyoutAnimationType.FADE_IN)
class DropDownFlyoutAnimationManager(FlyoutAnimationManager):
""" Drop down flyout animation manager """
class FadeInFlyoutAnimationManager(FlyoutAnimationManager):
""" Fade in flyout animation manager """
def position(self, target: QWidget):
w = self.flyout
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册