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

fix(color): Center flight mode text and 6Pos numbers #2893

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

mha1
Copy link
Contributor

@mha1 mha1 commented Dec 18, 2022

fixes #2818

6POS.mp4

@mha1
Copy link
Contributor Author

mha1 commented Dec 18, 2022

This is an alternative implementation to #2887 plus new 6 position switch presentation, please see video

@Eldenroot
Copy link
Contributor

Looks nice!

@gagarinlg
Copy link
Member

Did you test this with the NV14 simu/simulator?

@mha1
Copy link
Contributor Author

mha1 commented Dec 18, 2022

Did you test this with the NV14 simu/simulator?

working in it

@mha1
Copy link
Contributor Author

mha1 commented Dec 18, 2022

Did you test this with the NV14 simu/simulator?

Well, it seems NV14 doesn't have a 6Pos. And shouldn't have flight mode texts longer than 6 characters. This is not releated to this PR. Want me to put in an issue?

image

@mha1
Copy link
Contributor Author

mha1 commented Dec 18, 2022

@pfeerick I count three thumbs up (@rotorman @eshifri and @Eldenroot), no thumbs down so far. Please decide if this is worthy

@philmoz
Copy link
Collaborator

philmoz commented Dec 18, 2022

Looks good. It's a bit busier than the tick marks so the selected number does not stand apart quite as much (IMHO).
I wonder if it's possible to use a slightly larger font for the selected number so it pops out a but more?

@mha1
Copy link
Contributor Author

mha1 commented Dec 19, 2022

I believe fonts have to be generated for different sizes. Those are currently avalable:

enum FontIndex
{
  FONT_STD_INDEX,
  FONT_BOLD_INDEX,
  FONT_XXS_INDEX,
  FONT_XS_INDEX,
  FONT_L_INDEX,
  FONT_XL_INDEX,
  FONT_XXL_INDEX,

  // this one MUST be last
  FONTS_COUNT
};

XS is used for the numbers. The next step up from XS is L. This is what it looks like:
image

Using L you'd need to change the box size, the spacing (with it width changes), the vertical position of the numbers and it would move the flight mode up. Think this effort is not justified and moving flight mode text up probably interferes with the widget area. And I believe generating a new font with maybe 1 or 2 pixels size increase would also be frowned up by management.

@philmoz
Copy link
Collaborator

philmoz commented Dec 19, 2022

I was also playing with this, here's a small tweak to your idea.
The change to the selected number display is:
dc->drawNumber(x+MULTIPOS_W_SPACING/4, -2, value+1, FONT(BOLD) | COLOR_THEME_PRIMARY2);

Screen Shot 2022-12-19 at 9 10 04 pm

@mha1
Copy link
Contributor Author

mha1 commented Dec 19, 2022

great idea, looks much better!

image

@philmoz
Copy link
Collaborator

philmoz commented Dec 19, 2022

I think this is the preferred solution, will close my PR in favour of this.

@pfeerick pfeerick added color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour labels Dec 22, 2022
@pfeerick pfeerick added this to the 2.8.1 milestone Dec 22, 2022
@pfeerick pfeerick changed the base branch from 2.8 to main December 22, 2022 11:26
@pfeerick pfeerick changed the title centers flight mode text, 6Pos indicator and 6Pos numbers in square fix(color): Center flight mode text and 6Pos numbers, tweak apperance Dec 22, 2022
@pfeerick pfeerick changed the title fix(color): Center flight mode text and 6Pos numbers, tweak apperance fix(color): Center flight mode text and 6Pos numbers Dec 22, 2022
@ParkerEde
Copy link
Contributor

Now that we've already had a hand in the flight mode, could this ticket be made at the same time?
#2688

@pfeerick pfeerick merged commit c099a74 into EdgeTX:main Dec 22, 2022
pfeerick pushed a commit that referenced this pull request Dec 23, 2022
* centers flight mode text, 6Pos indicator and 6Pos numbers in square

replaces ticks with numbers in 6Pos indicator

* stole @philmoz idea to bold the selected switch position to make it stand out more
@mha1 mha1 deleted the center-FM-and-6Pos branch December 23, 2022 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

main screen - flight mode text and 6pos slider not centered
6 participants