This commit is contained in:
Mark Qvist 2023-10-31 17:48:17 +01:00
parent dec98f26f8
commit 82e054e840
2 changed files with 274 additions and 246 deletions

View File

@ -262,8 +262,8 @@ class SidebandApp(MDApp):
self.update_loading_text() self.update_loading_text()
self.init_announces_view() self.init_announces_view()
self.announces_view.update() self.announces_view.update()
self.telemetry_init() # self.telemetry_init()
self.settings_init() # self.settings_init()
self.connectivity_init() self.connectivity_init()
self.object_details_screen = ObjectDetails(self) self.object_details_screen = ObjectDetails(self)

View File

@ -973,7 +973,6 @@ MDScreen:
disabled: False disabled: False
""" """
layout_map_screen = """ layout_map_screen = """
MDScreen: MDScreen:
name: "map_screen" name: "map_screen"
@ -1101,6 +1100,7 @@ MDScreen:
orientation: "vertical" orientation: "vertical"
MDTopAppBar: MDTopAppBar:
id: settings_top_bar
title: "Preferences" title: "Preferences"
anchor_title: "left" anchor_title: "left"
elevation: 0 elevation: 0
@ -1111,31 +1111,55 @@ MDScreen:
['close', lambda x: root.app.close_settings_action(self)], ['close', lambda x: root.app.close_settings_action(self)],
] ]
ScrollView: MDScrollView:
id: settings_scrollview id: settings_scrollview
size_hint_x: 1
size_hint_y: None
size: [root.width, root.height-root.ids.settings_top_bar.height]
do_scroll_x: False
do_scroll_y: True
MDBoxLayout: MDGridLayout:
orientation: "vertical" cols: 1
spacing: 0 padding: [dp(28), dp(28), dp(28), dp(28)]
size_hint_y: None size_hint_y: None
height: self.minimum_height height: self.minimum_height
padding: [0, 0, 0, 0]
MDBoxLayout:
orientation: "vertical"
spacing: "16dp"
size_hint_y: None
height: self.minimum_height
padding: [dp(28), dp(16), dp(28), dp(16)]
MDLabel:
text: ""
font_style: "H6"
MDLabel: MDLabel:
text: "User Options" text: "User Options"
font_style: "H6" font_style: "H6"
size_hint_y: None
height: self.texture_size[1]
MDLabel:
id: settings_info0
markup: True
text: "\\nTest - Remove"
size_hint_y: None
height: self.texture_size[1]
MDBoxLayout:
orientation: "horizontal"
size_hint_y: None
padding: [0,0,dp(24),dp(0)]
height: dp(48)
MDLabel:
text: "Notifications"
font_style: "H6"
MDSwitch:
id: settings_notifications_on
pos_hint: {"center_y": 0.3}
active: True
MDBoxLayout:
id: telemetry_information_fields
orientation: "horizontal"
size_hint_y: None
spacing: dp(16)
height: dp(64)
padding: [0, dp(0), 0, dp(0)]
MDTextField: MDTextField:
id: settings_display_name id: settings_display_name
@ -1144,52 +1168,56 @@ MDScreen:
max_text_length: 128 max_text_length: 128
font_size: dp(24) font_size: dp(24)
MDBoxLayout:
md_bg_color: [0.2, 0.2, 0.8, 0.8]
size_hint_y: 1.0
MDLabel:
id: filler
text: "Test"
MDTextField: MDTextField:
id: settings_propagation_node_address id: settings_propagation_node_address
hint_text: "LXMF Propagation Node" hint_text: "LXMF Propagation Node"
disabled: False
text: "" text: ""
max_text_length: 32 max_text_length: 32
font_size: dp(24) font_size: dp(24)
height: dp(64)
MDTextField: MDTextField:
id: settings_print_command id: settings_print_command
hint_text: "Print Command" hint_text: "Print Command"
disabled: False
text: "" text: ""
font_size: dp(24) font_size: dp(24)
height: dp(64)
MDLabel:
text: ""
font_style: "H6"
MDLabel: MDLabel:
text: "Address & Identity" text: "Address & Identity"
font_style: "H6" font_style: "H6"
size_hint_y: None
height: self.texture_size[1]
MDLabel:
id: settings_info1
markup: True
text: "\\nYour address and identity hashes are derived from your primary identity keys, and are therefore not editable, but these fields can be used to view and copy the hashes. If you want a new LXMF address, create or import a new primary identity."
size_hint_y: None
height: self.texture_size[1]
MDTextField: MDTextField:
id: settings_lxmf_address id: settings_lxmf_address
hint_text: "Your LXMF Address" hint_text: "Your LXMF Address"
text: "" text: ""
disabled: False
max_text_length: 32 max_text_length: 32
font_size: dp(24) font_size: dp(24)
height: dp(64)
MDTextField: MDTextField:
id: settings_identity_hash id: settings_identity_hash
hint_text: "Your Identity Hash" hint_text: "Your Identity Hash"
text: "" text: ""
disabled: False
max_text_length: 32 max_text_length: 32
font_size: dp(24) font_size: dp(24)
height: dp(64)
MDBoxLayout:
orientation: "vertical"
# spacing: "24dp"
size_hint_y: None
height: self.minimum_height
padding: [dp(28), dp(16), dp(28), dp(16)]
MDBoxLayout: MDBoxLayout:
orientation: "horizontal" orientation: "horizontal"