This commit is contained in:
2025-06-10 07:25:21 +03:00
parent 069227abf9
commit 0cc77fd89a
7 changed files with 91975 additions and 20 deletions

View File

@@ -1 +1 @@
gAAAAABoRU2S6uCg_q0O-jiLHQfi6s7Kw865wYdFsj5SlEo5YG292sdSlabVYW5sEVm8WQgz1iYCyql5F0ODiDKUlXWGeMe3TAk8AyEwWJwPqgZhyWkwDcbRHtE60ip-grWPNHQT4qG_ gAAAAABoRbkwFPe0CkDxY3L74TIV3uqc8LMiN9OnPLRW060oh_dFpQUfSwZ6iyHCoVGqWQk7P1aS8EWEtq7BWVz1r_8rK7cYk65ou4a8t8UPRU3hJMY5JnBKE0Og2N7qC2aSYEOKG6iS

View File

@@ -0,0 +1,38 @@
[
{
"start_time": "2025-06-08T09:07:16.000+00:00",
"end_time": "2025-06-08T09:15:50.000+00:00",
"duration_seconds": 502,
"location": {
"latitude": 45.780139444444444,
"longitude": 24.16857333333333
}
},
{
"start_time": "2025-06-08T09:41:11.000+00:00",
"end_time": "2025-06-08T09:44:52.000+00:00",
"duration_seconds": 221,
"location": {
"latitude": 45.66133388888888,
"longitude": 24.167794999999998
}
},
{
"start_time": "2025-06-08T09:56:09.000+00:00",
"end_time": "2025-06-08T10:06:48.728+00:00",
"duration_seconds": 627,
"location": {
"latitude": 45.63627,
"longitude": 24.077436666666667
}
},
{
"start_time": "2025-06-08T10:49:38.000+00:00",
"end_time": "2025-06-08T10:52:42.171+00:00",
"duration_seconds": 184,
"location": {
"latitude": 45.54065277777777,
"longitude": 23.951960000000003
}
}
]

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 KiB

View File

@@ -6,6 +6,7 @@ from kivy.uix.textinput import TextInput
from kivy.uix.filechooser import FileChooserIconView from kivy.uix.filechooser import FileChooserIconView
from kivy.uix.widget import Widget from kivy.uix.widget import Widget
from kivy.graphics import Color, Rectangle, Line from kivy.graphics import Color, Rectangle, Line
from kivy.uix.scrollview import ScrollView
import os import os
import json import json
import shutil import shutil
@@ -41,11 +42,18 @@ def open_pauses_popup(screen_instance, project_name, RESOURCES_FOLDER, on_save_c
except Exception as e: except Exception as e:
return "Unknown place" return "Unknown place"
# Main layout for popup (vertical)
layout = BoxLayout(orientation='vertical', spacing=14, padding=14)
# Scrollable area for pauses
pauses_layout = BoxLayout(orientation='vertical', spacing=14, size_hint_y=None, padding=0)
pauses_layout.bind(minimum_height=pauses_layout.setter('height'))
for idx, pause in enumerate(pauses): for idx, pause in enumerate(pauses):
# Main vertical box for this pause # Main vertical box for this pause
pause_box = BoxLayout( pause_box = BoxLayout(
orientation='vertical', orientation='vertical',
spacing=12, # <-- Increase this value for more space between children spacing=6,
padding=[6, 0, 6, 4], padding=[6, 0, 6, 4],
size_hint_y=None, size_hint_y=None,
height=170 height=170
@@ -53,38 +61,40 @@ def open_pauses_popup(screen_instance, project_name, RESOURCES_FOLDER, on_save_c
with pause_box.canvas.before: with pause_box.canvas.before:
Color(0.20, 0.20, 0.25, 1) Color(0.20, 0.20, 0.25, 1)
pause_box.bg_rect = Rectangle(pos=pause_box.pos, size=pause_box.size) pause_box.bg_rect = Rectangle(pos=pause_box.pos, size=pause_box.size)
pause_box.bind(pos=lambda inst, val: setattr(pause_box.bg_rect, 'pos', inst.pos), Color(0.3, 0.5, 0.9, 1) # Border color
size=lambda inst, val: setattr(pause_box.bg_rect, 'size', inst.size)) pause_box.border_line = Line(rectangle=(pause_box.x, pause_box.y, pause_box.width, pause_box.height), width=1.2)
def update_pause_box(instance, value, box=pause_box):
box.bg_rect.pos = box.pos
box.bg_rect.size = box.size
box.border_line.rectangle = (box.x, box.y, box.width, box.height)
pause_box.bind(pos=update_pause_box, size=update_pause_box)
# --- Row 1: Name label --- # --- Row 1: Name label ---
name_row = BoxLayout(orientation='vertical', size_hint_y=None, height=20, padding=[0,0,0,0])
title_label = Label( title_label = Label(
text=f"[b]Pause {idx+1}[/b]", text=f"[b]Pause {idx+1}[/b]",
markup=True, markup=True,
font_size=15, font_size=15,
color=(1, 1, 1, 1), color=(1, 1, 1, 1),
size_hint_y=None, size_hint_y=0.2, # 20% of the pause_box height
height=20,
halign="center", halign="center",
valign="middle" valign="middle"
) )
def update_title_size(instance, value): def update_title_size(instance, value):
instance.text_size = (instance.width, None) instance.text_size = (instance.width, None)
title_label.bind(width=update_title_size) title_label.bind(width=update_title_size)
name_row.add_widget(title_label) pause_box.add_widget(title_label)
pause_box.add_widget(name_row)
# --- Row 2: Location group --- # --- Row 2: Location group ---
place_group = BoxLayout(orientation='vertical', spacing=1, padding=2, size_hint_y=None, height=34) place_group = BoxLayout(orientation='vertical', spacing=4, padding=4, size_hint_y=0.4)
with place_group.canvas.before: with place_group.canvas.before:
Color(0.3, 0.5, 0.9, 0.3) Color(0.3, 0.5, 0.9, 0.3)
place_group.border_rect = Rectangle(pos=place_group.pos, size=place_group.size) place_group.border_rect = Rectangle(pos=place_group.pos, size=place_group.size)
Color(0.3, 0.5, 0.9, 1) Color(0.3, 0.5, 0.9, 1)
place_group.border_line = Line(rectangle=(place_group.x, place_group.y, place_group.width, place_group.height), width=1) place_group.border_line = Line(rectangle=(place_group.x, place_group.y, place_group.width, place_group.height), width=1)
def update_place_group(instance, value): def update_place_group(instance, value, box=place_group):
place_group.border_rect.pos = place_group.pos box.border_rect.pos = box.pos
place_group.border_rect.size = place_group.size box.border_rect.size = box.size
place_group.border_line.rectangle = (place_group.x, place_group.y, place_group.width, place_group.height) box.border_line.rectangle = (box.x, box.y, box.width, box.height)
place_group.bind(pos=update_place_group, size=update_place_group) place_group.bind(pos=update_place_group, size=update_place_group)
suggested_place = suggest_location_name(pause["location"]["latitude"], pause["location"]["longitude"]) suggested_place = suggest_location_name(pause["location"]["latitude"], pause["location"]["longitude"])
@@ -148,16 +158,16 @@ def open_pauses_popup(screen_instance, project_name, RESOURCES_FOLDER, on_save_c
pause_box.add_widget(place_group) pause_box.add_widget(place_group)
# --- Row 3: Pictures group --- # --- Row 3: Pictures group ---
photo_group = BoxLayout(orientation='vertical', spacing=1, padding=2, size_hint_y=None, height=38) photo_group = BoxLayout(orientation='vertical', spacing=1, padding=2, size_hint_y=0.4)
with photo_group.canvas.before: with photo_group.canvas.before:
Color(0.2, 0.8, 0.5, 0.2) Color(0.2, 0.8, 0.5, 0.2)
photo_group.border_rect = Rectangle(pos=photo_group.pos, size=photo_group.size) photo_group.border_rect = Rectangle(pos=photo_group.pos, size=photo_group.size)
Color(0.2, 0.8, 0.5, 1) Color(0.2, 0.8, 0.5, 1)
photo_group.border_line = Line(rectangle=(photo_group.x, photo_group.y, photo_group.width, photo_group.height), width=1) photo_group.border_line = Line(rectangle=(photo_group.x, photo_group.y, photo_group.width, photo_group.height), width=1)
def update_photo_group(instance, value): def update_photo_group(instance, value, box=photo_group):
photo_group.border_rect.pos = photo_group.pos box.border_rect.pos = box.pos
photo_group.border_rect.size = photo_group.size box.border_rect.size = box.size
photo_group.border_line.rectangle = (photo_group.x, photo_group.y, photo_group.width, photo_group.height) box.border_line.rectangle = (box.x, box.y, box.width, box.height)
photo_group.bind(pos=update_photo_group, size=update_photo_group) photo_group.bind(pos=update_photo_group, size=update_photo_group)
pause_img_folder = os.path.join(project_folder, f"pause_{idx+1}") pause_img_folder = os.path.join(project_folder, f"pause_{idx+1}")
@@ -240,7 +250,12 @@ def open_pauses_popup(screen_instance, project_name, RESOURCES_FOLDER, on_save_c
Line(points=[0, 1, 1000, 1], width=1) Line(points=[0, 1, 1000, 1], width=1)
pause_box.add_widget(sep) pause_box.add_widget(sep)
layout.add_widget(pause_box) pauses_layout.add_widget(pause_box)
scroll = ScrollView(size_hint=(1, 1))
scroll.add_widget(pauses_layout)
layout.add_widget(scroll)
# Save all and close # Save all and close
save_all_btn = Button(text="Save All & Close", size_hint_y=None, height=44, background_color=(0.341, 0.235, 0.980, 1), color=(1,1,1,1)) save_all_btn = Button(text="Save All & Close", size_hint_y=None, height=44, background_color=(0.341, 0.235, 0.980, 1), color=(1,1,1,1))