summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-08-09 23:35:38 +0200
committerdavemds <dave@gurumeditation.it>2014-08-09 23:35:38 +0200
commit771f0616daf7cb5e2e71e2ad4bd11df00676d756 (patch)
treeeb2eda0c6af74b7b0ba0cff2caeac54219530d96
parent04c9800df0c2250199967d1b6ff781525088a668 (diff)
Fix the signal popup to actually show up
...a scrollable Entry as Popup content... need the table+rect hack to respect minsize
-rw-r--r--espionage/espionage.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/espionage/espionage.py b/espionage/espionage.py
index 4afc3fb..7203620 100644
--- a/espionage/espionage.py
+++ b/espionage/espionage.py
@@ -48,6 +48,11 @@ from efl.elementary.genlist import Genlist, GenlistItem, GenlistItemClass, \
48from efl.dbus_mainloop import DBusEcoreMainLoop 48from efl.dbus_mainloop import DBusEcoreMainLoop
49 49
50 50
51EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
52EXPAND_HORIZ = EVAS_HINT_EXPAND, 0.0
53FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL
54FILL_HORIZ = EVAS_HINT_FILL, 0.5
55
51class Options(object): 56class Options(object):
52 """class to contain application options""" 57 """class to contain application options"""
53 def __init__(self): 58 def __init__(self):
@@ -751,13 +756,22 @@ class SignalReceiver(Frame):
751 pp = Popup(self._parent) 756 pp = Popup(self._parent)
752 pp.part_text_set('title,text', 'Signal content') 757 pp.part_text_set('title,text', 'Signal content')
753 758
754 en = Entry(self, text = prettify_if_needed(item.data['args'])) 759 # good'old table+rect trick to let the entry actually show up
755 en.size_hint_weight = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND 760 from efl.evas import Rectangle
756 en.size_hint_align = EVAS_HINT_FILL, EVAS_HINT_FILL 761 tb = Table(pp)
757 en.size_hint_min = 800, 800 # TODO: this should be respected :/ 762 tb.show()
758 en.editable = False 763 pp.content = tb
759 en.scrollable = True 764
760 pp.content = en 765 rect = Rectangle(pp.evas, size_hint_min=(200, 200),
766 size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
767 tb.pack(rect, 0, 0, 1, 1)
768
769 en = Entry(self, text=prettify_if_needed(item.data['args']),
770 editable=False, scrollable=True,
771 size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
772 # en.size_hint_min=(200, 200) # THIS SHOULD WORK... but dont :/
773 tb.pack(en, 0, 0, 1, 1)
774 en.show()
761 775
762 bt = Button(pp, text="Close") 776 bt = Button(pp, text="Close")
763 bt.callback_clicked_add(lambda b: pp.delete()) 777 bt.callback_clicked_add(lambda b: pp.delete())