Commit a1602b17 authored by Martin Schrön's avatar Martin Schrön
Browse files

Added colorscale to the CornyApp map preview

parent ce2e9c75
......@@ -407,3 +407,5 @@ Root:
<MapView>:
double_tap_zoom: True
size_hint_y: 1
......@@ -688,6 +688,15 @@ class Root(BoxLayout):
self.Tb_output.add_widget(Tab_plots)
self.Tab_map = TabFloat(text='Map')
self.Tab_map_box = MDBoxLayout(orientation='vertical', adaptive_height=True, size_hint=(1, 1))
self.Tab_map_box_row = MDBoxLayout(orientation='horizontal', adaptive_height=True,
height=20, padding=5, size_hint_x=0.6)
self.Tab_map_box_row.add_widget(Image(source=script_path+'app/_ui/colorscale.png', height=20, size_hint=(1, None)))
self.Tab_map_box.add_widget(self.Tab_map_box_row)
self.Tab_map_box.add_widget(FillSpaceWidget())
self.Tab_map.add_widget(self.Tab_map_box)
self.Tb_output.add_widget(self.Tab_map)
#testboxlayout.add_widget(export_label)
......@@ -796,10 +805,17 @@ class Root(BoxLayout):
map.add_marker(marker_i)
RL = RelativeLayout()
if len(self.Tab_map.children) > 0:
self.Tab_map.remove_widget = self.Tab_map.children[0]
RL.add_widget(map)
self.Tab_map.add_widget(RL)
#if len(self.Tab_map.children) > 0:
# self.Tab_map.remove_widget(self.Tab_map.children[0])
if self.Tab_map_box:
if len(self.Tab_map_box.children) > 1:
self.Tab_map_box.remove_widget(self.Tab_map_box.children[0])
#self.Tab_map_box = MDBoxLayout(orientation='vertical', adaptive_height=True, size_hint=(1, 1))
#self.Tab_map_box.add_widget(Image(source=script_path+'app/_ui/colorscale.png', height=20, size_hint=(1, None)))
self.Tab_map_box.add_widget(map)
#RL.add_widget(self.Tab_map_box)
#self.Tab_map.add_widget(RL)
def create_map_station(self, lat, lon):
from kivy_garden.mapview import MapView, MapMarker, MapMarkerPopup
......@@ -810,10 +826,19 @@ class Root(BoxLayout):
map.add_marker(marker_1)
RL = RelativeLayout()
if len(self.Tab_map.children) > 0:
self.Tab_map.remove_widget = self.Tab_map.children[0]
RL.add_widget(map)
self.Tab_map.add_widget(RL)
#if len(self.Tab_map.children) > 0:
# self.Tab_map.remove_widget = self.Tab_map.children[0]
#RL.add_widget(map)
#self.Tab_map.add_widget(RL)
if self.Tab_map_box:
if len(self.Tab_map_box.children) > 1:
self.Tab_map_box.remove_widget(self.Tab_map_box.children[0])
#self.Tab_map_box = MDBoxLayout(orientation='vertical', adaptive_height=True, size_hint=(1, 1))
#self.Tab_map_box.add_widget(Image(source=script_path+'app/_ui/colorscale.png', height=20, size_hint=(1, None)))
self.Tab_map_box.add_widget(map)
#RL.add_widget(self.Tab_map_box)
#self.Tab_map.add_widget(RL)
def thread_load_config(self, *args):
self.is_loading = True
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment