mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
console: grideditors don't display their own titles anymore
This commit is contained in:
parent
040238e255
commit
2054739c1e
@ -280,12 +280,6 @@ class BaseGridEditor(urwid.WidgetWrap):
|
|||||||
first_width = max(len(r), first_width)
|
first_width = max(len(r), first_width)
|
||||||
self.first_width = min(first_width, FIRST_WIDTH_MAX)
|
self.first_width = min(first_width, FIRST_WIDTH_MAX)
|
||||||
|
|
||||||
title = None
|
|
||||||
if self.title:
|
|
||||||
title = urwid.Text(self.title)
|
|
||||||
title = urwid.Padding(title, align="left", width=("relative", 100))
|
|
||||||
title = urwid.AttrWrap(title, "heading")
|
|
||||||
|
|
||||||
headings = []
|
headings = []
|
||||||
for i, col in enumerate(self.columns):
|
for i, col in enumerate(self.columns):
|
||||||
c = urwid.Text(col.heading)
|
c = urwid.Text(col.heading)
|
||||||
@ -301,10 +295,7 @@ class BaseGridEditor(urwid.WidgetWrap):
|
|||||||
|
|
||||||
self.walker = GridWalker(self.value, self)
|
self.walker = GridWalker(self.value, self)
|
||||||
self.lb = GridListBox(self.walker)
|
self.lb = GridListBox(self.walker)
|
||||||
w = urwid.Frame(
|
w = urwid.Frame(self.lb)
|
||||||
self.lb,
|
|
||||||
header=urwid.Pile([title, h]) if title else None
|
|
||||||
)
|
|
||||||
super().__init__(w)
|
super().__init__(w)
|
||||||
signals.footer_help.send(self, helptext="")
|
signals.footer_help.send(self, helptext="")
|
||||||
self.show_empty_msg()
|
self.show_empty_msg()
|
||||||
|
Loading…
Reference in New Issue
Block a user