saved preview picture

This commit is contained in:
2025-06-06 16:02:50 +03:00
parent 86d81d4501
commit 5627c790f5
28 changed files with 52840 additions and 11797 deletions

View File

@@ -643,11 +643,11 @@
text_size: self.size
on_press: root.optimize_route_entries()
# Preview frame
# Preview frame (label + button on first row, image on second row)
BoxLayout:
orientation: "horizontal"
orientation: "vertical"
size_hint_y: None
height: 60
height: 300 # Adjust as needed for your image size
padding: [10, 10, 10, 10]
spacing: 10
canvas.before:
@@ -657,22 +657,37 @@
pos: self.pos
size: self.size
Label:
text: "Preview your route"
font_size: 16
color: 1, 1, 1, 1
size_hint_x: 0.7
halign: "left"
valign: "middle"
text_size: self.size
BoxLayout:
orientation: "horizontal"
size_hint_y: None
height: 60
spacing: 10
Button:
text: "Preview"
size_hint_x: 0.3
font_size: 16
background_color: 0.341, 0.235, 0.980, 1
color: 1, 1, 1, 1
on_press: root.preview_route()
Label:
text: "Preview your route"
font_size: 16
color: 1, 1, 1, 1
size_hint_x: 0.7
halign: "left"
valign: "middle"
text_size: self.size
Button:
text: "Preview"
size_hint_x: 0.3
font_size: 16
background_color: 0.341, 0.235, 0.980, 1
color: 1, 1, 1, 1
on_press: root.preview_route()
Image:
id: preview_image
source: root.preview_image_source
allow_stretch: True
keep_ratio: False
size_hint_y: None
height: 220
size_hint_x: 1
Widget:
@@ -685,12 +700,4 @@
background_color: 0.341, 0.235, 0.980, 1
color: 1, 1, 1, 1
font_size: 16
on_press: app.root.current = "home"
Image:
id: preview_image
source: root.preview_image_path if root.preview_image_path else "resources/images/track.png"
allow_stretch: True
keep_ratio: True
size_hint_y: None
height: 220
on_press: app.root.current = "home"