Open neo-mashiro opened 4 years ago
That's a strange behavior, but the buttons lib is being work on, check the pull request
I've tried the latest master version, and the bug persisted. Will try again once the PR is merged.
I'm pretty sure it's related to the button animation. That explains why the canvas background "fades away" at exactly the same pace as the button does if you look at it closely, and why the kivy original static button works fine. Just press the MDbutton, hold the press without releasing it, you will see how the button animation synchronizes with the canvas.
this is not a button problem but a ripple effect bug so far i know, the ripple effect draws in the canvas and canvas.after
it might be a good idea to use a canvas instruction group to restrict the effect in a "layer"
also, you need to add a color before the canvas instruction, othewise it will lookup for the lastes color instruction before your instruction inside the canvas
FloatLayout:
canvas:
Color:
rgba:1,1,1,1
Rectangle:
pos: self.pos
size: self.size
source: '../assets/table.png'
adding the color before the canvas instruction fixed the problem, thanks!
i may say that this bug is low priority since it's mostly the order which the canvas is drawn
i would suggest you to change the tittle to:
since this error is mostly the canvas where ripple behavior works
@podraco done
Description of the Bug
I have a BoxLayout and a FloatLayout, stacked vertically. The BoxLayout has some kivyMD buttons, the FloatLayout draws a background image. All the buttons work fine except for the last one, whenever I click on the last button, it changes the canvas opacity of the FloatLayout below it and redraws the background. I don't understand why clicking the button would change things in other layouts.
Regardless of how many buttons I have, it's always the last button that misbehaves. I can replicate this with any kind of kivyMD buttons, such as MDIconButton, MDFlatButton or MDRectangleFlatButton.
Interestingly enough, if I just use the original kivy buttons "Button", this will not be observed.
A minimal example
Demo
Versions