def __init__(self, parent, text=None, icon=None): Entry.__init__(self, parent, scrollable=True, single_line=True, size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH) self.show() if text: self.text = text if icon: self.icon = icon ic = SafeIcon(self, 'go-down') ic.size_hint_min = 16, 16 # TODO file a bug for elm on phab ic.callback_clicked_add(self.activate) self.part_content_set('end', ic) self._itc = GenlistItemClass(item_style='default', text_get_func=self._gl_text_get, content_get_func=self._gl_content_get) self._list = Genlist(self) self._list.callback_selected_add(self._list_selected_cb) self._hover = Hover(self.parent, target=self) self._bg = Background(self, size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH) fr = Frame(self, style='pad_medium', size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH) fr.content = self._list fr.show() self._table = Table(self, size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH) self._table.pack(self._bg, 0, 0, 1, 1) self._table.pack(fr, 0, 0, 1, 1) self._selected_func = None
def __init__(self, parent): self.task = None Entry.__init__(self, parent, scrollable=True, disabled=True, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) self.part_text_set('guide', self.GUIDE1) self.callback_clicked_add(self._clicked_cb) self.callback_unfocused_add(self._unfocused_cb) self.show()
def __init__(self, win): self.win = win Entry.__init__(self, win, single_line=True, size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) self.callback_clicked_add(self._click_cb) self.callback_activated_add(self._done_cb, save=True) self.callback_unfocused_add(self._done_cb, save=False) self.callback_aborted_add(self._done_cb, save=False) self.go_passive()
def __init__(self, app): self.app = app Entry.__init__(self, app.win, single_line=True, text='No repository loaded', size_hint_weight=EXPAND_HORIZ, size_hint_align=FILL_HORIZ) self.callback_clicked_add(self._click_cb) self.callback_activated_add(self._done_cb, save=True) self.callback_unfocused_add(self._done_cb, save=False) self.callback_aborted_add(self._done_cb, save=False) self.go_passive()
def __init__(self, canvas, *args, **kwargs): Entry.__init__(self, canvas, *args, **kwargs) self.scrollable = True
def __init__(self, parent): wrap = ELM_WRAP_MIXED if options.diff_text_wrap else ELM_WRAP_NONE Entry.__init__(self, parent, scrollable=True, editable=False, line_wrap=wrap, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH) self.loading_set()
def __init__(self, parent): wrap = ELM_WRAP_MIXED if options.diff_text_wrap else ELM_WRAP_NONE Entry.__init__(self, parent, scrollable=True, editable=False, line_wrap=wrap, text="<info>Loading diff, please wait...</info>", size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)