qpuiq 0.15__tar.gz → 0.17__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of qpuiq might be problematic. Click here for more details.

Files changed (107) hide show
  1. {qpuiq-0.15/qpuiq.egg-info → qpuiq-0.17}/PKG-INFO +1 -1
  2. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/base.py +19 -0
  3. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/canvas.py +24 -7
  4. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/textfield.py +3 -5
  5. {qpuiq-0.15 → qpuiq-0.17}/PUI/__init__.py +1 -1
  6. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/textfield.py +3 -5
  7. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/application.py +2 -2
  8. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/textfield.py +10 -6
  9. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/textfield.py +3 -5
  10. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/base.py +2 -2
  11. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/progressbar.py +2 -0
  12. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/textfield.py +15 -6
  13. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/window.py +6 -0
  14. {qpuiq-0.15 → qpuiq-0.17/qpuiq.egg-info}/PKG-INFO +1 -1
  15. {qpuiq-0.15 → qpuiq-0.17}/LICENSE.txt +0 -0
  16. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/__init__.py +0 -0
  17. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/application.py +0 -0
  18. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/button.py +0 -0
  19. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/checkbox.py +0 -0
  20. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/combobox.py +0 -0
  21. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/dialog.py +0 -0
  22. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/divider.py +0 -0
  23. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/image.py +0 -0
  24. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/label.py +0 -0
  25. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/layout.py +0 -0
  26. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/matplotlib.py +0 -0
  27. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/mdi.py +0 -0
  28. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/menu.py +0 -0
  29. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/modal.py +0 -0
  30. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/progressbar.py +0 -0
  31. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/radiobutton.py +0 -0
  32. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/scroll.py +0 -0
  33. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/splitter.py +0 -0
  34. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/tab.py +0 -0
  35. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/table.py +0 -0
  36. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/text.py +0 -0
  37. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/toolbar.py +0 -0
  38. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/tree.py +0 -0
  39. {qpuiq-0.15 → qpuiq-0.17}/PUI/PySide6/window.py +0 -0
  40. {qpuiq-0.15 → qpuiq-0.17}/PUI/common.py +0 -0
  41. {qpuiq-0.15 → qpuiq-0.17}/PUI/decorator.py +0 -0
  42. {qpuiq-0.15 → qpuiq-0.17}/PUI/dom.py +0 -0
  43. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/__init__.py +0 -0
  44. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/application.py +0 -0
  45. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/base.py +0 -0
  46. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/button.py +0 -0
  47. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/canvas.py +0 -0
  48. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/checkbox.py +0 -0
  49. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/label.py +0 -0
  50. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/layout.py +0 -0
  51. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/progressbar.py +0 -0
  52. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/radiobutton.py +0 -0
  53. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/scroll.py +0 -0
  54. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/tab.py +0 -0
  55. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/text.py +0 -0
  56. {qpuiq-0.15 → qpuiq-0.17}/PUI/flet/window.py +0 -0
  57. {qpuiq-0.15 → qpuiq-0.17}/PUI/interfaces.py +0 -0
  58. {qpuiq-0.15 → qpuiq-0.17}/PUI/node.py +0 -0
  59. {qpuiq-0.15 → qpuiq-0.17}/PUI/state.py +0 -0
  60. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/__init__.py +0 -0
  61. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/base.py +0 -0
  62. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/button.py +0 -0
  63. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/checkbox.py +0 -0
  64. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/label.py +0 -0
  65. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/layout.py +0 -0
  66. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/progressbar.py +0 -0
  67. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/radiobutton.py +0 -0
  68. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/scroll.py +0 -0
  69. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/tab.py +0 -0
  70. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/text.py +0 -0
  71. {qpuiq-0.15 → qpuiq-0.17}/PUI/textual/window.py +0 -0
  72. {qpuiq-0.15 → qpuiq-0.17}/PUI/timeline.py +0 -0
  73. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/__init__.py +0 -0
  74. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/application.py +0 -0
  75. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/base.py +0 -0
  76. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/button.py +0 -0
  77. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/canvas.py +0 -0
  78. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/checkbox.py +0 -0
  79. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/label.py +0 -0
  80. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/layout.py +0 -0
  81. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/progressbar.py +0 -0
  82. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/radiobutton.py +0 -0
  83. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/scroll.py +0 -0
  84. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/tab.py +0 -0
  85. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/text.py +0 -0
  86. {qpuiq-0.15 → qpuiq-0.17}/PUI/tkinter/window.py +0 -0
  87. {qpuiq-0.15 → qpuiq-0.17}/PUI/utils.py +0 -0
  88. {qpuiq-0.15 → qpuiq-0.17}/PUI/view.py +0 -0
  89. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/__init__.py +0 -0
  90. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/application.py +0 -0
  91. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/button.py +0 -0
  92. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/canvas.py +0 -0
  93. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/checkbox.py +0 -0
  94. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/combobox.py +0 -0
  95. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/dialog.py +0 -0
  96. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/divider.py +0 -0
  97. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/label.py +0 -0
  98. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/layout.py +0 -0
  99. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/radiobutton.py +0 -0
  100. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/scroll.py +0 -0
  101. {qpuiq-0.15 → qpuiq-0.17}/PUI/wx/text.py +0 -0
  102. {qpuiq-0.15 → qpuiq-0.17}/README.md +0 -0
  103. {qpuiq-0.15 → qpuiq-0.17}/qpuiq.egg-info/SOURCES.txt +0 -0
  104. {qpuiq-0.15 → qpuiq-0.17}/qpuiq.egg-info/dependency_links.txt +0 -0
  105. {qpuiq-0.15 → qpuiq-0.17}/qpuiq.egg-info/top_level.txt +0 -0
  106. {qpuiq-0.15 → qpuiq-0.17}/setup.cfg +0 -0
  107. {qpuiq-0.15 → qpuiq-0.17}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qpuiq
3
- Version: 0.15
3
+ Version: 0.17
4
4
  Summary: "PUI" Python Declarative UI Framework
5
5
  Home-page: https://github.com/buganini/PUI
6
6
  Author: Buganini Chiu
@@ -186,6 +186,11 @@ class QtBaseLayout(PUINode):
186
186
  super().destroy(direct)
187
187
 
188
188
  def update(self, prev=None):
189
+ if prev and prev.ui:
190
+ self.mounted_children = prev.mounted_children
191
+ else:
192
+ self.mounted_children = []
193
+
189
194
  super().update(prev)
190
195
  _apply_params(self.ui, self)
191
196
 
@@ -194,6 +199,7 @@ class QtBaseLayout(PUINode):
194
199
  from .layout import Spacer
195
200
  if isinstance(child, Spacer):
196
201
  self.qtlayout.insertItem(idx, child.outer)
202
+ self.mounted_children.insert(idx, child)
197
203
  elif isinstance(child, Modal):
198
204
  pass
199
205
  elif isinstance(child, QtBaseWidget) or isinstance(child, QtBaseLayout):
@@ -201,16 +207,29 @@ class QtBaseLayout(PUINode):
201
207
  if not child.layout_weight is None:
202
208
  params["stretch"] = child.layout_weight
203
209
  self.qtlayout.insertWidget(idx, child.outer, **params)
210
+ self.mounted_children.insert(idx, child)
204
211
 
205
212
  def removeChild(self, idx, child):
206
213
  from .modal import Modal
207
214
  from .layout import Spacer
208
215
  if isinstance(child, Spacer):
209
216
  self.qtlayout.removeItem(child.outer)
217
+ self.mounted_children.pop(idx)
210
218
  elif isinstance(child, Modal):
211
219
  pass
212
220
  elif isinstance(child, QtBaseWidget) or isinstance(child, QtBaseLayout):
213
221
  child.outer.setParent(None)
222
+ self.mounted_children.pop(idx)
223
+
224
+ def postUpdate(self):
225
+ super().postUpdate()
226
+
227
+ for i, child in enumerate(self.mounted_children):
228
+ child = child.get_node()
229
+ self.mounted_children[i] = child.get_node()
230
+
231
+ weight = child.layout_weight
232
+ self.qtlayout.setStretch(i, weight if weight else 0)
214
233
 
215
234
  def qt(self, **kwargs):
216
235
  for k,v in kwargs.items():
@@ -73,10 +73,25 @@ class PUIQtCanvas(QtWidgets.QWidget):
73
73
 
74
74
  node.width = self.geometry().width()
75
75
  node.height = self.geometry().height()
76
- node.painter(node, *node.args)
77
-
76
+ immediate = node.painter(node, *node.args)
78
77
  node.qpainter.end()
79
78
  node.qpainter = None
79
+ if immediate:
80
+ self.update()
81
+
82
+ class ImageResource():
83
+ def crop(self, x, y, width, height):
84
+ ir = ImageResource()
85
+ ir.qimage = self.qimage.copy(x, y, width, height)
86
+ return ir
87
+
88
+ def scale(self, width, height, keepAspectRatio=True, quality=0):
89
+ ir = ImageResource()
90
+ method = {
91
+ 0: QtCore.Qt.TransformationMode.FastTransformation
92
+ }.get(quality, QtCore.Qt.TransformationMode.SmoothTransformation)
93
+ ir.qimage = self.qimage.scaled(width, height, QtCore.Qt.AspectRatioMode.KeepAspectRatio if keepAspectRatio else QtCore.Qt.IgnoreAspectRatio, method)
94
+ return ir
80
95
 
81
96
  class Canvas(QtBaseWidget):
82
97
  def __init__(self, painter, *args):
@@ -300,16 +315,18 @@ class Canvas(QtBaseWidget):
300
315
  raise RuntimeError(f"Not implemented: drawShapely({type(shape).__name__}) {dir(shape)}")
301
316
 
302
317
  def loadImage(self, image_path):
303
- return QImage(image_path)
318
+ ir = ImageResource()
319
+ ir.qimage = QImage(image_path)
320
+ return ir
304
321
 
305
322
  def drawImage(self, image, x=0, y=0, width=None, height=None, src_x=0, src_y=0, src_width=None, src_height=None, opacity=1.0):
306
- if image.isNull():
323
+ if image.qimage.isNull():
307
324
  return
308
325
 
309
326
  if src_width is None:
310
- src_width = image.width() - src_x
327
+ src_width = image.qimage.width() - src_x
311
328
  if src_height is None:
312
- src_height = image.height() - src_y
329
+ src_height = image.qimage.height() - src_y
313
330
 
314
331
  source_rect = QtCore.QRect(src_x, src_y, src_width, src_height)
315
332
 
@@ -320,5 +337,5 @@ class Canvas(QtBaseWidget):
320
337
 
321
338
  dest_rect = QtCore.QRect(x, y, width, height)
322
339
  self.qpainter.setOpacity(opacity)
323
- self.qpainter.drawImage(dest_rect, image, source_rect)
340
+ self.qpainter.drawImage(dest_rect, image.qimage, source_rect)
324
341
  self.qpainter.setOpacity(1.0)
@@ -35,7 +35,7 @@ class TextField(QtBaseWidget):
35
35
 
36
36
  super().update(prev)
37
37
 
38
- def on_editing_finished(self):
38
+ def on_editing_finished(self): # finish editing
39
39
  node = self.get_node()
40
40
  node.editing = False
41
41
  value = self.ui.text()
@@ -51,14 +51,12 @@ class TextField(QtBaseWidget):
51
51
  self._change(e)
52
52
  node.ui.clearFocus()
53
53
 
54
- def on_textchanged(self):
54
+ def on_textchanged(self): # editing
55
55
  node = self.get_node()
56
+ self.editing = True
56
57
  value = self.ui.text()
57
58
  if node.edit_model:
58
- node.editing = True
59
59
  node.edit_model.value = value
60
- else:
61
- node.model.value = value
62
60
  e = PUIEvent()
63
61
  e.value = value
64
62
  self._input(e)
@@ -1,4 +1,4 @@
1
- __version__ = "0.15"
1
+ __version__ = "0.17"
2
2
 
3
3
  from .node import *
4
4
  from .view import *
@@ -30,19 +30,17 @@ class TextField(FBase):
30
30
 
31
31
  super().update(prev)
32
32
 
33
- def on_textbox_changed(self, e):
33
+ def on_textbox_changed(self, e): # editing
34
34
  node = self.get_node()
35
+ node.editing = True
35
36
  value = e.control.value
36
37
  if node.edit_model:
37
- node.editing = True
38
38
  node.edit_model.value = value
39
- else:
40
- node.model.value = value
41
39
  e = PUIEvent()
42
40
  e.value = value
43
41
  self._input(e)
44
42
 
45
- def on_change(self, e):
43
+ def on_change(self, e): # finish editing
46
44
  node = self.get_node()
47
45
  node.editing = False
48
46
  value = e.control.value
@@ -22,10 +22,10 @@ class PUITextualApp(App):
22
22
  event.radio_button.puinode.get_node()._changed(event.value)
23
23
 
24
24
  def on_input_changed(self, event: Input.Changed) -> None:
25
- event.input.puinode.get_node()._changed(event.value)
25
+ event.input.puinode.get_node()._tchanged(event.value)
26
26
 
27
27
  def on_input_submitted(self, event: Input.Submitted) -> None:
28
- event.input.puinode.get_node()._submitted(event.value)
28
+ event.input.puinode.get_node()._tsubmitted(event.value)
29
29
 
30
30
  def on_checkbox_changed(self, event: Checkbox.Changed) -> None:
31
31
  event.checkbox.puinode.get_node()._changed(event.value)
@@ -11,16 +11,20 @@ class TextField(TBase):
11
11
 
12
12
  def update(self, prev):
13
13
  model_value = str(self.model.value)
14
+
14
15
  if prev and prev.ui:
15
16
  self.editing = prev.editing
16
17
  self.ui = prev.ui
17
18
  self.curr_value = prev.curr_value
19
+ self.changing = prev.changing
18
20
 
19
21
  if self.curr_value.set(model_value) and not self.editing:
22
+ self.changing = True # block changed event from next line
20
23
  self.ui.value = model_value
21
24
  else:
22
25
  self.ui = widgets.Input(model_value)
23
26
  self.curr_value = Prop(model_value)
27
+ self.changing = True # block changed event from initialization
24
28
 
25
29
  if self.edit_model and not self.editing:
26
30
  self.edit_model.value = model_value
@@ -28,19 +32,19 @@ class TextField(TBase):
28
32
  self.ui.puinode = self
29
33
  super().update(prev)
30
34
 
31
-
32
- def _changed(self, value):
35
+ def _tchanged(self, value): # editing
36
+ if self.changing:
37
+ self.changing = False
38
+ return
33
39
  node = self.get_node()
40
+ node.editing = True
34
41
  if node.edit_model:
35
- node.editing = True
36
42
  node.edit_model.value = value
37
- else:
38
- node.model.value = value
39
43
  e = PUIEvent()
40
44
  e.value = value
41
45
  self._input(e)
42
46
 
43
- def _submitted(self, value):
47
+ def _tsubmitted(self, value): # finish editing
44
48
  node = self.get_node()
45
49
  node.editing = False
46
50
  node.model.value = value
@@ -30,16 +30,14 @@ class TextField(TkBaseWidget):
30
30
 
31
31
  super().update(prev)
32
32
 
33
- def on_variable_changed(self, var, index, mode):
33
+ def on_variable_changed(self, var, index, mode): # editing
34
34
  node = self.get_node()
35
+ node.editing = True
35
36
  if node.edit_model:
36
- node.editing = True
37
37
  node.edit_model.value = self.variable.get()
38
- else:
39
- node.model.value = self.variable.get()
40
38
  self._input()
41
39
 
42
- def on_change(self):
40
+ def on_change(self): # finish editing
43
41
  node = self.get_node()
44
42
  node.editing = False
45
43
  value = self.variable.get()
@@ -193,9 +193,9 @@ class WxBaseLayout(WXBase):
193
193
 
194
194
  weight = child.layout_weight
195
195
  if self.container_x and child.expand_x:
196
- si.SetProportion(weight if weight else 1 if child.expand_x else 0)
196
+ si.SetProportion(weight if weight else 1 if child.expand_x else 0)
197
197
  elif self.container_y and child.expand_y:
198
- si.SetProportion(weight if weight else 1 if child.expand_y else 0)
198
+ si.SetProportion(weight if weight else 1 if child.expand_y else 0)
199
199
 
200
200
  p = 0
201
201
  if child.layout_padding:
@@ -2,6 +2,8 @@ from .. import *
2
2
  from .base import *
3
3
 
4
4
  class ProgressBar(WxBaseWidget):
5
+ expand_x_prio = 1
6
+
5
7
  def __init__(self, progress, maximum=1):
6
8
  super().__init__()
7
9
  self.progress = progress
@@ -21,10 +21,11 @@ class TextField(WxBaseWidget):
21
21
  self.ui.SetValue(model_value)
22
22
  else:
23
23
  self.curr_value = Prop(model_value)
24
- self.ui = wx.TextCtrl(getWindow(self.parent))
24
+ self.ui = wx.TextCtrl(getWindow(self.parent), style=wx.TE_PROCESS_ENTER)
25
25
  self.ui.SetValue(model_value)
26
26
  self.ui.Bind(wx.EVT_TEXT, self.on_textchanged)
27
27
  self.ui.Bind(wx.EVT_KILL_FOCUS, self.on_kill_focus)
28
+ self.ui.Bind(wx.EVT_TEXT_ENTER, self.on_enter)
28
29
 
29
30
  self.ui.SetMinSize((self.layout_width, self.layout_height))
30
31
 
@@ -33,7 +34,17 @@ class TextField(WxBaseWidget):
33
34
 
34
35
  super().update(prev)
35
36
 
36
- def on_textchanged(self, *args):
37
+ def on_enter(self, event):
38
+ from .window import Window
39
+ p = self.parent
40
+ while p:
41
+ if isinstance(p, Window):
42
+ p.panel.SetFocus()
43
+ break
44
+ p = p.parent
45
+ event.Skip()
46
+
47
+ def on_textchanged(self, event): # editing
37
48
  node = self.get_node()
38
49
  node.editing = True
39
50
  value = self.ui.GetValue()
@@ -43,15 +54,13 @@ class TextField(WxBaseWidget):
43
54
  e.value = value
44
55
  self._input(e)
45
56
 
46
- def on_kill_focus(self, *args):
57
+ def on_kill_focus(self, event): # finish editing
47
58
  node = self.get_node()
59
+ node.editing = False
48
60
  value = self.ui.GetValue()
49
61
  node.model.value = value
50
62
  if node.edit_model:
51
- node.editing = True
52
63
  node.edit_model.value = value
53
- else:
54
- node.model.value = value
55
64
  e = PUIEvent()
56
65
  e.value = value
57
66
  self._change(e)
@@ -16,15 +16,21 @@ class Window(WxBaseWidget):
16
16
  self.fullscreen = fullscreen
17
17
  self.curr_fullscreen = None
18
18
 
19
+ @property
20
+ def inner(self):
21
+ return self.panel
22
+
19
23
  def update(self, prev=None):
20
24
  if prev and prev.ui:
21
25
  self.ui = prev.ui
26
+ self.panel = prev.panel
22
27
  self.curr_icon = prev.curr_icon
23
28
  self.curr_size = prev.curr_size
24
29
  self.curr_maximize = prev.curr_maximize
25
30
  self.curr_fullscreen = prev.curr_fullscreen
26
31
  else:
27
32
  self.ui = wx.Frame(None)
33
+ self.panel = wx.Panel(self.ui) # to grab focus when clicked
28
34
  self.curr_icon = Prop()
29
35
  self.curr_size = Prop()
30
36
  self.curr_maximize = Prop()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qpuiq
3
- Version: 0.15
3
+ Version: 0.17
4
4
  Summary: "PUI" Python Declarative UI Framework
5
5
  Home-page: https://github.com/buganini/PUI
6
6
  Author: Buganini Chiu
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes