-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
feature: Add aspect ratio info to resolution selection dialog #6587
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy
found issue(s) with the introduced code (1/1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy
found issue(s) with the introduced code (1/1)
Hi @Osmodium please remove extra spaces at the end of the line and reorder the includes as suggested by the code style check workflow. |
I kind of wanted to add the ratios as two new fields on |
If this ratio is only needed in one place for illustration purpose only, then there is no need to store it in the |
99f3135
to
65c3345
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Osmodium , added few comments in this pull request. Could you please take a look when you have time?
const int32_t gcd = std::gcd( resolution.width, resolution.height ); | ||
const auto aspectRatioString = std::to_string( resolution.width / gcd ) + " : " + std::to_string( resolution.height / gcd ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1366x768 was created as an approximated 16:9 aspect ratio:
https://superuser.com/questions/946086/why-does-1366x768-resolution-exist
I suppose this is the same for 1360x768.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e9840c7
to
9052d6d
Compare
@ihhub I might even like this layout better |
Hi @Osmodium , since most of readers in the world read text from left to right we have to put the most important information at the left and less important on the right. Ratio factor is less important information I believe. What do you think? |
Hi @ihhub |
03a8bfb
to
590392f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy
found issue(s) with the introduced code (1/1)
Hi @Osmodium , think about the design from a perspective of a new player. The player will see something like x2 and x3 on the left corner and immediately rises a question "What is this?" While putting it just besides the resolution intuitively is being understandable as a scale factor. |
Hi @ihhub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ihhub Do you have further to this issue? :) |
Hi @Osmodium , I will review this pull request again tomorrow. It is on my TODO list. I am also adding @Branikolog to gather his opinion. |
Hi @ihhub and @Osmodium Could we approximate the first number, which is before the colon ( : ) in such way, so the second number would take more common values, like 3,4,9 or 10? I think it's more demonstrative to have like [15.9 : 9] or [17.7 : 10] rather than [62 : 35]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @Osmodium , I left several comments in this pull request. Could you please take a look?
I also agree with @Branikolog regarding the visual look of the feature. We should change the dialog to support the feature properly.
void ActionListDoubleClick( fheroes2::ResolutionInfo & item, const fheroes2::Point & /*unused*/, int32_t /*unused*/, int32_t /*unused*/ ) override | ||
{ | ||
ActionListDoubleClick( item ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to override this method which calls another overridden method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was from some other implementation, just forgot to remove it.
e26cde4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I remember, it was a clang error that told me to add it:
https://github.com/ihhub/fheroes2/actions/runs/4610597218/jobs/8149253282?pr=6587
Reintroduced here: b9a2b4a
resolves #6586