git://scm.lunaixsky.com
/
lunaix-os.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
50b4ecf
)
optimize the menuconfig redrawing
author
Minep
<lunaixsky@qq.com>
Sun, 25 Aug 2024 12:24:25 +0000
(13:24 +0100)
committer
Minep
<lunaixsky@qq.com>
Sun, 25 Aug 2024 12:28:37 +0000
(13:28 +0100)
lunaix-os/scripts/build-tools/integration/libtui.py
patch
|
blob
|
history
diff --git
a/lunaix-os/scripts/build-tools/integration/libtui.py
b/lunaix-os/scripts/build-tools/integration/libtui.py
index 30e28f6609e86433ec24bd74288f4f56f0462395..14418360cd5a1251d8ec57fb5599d8c8bc1d106d 100644
(file)
--- a/
lunaix-os/scripts/build-tools/integration/libtui.py
+++ b/
lunaix-os/scripts/build-tools/integration/libtui.py
@@
-538,15
+538,13
@@
class TuiScrollable(TuiObject):
if not self.__content:
return
if not self.__content:
return
- self.__pad.erase()
-
self.__pad_panel.top()
self.__content.on_draw()
wminy, wminx = self._pos.yx()
wmaxy, wmaxx = self._size.yx()
wmaxy, wmaxx = wmaxy + wminy, wmaxx + wminx
self.__pad_panel.top()
self.__content.on_draw()
wminy, wminx = self._pos.yx()
wmaxy, wmaxx = self._size.yx()
wmaxy, wmaxx = wmaxy + wminy, wmaxx + wminx
- self.__pad.touchwin()
+
self.__pad.refresh(*self.__spos.yx(),
wminy, wminx, wmaxy - 1, wmaxx - 1)
self.__pad.refresh(*self.__spos.yx(),
wminy, wminx, wmaxy - 1, wmaxx - 1)
@@
-718,7
+716,7
@@
class TuiPanel(TuiContainerObject):
def on_draw(self):
win = self.__swin.window()
def on_draw(self):
win = self.__swin.window()
- win.
erase
()
+ win.
noutrefresh
()
if self.__use_border:
win.border()
if self.__use_border:
win.border()
@@
-733,8
+731,6
@@
class TuiPanel(TuiContainerObject):
super().on_draw()
super().on_draw()
- win.touchwin()
-
class TuiLabel(TuiWidget):
def __init__(self, context, id):
super().__init__(context, id)
class TuiLabel(TuiWidget):
def __init__(self, context, id):
super().__init__(context, id)
@@
-1135,17
+1131,11
@@
class TuiSession:
ctx.dispatch_event(EventType.E_QUIT, None)
def __redraw(self):
ctx.dispatch_event(EventType.E_QUIT, None)
def __redraw(self):
- self.stdsc.erase()
- self.__win.erase()
+ self.__win.noutrefresh()
self.active().redraw(self.__win)
self.__panbg.bottom()
self.active().redraw(self.__win)
self.__panbg.bottom()
- self.__win.touchwin()
- self.__winbg.touchwin()
-
- self.__win.refresh()
- self.__winbg.refresh()
cpanel.update_panels()
curses.doupdate()
cpanel.update_panels()
curses.doupdate()