From 5cb7b51b308617efdf489541dc51e285dba405f0 Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Fri, 11 Mar 2022 14:54:26 +0530 Subject: [PATCH] Refactor kivy screens[Method for set the dynamic screens] --- src/bitmessagekivy/kv/common_widgets.kv | 2 +- src/bitmessagekivy/kv/credits.kv | 2 +- src/bitmessagekivy/kv/login.kv | 2 +- src/bitmessagekivy/kv/msg_composer.kv | 2 +- src/bitmessagekivy/kv/popup.kv | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bitmessagekivy/kv/common_widgets.kv b/src/bitmessagekivy/kv/common_widgets.kv index 792fef1e..2707c8d8 100644 --- a/src/bitmessagekivy/kv/common_widgets.kv +++ b/src/bitmessagekivy/kv/common_widgets.kv @@ -40,7 +40,7 @@ opposite_colors: True elevation_normal: 8 md_bg_color: [0.941, 0, 0,1] - on_press: app.root.ids.scr_mngr.current = 'create' + on_press: app.set_screen('create') on_press: app.clear_composer() diff --git a/src/bitmessagekivy/kv/credits.kv b/src/bitmessagekivy/kv/credits.kv index b5eb3db7..1680d6f0 100644 --- a/src/bitmessagekivy/kv/credits.kv +++ b/src/bitmessagekivy/kv/credits.kv @@ -25,4 +25,4 @@ MDRaisedButton: height: dp(38) text: app.tr._("+Add more credits") - on_press: app.root.ids.scr_mngr.current = 'payment' + on_press: app.set_screen('payment') \ No newline at end of file diff --git a/src/bitmessagekivy/kv/login.kv b/src/bitmessagekivy/kv/login.kv index 44e24c04..992938dc 100644 --- a/src/bitmessagekivy/kv/login.kv +++ b/src/bitmessagekivy/kv/login.kv @@ -80,7 +80,7 @@ icon: "chevron-double-right" text: app.tr._("Proceed Next") on_release: - app.root.ids.scr_mngr.current = 'random' + app.set_screen('random') on_press: app.root.ids.sc7.reset_address_label() diff --git a/src/bitmessagekivy/kv/msg_composer.kv b/src/bitmessagekivy/kv/msg_composer.kv index 82a2a8cb..75c9be30 100644 --- a/src/bitmessagekivy/kv/msg_composer.kv +++ b/src/bitmessagekivy/kv/msg_composer.kv @@ -76,7 +76,7 @@ icon: 'qrcode-scan' pos_hint: {'center_x': 0.95, 'y': 0.6} on_release: - if root.is_camara_attached(): app.root.ids.scr_mngr.current = 'scanscreen' + if root.is_camara_attached(): app.set_screen('scanscreen') else: root.camera_alert() on_press: app.root.ids.sc23.get_screen('composer') diff --git a/src/bitmessagekivy/kv/popup.kv b/src/bitmessagekivy/kv/popup.kv index 217d9131..fd64ee26 100644 --- a/src/bitmessagekivy/kv/popup.kv +++ b/src/bitmessagekivy/kv/popup.kv @@ -153,7 +153,7 @@ MDRaisedButton: size_hint: 1.5, None height: dp(40) - on_press: app.root.ids.scr_mngr.current = 'showqrcode' + on_press: app.set_screen('showqrcode') on_press: app.root.ids.sc15.qrdisplay(root, root.address) MDLabel: font_style: 'H6'