def _init_text(self): self.box = Mx.BoxLayout() self.box.set_orientation(Mx.Orientation.VERTICAL) self.box.set_scroll_to_focused(True) self.text = widgets.Label() self.margin = Clutter.Margin.new() self.margin.top = 20 self._lines_quantity = 0 self.margin.left = self.margin.right = 10 self.text.set_margin(self.margin) self.box.add_actor(self.text, 0) self.clutter_text = self.text.get_clutter_text() self.connect("notify::mapped", self._init_setup) self._set_text_params() self.add_actor(self.box)
def _init_text(self): self.box = Mx.BoxLayout() self.box.set_orientation(Mx.Orientation.VERTICAL) self.box.set_scroll_to_focused(True) self.text = Mx.Label() self.margin = Clutter.Margin.new() self.margin.top = 20 self.margin.left = self.margin.right = 10 self.text.set_margin(self.margin) self.box.add_actor(self.text, 0) self.clutter_text = self.text.get_clutter_text() self.connect("notify::mapped", self._check_to_resize) self.clutter_text.connect("text-changed", self._check_to_resize) self.clutter_text.connect("cursor-changed", self._scroll_to_view) self._set_text_params() self.add_actor(self.box)
def create_box_mx(self): return Mx.BoxLayout()