We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right from the Badge is a white square and the Badge isn't round after set a new text.
from kivy.lang import Builder from kivymd.app import MDApp KV = ''' MDScreen: md_bg_color: self.theme_cls.backgroundColor MDFabButton: id: button_images style: 'small' icon: 'panorama-variant-outline' pos_hint: {'center_x': .5, 'center_y': .4} MDBadge: id: button_images_badge text: "" #opacity: 0 MDButton: pos_hint: {'center_x': .5, 'center_y': .5} on_press: app.plus() MDButtonIcon: icon: "plus-thick" MDButtonText: text: "PLUS" MDButton: pos_hint: {'center_x': .5, 'center_y': .6} on_press: app.zero() MDButtonIcon: icon: "numeric-0-circle-outline" MDButtonText: text: "ZERO" ''' from kivy.core.window import Window Window.size = (400, 600) Window.top = 150 Window.left = 850 class Example(MDApp): def build(self): return Builder.load_string(KV) def on_start(self): super().on_start() self.app = MDApp.get_running_app() self.count = 0 self.app.root.ids.button_images_badge.opacity = 0 def zero(self): self.count = 0 self.update_badge_icon() def plus(self): self.count += 1 self.update_badge_icon() def update_badge_icon(self): if self.count > 0: self.app.root.ids.button_images_badge.text = str(self.count) self.app.root.ids.button_images_badge.opacity = 1 else: self.app.root.ids.button_images_badge.opacity = 0 Example().run()
The text was updated successfully, but these errors were encountered:
8ba6af9
The white square is fixed. But the red Badge isn't round.
Sorry, something went wrong.
Set radius
radius
No branches or pull requests
Right from the Badge is a white square and the Badge isn't round after set a new text.
badge.mp4
The text was updated successfully, but these errors were encountered: