feature: Add aspect ratio info to resolution selection dialog#6587
feature: Add aspect ratio info to resolution selection dialog#6587Osmodium wants to merge 25 commits intoihhub:masterfrom
Conversation
|
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
| 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.
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.
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
|
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. |
|
@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]. |
ihhub
left a comment
There was a problem hiding this comment.
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.
What is the reason to override this method which calls another overridden method?
There was a problem hiding this comment.
I think it was from some other implementation, just forgot to remove it.
e26cde4
There was a problem hiding this comment.
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