chatterino2
chatterino2 copied to clipboard
Missing Ellipsis in Menu Items
Checklist
- [X] I'm reporting a problem with Chatterino
- [X] I've verified that I'm running the most recent nightly build or stable release
- [X] I've looked for my problem on the wiki
- [X] I've searched the issues and pull requests for similar looking reports
Describe your issue
The split menu (when right-clicking on the split header or clicking on the kebab menu) contains an entry called Set filters, which opens a dialog to configure the filters. As per Apple's Human Interface Guidelines, it should have an ellipsis character added to signify that a dialog requiring user action will open. It should be Set Filters… although as Chatterino doesn't seem to use title case, it should be Set filters….
Append an ellipsis to a menu item’s label when people need to provide additional information before the action can complete. The ellipsis character (…) signals that another view will open in which people can input information or make choices.
Screenshots
OS and Chatterino Version
Chatterino 2.4.6 (commit 5693927) built with Qt 6.5.0, MSVC 193732825
You will have to revise all the items in all the menus to solve this problem. Even in the screenshot at the beginning of the topic you can make the following changes: Change channel → Change channel... Open in streamlink → Open in streamlink... (When Preferred quality is set to Choose) How to... → How to
In any case, if you do this, don't forget the recommendations for Windows as well. This one or maybe this one.
I made some progress on this, however some string literals (like Open in streamlink) are #define
s inside CommomTexts.hpp
. I saw #4896 mentioned working towards moving away from this style, so I wanted to ask how I should go about making the alternative versions with ellipses.
I made some progress on this, however some string literals (like Open in streamlink) are
#define
s insideCommomTexts.hpp
. I saw #4896 mentioned working towards moving away from this style, so I wanted to ask how I should go about making the alternative versions with ellipses.
In my opinion, you can define the constants in the file they're used in (or you can inline them). So, for example, Open in streamlink… should be defined in SplitHeader.cpp
. As this define is still used in Toasts.cpp
(where it shouldn't have an ellipsis), it can [at least for now] be left in CommonTexts.hpp
, although you could inline it there too if you want.
You can define a constant QString like this: const QString MY_STRING = u"my string"_s;
- make sure common/Literals.hpp
is included, and you're using namespace literals
(or chatterino::literals
in an anonymous namespace).
If you don't need the full string or want to add something (e.g. you want to call .arg(...)
), you can create a constexpr QStringLiteral MY_STRING = u"foo %1";
(this isn't useful for the menus, however).