Restore filetype dep, fix Settings label wrapping to 1px column

python_depends was emptied too aggressively in an earlier fix (dodging
the requests/charset-normalizer Android-wheel bug) and took filetype
with it — kivy/core/image imports it directly, causing a startup crash.
Restored just filetype (pure Python, no dependency chain, safe).

Settings popup's info label set text_size=(self.width, None) at
__init__ time, before layout ever runs — self was the Popup at its
default ~100px pre-layout width, not its real on-screen size, so the
label rendered as a 1-character-wide column. Now binds text_size to
the label's own width so it updates once real layout happens.
This commit is contained in:
AI_Assistant 2026-08-22 12:07:30 +00:00
commit d276f8842f
No known key found for this signature in database
3 changed files with 35 additions and 18 deletions

View file

@ -140,12 +140,19 @@ class SettingsPopup(Popup):
self.on_save = on_save
box = BoxLayout(orientation="vertical", spacing=10, padding=10)
box.add_widget(Label(
info_label = Label(
text="Path to the synced event_log.csv on this device "
"(check your sync app's configured destination folder):",
size_hint_y=None, height=80, halign="left", valign="top",
text_size=(self.width, None),
))
)
# text_size can't just be set once here: at __init__ time this Popup
# hasn't been laid out yet, so self.width is Kivy's default ~100px
# widget width, not the popup's real on-screen size — that's what
# was squeezing this label into a thin vertical column. Binding to
# the label's own `width` keeps text_size in sync as the box (and
# therefore this label, which fills it) actually gets sized.
info_label.bind(width=lambda inst, w: setattr(inst, "text_size", (w, None)))
box.add_widget(info_label)
self.path_input = TextInput(text=current_path, multiline=False, size_hint_y=None, height=48)
box.add_widget(self.path_input)