Facing issue using Action Bar in Python kivy Application

前端 未结 1 1718
甜味超标
甜味超标 2021-02-11 04:39

I am working on developing an application using Kivy. I am using Kivy ActionBar for creating a menu bar for my application.

Kindly refer to the image attached

I

1条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-11 04:41

    Right on ActionPrevious you can set app_icon. It's a little bit lower in docs. You can set app_icon_width/height for size of the icon or even remove it with app_icon='', but it'll leave white rectangle instead of a "transparent". Leave app_icon be and set only width and height to make it invisible.

    The ĄctionPrevious has ActionItem's minimum_width property, therefore you need to change it like this:

    menuAcPrevious = ActionPrevious(with_previous=False,
                             app_icon=,
                             app_icon_width=1,
                             app_icon_height=0,
                             minimum_width=10,
                             size_hint_x: None)
    

    Edit: It seems that ActionPrevious leaves additional unused space even if title='' and minimum_width=1 and you can't access the damn thing through children because it's unregistered, therefore the only thing I came up with is resizing it so you won't see it anymore:

    ActionPrevious(
        size_hint_x = None,
        width = 0,
        app_icon_width = 0.1,
        with_previous = False)
    

    0 讨论(0)
提交回复
热议问题