KivyMD icon indicating copy to clipboard operation
KivyMD copied to clipboard

MDSmartTile with overlap not working

Open dineshbvadhia opened this issue 8 months ago • 0 comments

The default box_color for the MDSmartTile 'information box' is (0, 0, 0, 0.5) to make it semi-transparent. Consider:

<GridTile>:
    MDSmartTile:
        overlap: True
        source: root.tile
        size_hint_y: 1
        on_press: app.on_one(self, self.source)

        MDCheckbox:
            size_hint_y: 1
            active: root.tick_key in app.current_selection
            on_press: app.on_tickcross(self, root.tick_key, root.index, root.cb_state, self.active)

The appliction themes are:

    self.theme_cls.material_style = "M3"
    self.theme_cls.theme_style = "Dark"
  1. If overlap: True, the information box is semi-transparent but the code doesn't work as expected - clicking the checkbox triggers on_press: on_one(), clicking the image triggers on_press: on_one().

  2. If overlap: False, the information box is not semi-transparent but the code works as expected ie. clicking the checkbox triggers on_press: on_tickcross(), clicking the image triggers on_press: on_one().

  • OS: Windows 11
  • Python: 3.11
  • Kivy: 2.2.1
  • KivyMD: 1.1.1

dineshbvadhia avatar Nov 30 '23 11:11 dineshbvadhia