mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-03-21 14:26:26 -04:00
Updated nomadnet to use Urwid 2.4.2
This commit is contained in:
parent
910e527cc7
commit
0ed4e09b82
@ -163,9 +163,8 @@ class GuideDisplay():
|
||||
entry.display_topic(entry.display_topic, entry.topic_name)
|
||||
|
||||
def set_content_widgets(self, new_content):
|
||||
options = self.columns.options(width_type="weight", width_amount=1-GuideDisplay.list_width)
|
||||
options = self.columns.options(width_type="weight", width_amount=1-GuideDisplay.list_width, box_widget=True)
|
||||
pile = urwid.Pile(new_content)
|
||||
#content = urwid.LineBox(urwid.Filler(pile, "top"))
|
||||
content = urwid.LineBox(urwid.AttrMap(ScrollBar(Scrollable(pile), thumb_char="\u2503", trough_char=" "), "scrollbar"))
|
||||
|
||||
self.columns.contents[1] = (content, options)
|
||||
@ -398,7 +397,7 @@ You're currently located in the guide section of the program. I'm sorry I had to
|
||||
|
||||
To get the most out of Nomad Network, you will need a terminal that supports UTF-8 and at least 256 colors, ideally true-color. If your terminal supports true-color, you can go to the `![ Config ]`! menu item, launch the editor and change the configuration.
|
||||
|
||||
It is recommended to use a terminal size of at least 122x32. Nomad Network will work with smaller terminal sizes, but the interface might feel a bit cramped.
|
||||
It is recommended to use a terminal size of at least 135x32. Nomad Network will work with smaller terminal sizes, but the interface might feel a bit cramped.
|
||||
|
||||
If you don't already have a Nerd Font installed (see https://www.nerdfonts.com/), I also highly recommend to do so, since it will greatly expand the amount of glyphs, icons and graphics that Nomad Network can use. Once you have your terminal set up with a Nerd Font, go to the `![ Config ]`! menu item and enable Nerd Fonts in the configuration instead of normal unicode glyphs.
|
||||
|
||||
@ -1156,7 +1155,7 @@ To display literal content, for example source-code, or blocks of text that shou
|
||||
`=
|
||||
'''
|
||||
TOPIC_MARKUP += TOPIC_MARKUP.replace("`=", "\\`=") + "[ micron source for document goes here, we don't want infinite recursion now, do we? ]\n\\`="
|
||||
TOPIC_MARKUP += "\n`=\n\n>Closing Remarks\n\nIf you made it all the way here, you should be well equipped to write documents, pages and applications using micron and Nomad Network. Thank you for staying with me.\n\n`c\U0001F332\n"
|
||||
TOPIC_MARKUP += "\n`=\n\n>Closing Remarks\n\nIf you made it all the way here, you should be well equipped to write documents, pages and applications using micron and Nomad Network. Thank you for staying with me.\n"
|
||||
|
||||
|
||||
TOPICS = {
|
||||
|
@ -116,6 +116,7 @@ class MainDisplay():
|
||||
|
||||
def show_log(self, user_data):
|
||||
self.sub_displays.active_display = self.sub_displays.log_display
|
||||
self.sub_displays.log_display.show()
|
||||
self.update_active_sub_display()
|
||||
|
||||
def show_guide(self, user_data):
|
||||
@ -125,6 +126,8 @@ class MainDisplay():
|
||||
def update_active_sub_display(self):
|
||||
self.frame.contents["body"] = (self.sub_displays.active().widget, None)
|
||||
self.update_active_shortcuts()
|
||||
if self.sub_displays.active_display != self.sub_displays.log_display:
|
||||
self.sub_displays.log_display.kill()
|
||||
|
||||
def update_active_shortcuts(self):
|
||||
self.frame.contents["footer"] = (self.sub_displays.active().shortcuts().widget, None)
|
||||
|
6
nomadnet/vendor/Scrollable.py
vendored
6
nomadnet/vendor/Scrollable.py
vendored
@ -268,10 +268,10 @@ class Scrollable(urwid.WidgetDecoration):
|
||||
def _get_original_widget_size(self, size):
|
||||
ow = self._original_widget
|
||||
sizing = ow.sizing()
|
||||
if FIXED in sizing:
|
||||
return ()
|
||||
elif FLOW in sizing:
|
||||
if FLOW in sizing:
|
||||
return (size[0],)
|
||||
elif FIXED in sizing:
|
||||
return ()
|
||||
|
||||
def get_scrollpos(self, size=None, focus=False):
|
||||
"""Current scrolling position
|
||||
|
2
setup.py
2
setup.py
@ -30,6 +30,6 @@ setuptools.setup(
|
||||
entry_points= {
|
||||
'console_scripts': ['nomadnet=nomadnet.nomadnet:main']
|
||||
},
|
||||
install_requires=["rns>=0.7.0", "lxmf>=0.3.8", "urwid==2.1.2", "qrcode"],
|
||||
install_requires=["rns>=0.7.0", "lxmf>=0.3.8", "urwid>=2.4.2", "qrcode"],
|
||||
python_requires=">=3.6",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user