EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
993 stars 155 forks source link

UI: Allow configuration of number of UI columns. #1813

Open Athanasius opened 1 year ago

Athanasius commented 1 year ago

Quite a few users are utilising so many plugins, with UI elements, that only growing vertically is becoming a problem.

The simplest solution to this would appear to be to allow a user-configurable number of columns of UI.

  1. The main UI would always sit only in column 1. I'm envisaging the rendered size of this not changing.
  2. Any additional columns would take in plugins' UI in a left-to-right then top-to-bottom manner.
    Main UI
    Plugin1
    Plugin2
    Plugin3
    Plugin4
    Plugin5
    Update/Status

    with two columns configured becomes:

    Main UI | <empty>
    Plugin1 | Plugin2
    Plugin3 | Plugin4
    Plugin5 | <empty>
    Update/Status

    This will go hand in hand with the implementation of https://github.com/EDCD/EDMarketConnector/issues/1792 ... and it might therefore be easier to do that after this.

DawnTreader commented 1 year ago

I think that configurable columns would be great, but even better would be tear off tabs or floating panels. I mainly use EDMC for the overlay and the fleet carrier plug in features at this point. If each plugin was able to be put in its own panel and overlayed I think that would make a lot of CMDRs happy.

Athanasius commented 1 year ago

I can't recall if I documented this outside of some Discord mutterings.

With tk/tkinter you cannot re-parent a widget once it's created. This means no ability to start with the UI as it is now, coding it the simplest way, and then move a window out to its own (i.e. not parented to the main UI, possibly parented to a 'manage this floating window' frame).

Instead the code would have to be complicated by making the "docked together" instance actually be faked with some code to make all of those frames follow each other when the master one is moved. i.e. you'd have a bunch of actually completely independent top-level frames that you need to make always move, and resize, together. In essence writing a mini window manager in order to make this work.

parduz commented 1 year ago

Not all plugins are useful on overlay (the neutron router, as example) and someone with 2 monitors may be happy to have them as they are now, just with a better arrangement.