How to use the toast.PesterToast.wrapText function in toast

To help you get started, we’ve selected a few toast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github illuminatedwax / pesterchum / toast.py View on Github external
self.setMaximumWidth(self.parent().theme["toasts/width"])
        self.msg.setMaximumWidth(self.parent().theme["toasts/width"])
        self.title.setMinimumHeight(self.parent().theme["toasts/title/minimumheight"])

        self.setLayout(layout_0)

        self.setGeometry(0,0, self.parent().theme["toasts/width"], self.parent().theme["toasts/height"])
        self.setStyleSheet(self.parent().theme["toasts/style"])
        self.title.setStyleSheet(self.parent().theme["toasts/title/style"])
        if self.icon:
            self.icon.setStyleSheet(self.parent().theme["toasts/icon/style"])
        self.msg.setStyleSheet(self.parent().theme["toasts/content/style"])
        self.layout().setSpacing(0)

        self.msg.setText(PesterToast.wrapText(self.msg.font(), str(self.msg.text()), self.parent().theme["toasts/width"], self.parent().theme["toasts/content/style"]))

        p = QtWidgets.QApplication.desktop().availableGeometry(self).bottomRight()
        o = QtWidgets.QApplication.desktop().screenGeometry(self).bottomRight()
        anim.setStartValue(p.y() - o.y())
        anim.setEndValue(100)
        anim.valueChanged.connect(self.updateBottomLeftAnimation)

        self.byebye = False