Skip to content

Support grid layouts for bars#104

Open
trevorchipley wants to merge 10 commits intolichie567:mainfrom
trevorchipley:grid-layout-clear-history
Open

Support grid layouts for bars#104
trevorchipley wants to merge 10 commits intolichie567:mainfrom
trevorchipley:grid-layout-clear-history

Conversation

@trevorchipley
Copy link

For a while, there's been an ask for horizontal bar layouts (#82). This implements a more generalized version of that which should be able to handle any grid layout like 1x10, 10x1, 5x5, 3x8, and so on.

Summary of changes:

  • Add configuration settings needed for grid layouts, keeping default settings as the current 1-column layout
    • Add settings related to columns (e.g. bar width)
    • Rounding options for all cardinal, inter-cardinal, and middle bars
      • Since some settings don't apply to 1xN or Nx1 layouts, only relevant settings are shown for those configurations
    • Update naming of some settings that were named based on the single-column layout
  • Calculate bar layout up-front (CalculateLayout) and use the calculated layout to place the bars
    • Instead of the iterative approach DrawBars used to take, this does some math up front to determine the column and row counts based on the user's configuration and the number of combatants
    • Hopefully this reasonably easy to follow, if it needs clarification, let me know
  • Update other elements of the drawing code to work well with grid layouts
    • Split rounding determination out of DrawBars, since grid layouts make it more complicated to decide what rounding to use
    • Scrolling scrolls one row at a time instead of one combatant
    • Column headers are drawn at the top of every column

The diff of all of this taken together is confusing, so I've tried to make the commit history clear.

@trevorchipley
Copy link
Author

Sample screenshots:

3x3:
3x3

3x3, with headers:
3x3-header

3x3, different rounding for various bar placements:
3x3-rounding

3x3, scrolled to show lower bars:
3x3-scrolled

5x5 with fixed bar count and fewer bars than will fit:
5x5-fixed-count

5x5 with fixed bar size and fewer bars than will fit:
5x5-fixed-size

4x2, just to show a non-square multi-row multi-column grid:
4x2

Something horizoverlay-like, since the feature request mentions it:
horizoverlay

@lichie567
Copy link
Owner

Can you help me understand a use case for this? Sorry if this is offensive but the screenshots look bad. The whole point of a histogram style chart is for visual representation of relative values, and that utility is completely undermined by arranging the bars horizontally like this.

@trevorchipley
Copy link
Author

Can you help me understand a use case for this?

Horizontal layouts have been an open feature request for a while, and uses for it are around personal preference or fitting better into a UI (for example, a wide, relatively short window like the last screenshot could fit neatly under a player's hotbars, where a tall window likely wouldn't).

The broader grid layout is admittedly more niche, the only case I thought of is for seeing all players at once without an excessive vertical footprint in alliance raids or something like Baldesion Arsenal or CLL/Dalriada.

Sorry if this is offensive but the screenshots look bad. The whole point of a histogram style chart is for visual representation of relative values, and that utility is completely undermined by arranging the bars horizontally like this.

No offense taken. I agree that the horizontal growth of bars with the horizontal layout loses some visual clarity. In practice while using this the last few weeks, I've found it to be minor, though your mileage may vary. It didn't occur to me before your comment, but (an option for) vertical growth for the bar fill would help with this, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants