from kivy.uix.camera import Camera
from mpfmc.uix.widget import MpfWidget


class CameraWidget(MpfWidget, Camera):
    widget_type_name = "Camera"

    def __init__(self, mc, config, key=None, **kwargs):
        super().__init__(mc=mc, config=config, key=key)

    def pass_to_kivy_widget_init(self):
        return dict(resolution=(self.config['width'],
                                self.config['height']),
                    index=self.config['camera_index'])

widget_classes = [CameraWidget]

@@ -53,19 +53,35 @@
 dget
- import Mpf
+_container import Contained
 Widg
@@ -108,11 +108,17 @@
 get(
-Mpf
+Contained
 Widg

Refactor camera widget