added sub tab in settings

This commit is contained in:
shekhar-cis 2021-11-09 14:26:49 +05:30
parent 7abb2bc55c
commit f981acbe94
Signed by untrusted user: shekhar-cis
GPG Key ID: 8B2A6C8D5F7F1635
3 changed files with 249 additions and 2 deletions

View File

@ -23,7 +23,9 @@ from kivy.uix.recycleview.layout import LayoutSelectionBehavior
from kivy.uix.recycleview.views import RecycleDataViewBehavior
from kivy.uix.screenmanager import Screen
from kivy.uix.textinput import TextInput
from kivymd.uix.behaviors.hover_behavior import HoverBehavior
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.theming import ThemableBehavior
import state
import queues
@ -237,8 +239,23 @@ class DropDownWidget(BoxLayout):
"""Callback of alert box"""
dialog_box.dismiss()
toast(text_item)
# class HoverItem(MDBoxLayout, ThemableBehavior, HoverBehavior):
# '''Custom item implementing hover behavior.'''
# def __init__(self, **kwargs):
# """Getting Text Input."""
# super(HoverItem, self).__init__(**kwargs)
# # import pdb; pdb.set_trace()
# def on_enter(self):
# # import pdb; pdb.set_trace()
# Window.set_system_cursor('hand')
# def on_leave(self):
# Window.set_system_cursor('arrow')
class MyTextInput(MDTextField):
"""MyTextInput class for kivy Ui"""
@ -251,6 +268,8 @@ class MyTextInput(MDTextField):
def __init__(self, **kwargs):
"""Getting Text Input."""
super(MyTextInput, self).__init__(**kwargs)
# import pdb; pdb.set_trace()
self.__lineBreak__ = 0
def on_text(self, instance, value): # pylint: disable=unused-argument

View File

@ -86,7 +86,7 @@
hint_text: 'Subject'
height: 100
font_size: '15sp'
icon_right: 'text-subject'
icon_right: 'notebook-outline'
icon_right_color: app.theme_cls.primary_light
current_hint_text_color: 0,0,0,0.5
font_color_normal: 0, 0, 0, 1

View File

@ -540,4 +540,232 @@
MDRaisedButton:
text: app.tr._('Apply')
Tab:
text: 'Max acceptable Difficulty'
ScrollView:
do_scroll_x: False
BoxLayout:
size_hint_y: None
orientation: 'vertical'
height: dp(210 if app.app_platform == 'android' else 100)+ self.minimum_height
padding: 20
# spacing: 10
BoxLayout:
# size_hint_y: None
id: box1_height
orientation: 'vertical'
# height: dp(100) + self.minimum_height
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._(root.exp_text)
halign: 'left'
BoxLayout:
id: box2_height
size_hint_y: None
orientation: 'vertical'
height: dp(30) + self.minimum_height
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("Leave these input fields blank for the default behavior.")
halign: 'left'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
padding: [10, 0, 0, 0]
height: dp(50) + self.minimum_height
BoxLayout:
orientation: 'horizontal'
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("Give up after")
halign: 'left'
MDTextFieldRect:
size_hint: None, None
size: dp(70), dp(30)
text: app.tr._('0')
pos_hint: {'center_y': .5, 'center_x': .5}
input_filter: "int"
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("days and")
halign: 'left'
MDTextFieldRect:
size_hint: None, None
size: dp(70), dp(30)
text: '0'
pos_hint: {'center_y': .5, 'center_x': .5}
input_filter: "int"
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "months"
halign: 'left'
BoxLayout:
size_hint_y: None
spacing:5
orientation: 'horizontal'
# pos_hint: {'left': 0}
# pos_hint: {'x':.75}
height: dp(50) + self.minimum_height
# MDRaisedButton:
# text: app.tr._('Cancel')
MDRaisedButton:
text: app.tr._('Apply')
Tab:
text: 'Demanded Difficulty'
ScrollView:
do_scroll_x: False
BoxLayout:
size_hint_y: None
orientation: 'vertical'
height: dp(210 if app.app_platform == 'android' else 100)+ self.minimum_height
padding: 20
# spacing: 10
BoxLayout:
# size_hint_y: None
id: box1_height
orientation: 'vertical'
# height: dp(100) + self.minimum_height
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._(root.exp_text)
halign: 'left'
BoxLayout:
id: box2_height
size_hint_y: None
orientation: 'vertical'
height: dp(30) + self.minimum_height
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("Leave these input fields blank for the default behavior.")
halign: 'left'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
padding: [10, 0, 0, 0]
height: dp(50) + self.minimum_height
BoxLayout:
orientation: 'horizontal'
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("Give up after")
halign: 'left'
MDTextFieldRect:
size_hint: None, None
size: dp(70), dp(30)
text: app.tr._('0')
pos_hint: {'center_y': .5, 'center_x': .5}
input_filter: "int"
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("days and")
halign: 'left'
MDTextFieldRect:
size_hint: None, None
size: dp(70), dp(30)
text: '0'
pos_hint: {'center_y': .5, 'center_x': .5}59468066
input_filter: "int"
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "months"
halign: 'left'
BoxLayout:
size_hint_y: None
spacing:5
orientation: 'horizontal'
# pos_hint: {'left': 0}
# pos_hint: {'x':.75}
height: dp(50) + self.minimum_height
# MDRaisedButton:
# text: app.tr._('Cancel')
MDRaisedButton:
text: app.tr._('Apply')
Tab:
text: 'Namecoin Integration'
ScrollView:
do_scroll_x: False
BoxLayout:
size_hint_y: None
orientation: 'vertical'
height: dp(210 if app.app_platform == 'android' else 100)+ self.minimum_height
padding: 20
# spacing: 10
BoxLayout:
# size_hint_y: None
id: box1_height
orientation: 'vertical'
# height: dp(100) + self.minimum_height
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._(root.exp_text)
halign: 'left'
BoxLayout:
id: box2_height
size_hint_y: None
orientation: 'vertical'
height: dp(30) + self.minimum_height
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("Leave these input fields blank for the default behavior.")
halign: 'left'
BoxLayout:
size_hint_y: None
orientation: 'vertical'
padding: [10, 0, 0, 0]
height: dp(50) + self.minimum_height
BoxLayout:
orientation: 'horizontal'
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("Give up after")
halign: 'left'
MDTextFieldRect:
size_hint: None, None
size: dp(70), dp(30)
text: app.tr._('0')
pos_hint: {'center_y': .5, 'center_x': .5}
input_filter: "int"
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: app.tr._("days and")
halign: 'left'
MDTextFieldRect:
size_hint: None, None
size: dp(70), dp(30)
text: '0'
pos_hint: {'center_y': .5, 'center_x': .5}
input_filter: "int"
MDLabel:
font_style: 'Body1'
theme_text_color: 'Primary'
text: "months"
halign: 'left'
BoxLayout:
size_hint_y: None
spacing:5
orientation: 'horizontal'
# pos_hint: {'left': 0}
# pos_hint: {'x':.75}
height: dp(50) + self.minimum_height
# MDRaisedButton:
# text: app.tr._('Cancel')
MDRaisedButton:
text: app.tr._('Apply')
Loader: