libyui / libyui-ncurses

libyui-ncurses
http://doc.opensuse.org/projects/libyui
19 stars 18 forks source link

Add MenuBar #97

Closed joseivanlopez closed 4 years ago

joseivanlopez commented 4 years ago

This PR replaces https://github.com/libyui/libyui-ncurses/pull/93.

Trello

https://trello.com/c/4GtDpmMo/

Overview

This adds a MenuBar widget to the NCurses UI.

For more details, see the main PR for this feature:

https://github.com/libyui/libyui/pull/169

Travis Build Failure

This doesn't build because the image used by Travis does not yet contain the libyui with the new features. This is expected.

Related PRs

Proposed Solution

There is a new class NCMenuBar that manages the top menu list. This class has the following responsibilities:

The class NCPopupMenu was extended, gaining these responsibilities:

The NCPopupMenu internally uses a NCTable, and this could have some drawbacks:

Screenshot from 2020-08-12 17-02-42

Screenshot from 2020-08-12 16-57-29

Pending Tasks:

NOTE: Pending tasks will come in another PR. We want to merge this now to synchronize SO version of all libyui related packages.

shundhammer commented 4 years ago

LGTM for an intermediate merge so we can move forward with this.

anaselli commented 4 years ago

I would add on pending task also:

And yes please add something to show separator, leaving an empty line is not looking like a separator

anaselli commented 4 years ago

In a first try I also changed "..." to show that there is a sub menu with ">" maybe you can think to do something like that pretty better looking, I gave up just thinking to R2L languages

I like the menu selection and move left and right that i haven't implemented so well.

Please follow also discussion here