Love-Pengy / git-stats

OBS Plugin To Show Git Diff Stats
GNU General Public License v2.0
9 stars 2 forks source link

Start Text Anchored In Middle And Expand Out #21

Closed Love-Pengy closed 4 weeks ago

Love-Pengy commented 1 month ago

Describe In Detail What The Feature You Want Is, And How It Differs From The Current Release. At the current moment the amount of text space used depends on how many characters are actively used by the insertion source and deletion source, but it should always be constant so that the source width is always the same.

Ex. If I have 0 inserted and 0 deleted there will be three character spaces used: '0', ' ', '0' but if I have 10 in each 5 character spaces will be used '10', ' ', '10' this causes a disconnect in centering and width of the source

Describe What Your Solution Would Look Like When doing the spaced calculation the amount of spaces should be MAX_SPACES - amount of characters. And the spaces should be prepended to the start of the text array so that the text starts right next to the middle spacer and expands out towards the spaces

Love-Pengy commented 1 month ago

To add to this: if insertions or deletions is disabled and the other is enabled then the one that is enabled should be centered

Love-Pengy commented 1 month ago

Final Update: Sources cannot be truly centered since it's a monospaces font therefore I opted to center the symbol instead