ePassport: stop disabled buttons drawing as three bands
Kivy's stock disabled button texture is pale at the edges and dark in the middle. Stretched across a wide button the edges stay put and the middle grows, so it reads as three vertical bands with the label sitting on the dark one and disappearing - "Delete dump" is unreadable at startup, where it is disabled because no dump is loaded yet. Keep the normal background for the disabled state and let the dimmed label carry it instead. The text goes to 45% rather than Kivy's 30%, which is faint on that grey. Applied as a Button rule because nine buttons across the app bind disabled: Export, Open folder, the camera button, Samples, the bin button and the rest all band the same way. The one button that sets its own transparent background stays transparent, since background_color multiplies the texture. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0d8b99b2a1
commit
ad016cf6fe
2 files changed
+8
No files matched your search
@@ -7,6 +7,13 @@
|
||||
#:import ScanScreen epassport.ui.scan.ScanScreen
|
||||
#:import BinButton epassport.ui.widgets.binbutton.BinButton
|
||||
|
||||
# Kivy's disabled button texture is pale at the edges and dark in the middle,
|
||||
# which stretches into three bands and leaves the label unreadable. Keep the
|
||||
# normal background and let the dimmed text carry the disabled state.
|
||||
<Button>:
|
||||
background_disabled_normal: "atlas://data/images/defaulttheme/button"
|
||||
disabled_color: 1, 1, 1, 0.45
|
||||
|
||||
<Root>:
|
||||
orientation: "vertical"
|
||||
canvas.before:
|
||||
|
||||
Reference in new issue
Block a user