mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-22 22:40:53 -04:00
Trusted-only display mode, object view skeleton
This commit is contained in:
parent
77b6509059
commit
1aa2131d17
5 changed files with 128 additions and 9 deletions
|
@ -2,7 +2,6 @@ import time
|
|||
import RNS
|
||||
|
||||
from kivy.metrics import dp,sp
|
||||
from kivy.uix.label import MDLabel
|
||||
from kivy.lang.builder import Builder
|
||||
|
||||
if RNS.vendor.platformutils.get_platform() == "android":
|
||||
|
@ -16,6 +15,12 @@ class ObjectDetails():
|
|||
self.widget = None
|
||||
self.object_hash = object_hash
|
||||
|
||||
if not self.app.root.ids.screen_manager.has_screen("object_details_screen"):
|
||||
self.screen = Builder.load_string(layou_object_details)
|
||||
self.screen.app = self.app
|
||||
self.ids = self.screen.ids
|
||||
self.app.root.ids.screen_manager.add_widget(self.screen)
|
||||
|
||||
def reload(self):
|
||||
self.clear_widget()
|
||||
self.update()
|
||||
|
@ -35,6 +40,44 @@ class ObjectDetails():
|
|||
def get_widget(self):
|
||||
return self.widget
|
||||
|
||||
Builder.load_string("""
|
||||
layou_object_details = """
|
||||
MDScreen:
|
||||
name: "object_details_screen"
|
||||
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
|
||||
""")
|
||||
MDTopAppBar:
|
||||
title: "Details"
|
||||
anchor_title: "left"
|
||||
elevation: 0
|
||||
left_action_items:
|
||||
[['menu', lambda x: root.app.nav_drawer.set_state("open")]]
|
||||
right_action_items:
|
||||
[
|
||||
['close', lambda x: root.app.close_sub_map_action(self)],
|
||||
]
|
||||
|
||||
ScrollView:
|
||||
id: object_details_scrollview
|
||||
|
||||
MDBoxLayout:
|
||||
orientation: "vertical"
|
||||
spacing: dp(48)
|
||||
size_hint_y: None
|
||||
height: self.minimum_height
|
||||
padding: [dp(28), dp(48), dp(28), dp(16)]
|
||||
|
||||
MDLabel:
|
||||
id: name_label
|
||||
markup: True
|
||||
text: "Object Name"
|
||||
font_style: "H6"
|
||||
|
||||
MDLabel:
|
||||
id: test_label
|
||||
markup: True
|
||||
text: "Test"
|
||||
font_style: "H6"
|
||||
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue