Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce autoTitleRightAlign column flag #1297

Closed
wants to merge 1 commit into from

Conversation

cgzones
Copy link
Member

@cgzones cgzones commented Sep 3, 2023

Instead of handling PERCENT_CPU as a special case for whether to align the title of a dynamically sized column to the right or the left introduce a new flag, which can be reused by other columns.

Split from #1288

/cc @Explorer09

Instead of handling PERCENT_CPU as a special case for whether to align
the title of a dynamically sized column to the right or the left
introduce a new flag, which can be reused by other columns.
@@ -209,6 +209,9 @@ typedef struct ProcessFieldData_ {

/* Whether the column width is dynamically adjusted (the minimum width is determined by the title length) */
bool autoWidth;

/* Whether the title of a column with dynamically adjusted width is right aligned (default is left aligned) */
bool autoTitleRightAlign;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything automatic about the alignment? (i.e. could the name be simplified to just 'titleRightAlign'?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That auto refers to the automatic resize of certain columns.

@Explorer09
Copy link
Contributor

My concerns about the autoTitleRightAlign flag are these:

  1. There is only one user of the flag in this commit. Generally we shouldn't introduce a flag when there is only one user using it.
  2. If a column needs to be right-aligned, the alignment would likely apply to not just the title, but the data cells as well. (It won't make sense to just right align the title and not the data.)

@cgzones
Copy link
Member Author

cgzones commented Mar 27, 2024

Applied via cbcfc5f

@cgzones cgzones closed this Mar 27, 2024
@cgzones cgzones deleted the autoTitleRightAlign branch March 27, 2024 18:50
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.

4 participants