python - Is there a simple way to add a border to Kivy Labels, Buttons, Widgets etc. with-out images? -


i'm trying add border kivy buttons doesn't work expected. labels implementation seems ok buttons overrides/clears standard of button.

how can draw border above button with-out changing normal behavior? i'd implement buttonbehavior can add border every kivy object canvas. i've called borderbehavior.

styling dashed, dotted works line width of 1 because there bug in kivy (see https://github.com/kivy/kivy/issues/2037) (need figure out what's wrong here later.)

i know drawing border possible borderimage i'd add simple borders with-out image.

here how looks @ moment: screenshot of border demo app

you can find source code here (the labels can dragged testing purposes see border correctly positioned):

https://gist.github.com/awolf81/c6796dc2049d9872b2df

ok, i've found fix. naming conflict.

in console log saw there problem @ unpacking border tuple in borderimage of button. of course, that's not working because border implemented differently. maybe can add list (top, right, bottom, left) border implementation can keep same name. haven't checked yet.

changing naming of border borders in python , in kv fixed problem:

class borderbehavior(widget):     borders = objectproperty(none) 

now looks want it: screenshot of button border

ok, i'll check if it's working other classes (e.g. scatter, widget,...). if that's working i'm doing pull request kivy.


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -