question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Color updating can't keep up

See original GitHub issue

I have a set of custom buttons configured to change color on press and change back on release. However, when I started rapidly clicking on different buttons, some of them kept the “pressed” color, even though the touch event ended. To demonstrate, here is the expected behaviour and here is the actual behaviour This is the code:

from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout

class ColorButton(Button):
    def on_press(self):
        self.color = (0, 1, 0, 1)
    def on_release(self):
        self.color = (1, 1, 1, 1)

class TestApp(App):
    def build(self):
        grid = BoxLayout()
        for i in range(10):
            grid.add_widget(ColorButton(text="test"))
        return grid

TestApp().run()

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dessantcommented, Jun 30, 2016

Btw, you can drag, just make sure to not drag outside the button bounds, or set always_release to True.

0reactions
dessantcommented, Jun 30, 2016

Yeah, probably that’s what they’ve been seeing. Let’s close this. 😋

Read more comments on GitHub >

github_iconTop Results From Across the Web

Washed out colors after update. - Microsoft Community
To do it, just search and open 'Calibrate display color' from your Windows Search bar. Follow the on-screen instructions to calibrate and adjust ......
Read more >
Colors completely screwed up in latest update
Updated from 16.6.2 to 16.6.3 and all my colors are completely screwed up. Tried exporting settings from a different machine and importing here, ......
Read more >
Why QTableWidgetItem doesn't keep updating it's color?
I want it to keep updating table item's color. I cant include all the code as it is too long but I have...
Read more >
Color Therapy - We received many possible issues after ...
We received many possible issues after updating to 1.4, a process that is indeed needed to optimize the app. Hope you can read...
Read more >
FIX: Windows 11 Color Management not working - YouTube
Interested in how to FIX: Windows 11 Color Management not working? ... Get DriverFix for FREE to always keep your drivers up to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found