krazkidd / kdeck

Desktop client for Kalshi event trading platform
GNU General Public License v3.0
1 stars 0 forks source link

Positions take up too much screen space (requiring lots of scrolling) #34

Open krazkidd opened 1 week ago

krazkidd commented 1 week ago

The basic problem here is that we are using a wxGridSizer (see here and here). This component sets column widths equally per the docs. The problem became obvious when one of the market names got a little lengthy, causing all columns to take the same large width.

You can see in this screenshot how much empty space there is between the numerical columns.

image

krazkidd commented 1 week ago

Currently each event/market position is it's own wxPanel (EventPositionPanel/MarketPositionPanel).

If I simply replace the current wxGridSizer of each panel with wxBoxSizer, there is no easy way to align columns (see screenshot) because wxBoxSizer has no such concept. We would have to calculate column widths in the parent (PortfolioPanel) and pass those to the child position panels.

image

We may have to consolidate all the positions into a single wxFlexGridSizer. The intent of EventPositionPanel/MarketPositionPanel was to separate concerns, but they don't do anything other than set up a wxGridSizer.