quitegreensky / akivymd

A set of fancy widgets for KivyMD
MIT License
40 stars 9 forks source link

Demo Error #11

Closed kengoon closed 4 years ago

kengoon commented 4 years ago

in the main.py file MyMenuItem was declared 2 times <MyMenuItem@OneLineAvatarListItem> and

class MyMenuItem(OneLineAvatarListItem):
    pass

I fixed it on my local machine by removing @OneLineAvatarListItem from the kv code

Also there is a bug in Navigationrail Screen

  19:        text: root.text
      20:        theme_text_color: 'Custom'
 >>   21:        text_color: root.active_text_color if root.active else root.text_color
      22:        halign: 'left'
      23:        valign: 'center'
 ...
 ValueError: MDLabel.color must have 3 or 4 components (got [])

though the python interpreter never showed that I had to manually debug the program by putting a checker on this

def on_start(self):
        counter = 0
        for screen in self.screens:
            if counter ==19:
                print(screen)
                break
            self.mainkv.ids.sm.add_widget(eval('Factory.%s()' % screen))
            counter += 1

i guess you missed the adding the active_text_color, that is why it is using the default empty list value.

I noticed something else, which is an awesome feature that you added i.e change_statusbar_color, which I believe that it makes use of jinus module but in the buildozer.spec file there is no pyjnius module, I think you should add it so that developers who are new to akivymd will not have a bad impression about this project when they try to build it and see how it looks like

Still digging to find a fix

EDITED parent cannot be assigned on init method getting this error

line 117, in _update
     self.root = self.parent.parent
 AttributeError: 'NoneType' object has no attribute 'parent'

the line should be removed and since it of no use to _update() method. It should be added to the on_release() method

here

def _update(self):
        if not self.active_text_color:
            self.active_text_color = self.theme_cls.primary_color

        if not self.text_color:
            self.text_color = self.theme_cls.text_color

        if not self.active_icon_color:
            self.active_icon_color = self.theme_cls.primary_color

        if not self.icon_color:
            self.icon_color = self.theme_cls.text_color

    def on_release(self):
        self.root = self.parent.parent
        index = self.root.ids.items_box.children.index(self)
        self.root.set_current(index, item_index=False)
        return super().on_release()
quitegreensky commented 4 years ago

Thanks for your bug report . Fixed.

which I believe that it makes use of jinus module but in the buildozer.spec file there is no pyjnius module

You don't need to add pyjinus to buildozer.spec . It will be added to the builds by default.