Closed siluswayn closed 2 weeks ago
The problem is you have defined the "MDNavigationItemLabel" and "MDNavigationItemIcon" widgets twice, once within the definition of the "BaseMDNavigationItem" at the top, then again when you are adding items to the "MDNavigationBar". Of course this is going to lead to duplicate and inconsistent results. Try removing one of these duplicates:
KV = '''
<BaseMDNavigationItem>
indicator_color:"black"
MDNavigationItemIcon:
icon: root.icon
theme_icon_color:"Custom"
icon_color_normal:(6,6,6)
icon_color_active:"gold"
MDNavigationItemLabel:
text: root.text
theme_text_color: "Custom"
text_color_active: "gold"
text_color_normal:"white"
<BaseScreen>
MDFloatLayout:
orientation: "vertical"
md_bg_color: self.theme_cls.backgroundColor
MDScreenManager:
id: screen_manager
BaseScreen:
name: "Gate"
MDNavigationBar:
on_switch_tabs: app.on_switch_tabs(*args)
theme_bg_color: "Custom"
md_bg_color: "black"
BaseMDNavigationItem
text: "Gate"
icon: "gate"
BaseMDNavigationItem
text: "Alarm"
icon: "alarm-light-outline"
'''
Thanks
Description of the Bug
image number 1 :
I cant get the text to center in the navigation drawer even after using (code included)
halign: "center" halign: "left"
text field is under MDNavigationItemLabel
image number 2 : If i put the text name and icon in the BaseMDNavigationItem it reproduces the name twice
image number 3
the text filed under BaseMDNavigationItem and not under MDNavigationItemLabel
Code and Logs
Screenshots
number 1
number 2
number 3
Versions