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
Qt: Fix Hotkey Controller Profile display with boxes for each Wiimote #8654
Conversation
|
Design wise, this is a nice little improvement! |
| 0, 0); | ||
|
|
||
| m_main_layout->addWidget( | ||
| CreateGroupBox(tr("Wii Remote %2").arg(2), |
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.
Perhaps this was a find/replace mistake. %2 is probably meant to be %1.
Same problem below with 3 and 4.
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.
Then, I guess I have to switch 1 & 2, and 3 & 4 ?
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.
Hmm? %1 is the format string placeholder for the first value supplied to the .arg function.
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.
Oh sure.
Edit: Done.
| @@ -22,5 +22,5 @@ class HotkeyControllerProfile final : public MappingWidget | |||
| void CreateMainLayout(); | |||
|
|
|||
| // Main | |||
| QHBoxLayout* m_main_layout; | |||
| QGridLayout* m_main_layout; | |||
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.
It looks like this doesn't need to be a member variable as it's only used in CreateMainLayout.
You can just declare a local variable there and completely kill the above forward-declaration and include.
I realize you didn't add this member but now is a good time to fix it. :P
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.
OK, will change it to a local variable.
Edit: Done.
5ad4e83
to
4fbebd6
Compare
| 1, 0); | ||
|
|
||
| m_main_layout->addWidget( | ||
| CreateGroupBox(tr("Wii Remote %4").arg(4), |
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.
Are you sure this is the right way to format these? I'd assume the %1 is a placeholder for the argument and then the .arg() fills in the argument, so all of these should read "Wii Remote %1". Or just use literal strings and get rid of the .arg().
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.
As @jordan-woyak said upper, it must be 1% for the string format. I will commit it soon.
Edit: Done.
9fc0215
to
092349c
Compare
| @@ -6,7 +6,7 @@ | |||
|
|
|||
| #include "DolphinQt/Config/Mapping/MappingWidget.h" | |||
|
|
|||
| class QHBoxLayout; | |||
| class QGridLayout; | |||
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.
You can remove this forward declaration now.
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.
Done.
| QGridLayout* m_main_layout; | ||
| m_main_layout = new QGridLayout; |
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.
| QGridLayout* m_main_layout; | |
| m_main_layout = new QGridLayout; | |
| QGridLayout* m_main_layout = new QGridLayout; |
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.
Done.
092349c
to
9e936f1
Compare
Source/Core/Core/HotkeyManager.cpp
Outdated
| _trans("Next Profile "), | ||
| _trans("Previous Profile "), | ||
| _trans("Next Game Profile "), | ||
| _trans("Previous Game Profile "), |
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.
Just noticed one more thing, there's extra spaces at the end of these strings. You can even see that in your screenshot.
Maybe also clean up your commit message while you're at it, all those extra fix lines are really not necessary.
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.
Done.
9e936f1
to
95850fc
Compare
|
|
||
| m_main_layout->addWidget(CreateGroupBox( | ||
| tr("Controller Profile"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE))); | ||
| QGridLayout* m_main_layout = new QGridLayout; |
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.
Please remove m_ from this variable name.
You can also declare the type as const auto.
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.
Done.
95850fc
to
1303a85
Compare
|
So actually, my teammate and I have discover that naming many options with same names poses a conflict problem. In fact, assigned value are mixed once we quit and restart Dolphin. 1303a85#diff-8d3cfd109d3bb0eeb1cd0e968d40d086 We were using
Give us your opinion, so we can change. If you find an other solution to avoid renaming each options differently, tell us ! Edit: As you can see bellow, no needs to renames option. We need to solve the conflict name issue. |
|
The config key and the UI label being tied to the same string seems like a fundamental design flaw. Perhaps we should hold off on this change and fix that first? |
|
#8655 should address the name conflict issue. |
|
Nice. We are waiting for you changes to be commited and we are done with this PR. |
|
Do we care about breaking existing configs? |
|
I don't think these hotkeys are that commonly used, and they don't have any default bindings, so in this case it's probably okay. |
|
This needs to be rebased now that #8655 is merged. |
1303a85
to
39c0709
Compare
|
Update our PR, changes are ok. |
aba04b9
to
22a66fb
Compare
|
Something went wrong there; you have a lot of changes in there that don't seem to belong. Can you please take a look? |
2e963f2
to
bf76386
Compare
|
Seems better now. |
|
Seems to look fine to me. |
|
Commits should be squashed though. |
bf76386
to
8288bdc
Compare
According to https://bugs.dolphin-emu.org/issues/11646 the Hotkey Controller Profile GUI needed to have an overhaul.
Then @imStudd and I decided to solve this issue by putting theses options over boxes for each Wiimote. Separating Wiimotes looks way better and is more intuitive than displaying all Wiimotes options into one column.
Here is the old display:

That is the new one:
