Improve: icons not coloured status text for normal exits in exits dialog#5513
Conversation
This PR puts an icon to the right of the text for each normal exit room ID `QLineEdit` entry widget in the room exits form/dialogue. The icon is one of four (blank, green tick, orange warning triangle, white-on-red cross) to indicate whether the entry is: * blank (empty) * valid and to a room in the same area * valid and to a room in a different area * invalid respectively. This replaces the previous use of coloured texts which did not work well, particularly with dark styling. This is a major functional part extracted from the previous draft mega-PR Mudlet#5303 and deals only with the normal exits. A separate PR is to follow to deal with the special exits. Also: * removes predefined tooltips in the `room_exits.ui` for the normal exit direction `QLineEdit` entry widgets - as the text is now incorrect and they are not needed as the appropriate text is generated during the dialogue's construction in the C++ code. * refactors some very repeated code (one instance for each normal exit direction) out of the: * `slot_????_textEdited(const QString&)` * `slot_stub_????_stateChanged(int)` slot methods. * removes a bogus tooltip that was assigned to the non-functional "key" but which made mention of a southwest exit direction. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
IMHO warning sign is "too much" for room out of area. There is nothing wrong with that and warning sign kind of implies that this should be checked. Maybe arrow icon? |
|
I had the same feedback as @Delwing. Nice change otherwise! |
|
Well I do want it to show a difference for an out-of-area exit but I was trying to confine it to icons already used - and I've already use that three-some already (see the room symbol usage dialogue in the "mapper" preferences). Do we have a better icon already in the source files - @Delwing you say "Maybe arrow icon" - the only one that might sort of work I suppose is the 🤔 The contrast (valid exits are, of course, now both green) would be less obvious with that - I still think that it is not unreasonable to be saying "Hey this exit is going somewhere else completely, are you sure that is what you want?" |
|
💡 How about if I GIMP that triangle arrow icon to make it cyan rather than green? The colour difference will help to make it stand out a bit better (for those with normal colour vision anyhow - I might have to do some extra work later in order to make the whole dialogue work better with Qt's accessibility system!) |
|
I think the green triangle is fine 👍 |
This is in response to peer-review which was unhappy about using a standard (yellow) warning triangle. The reason for using a cyan version (of an already existing green one) is so that there is a colour contrast between it and the green "tick" used for in-area exits... Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…alog This is a bit more involved than the normal exit ones as we have to provide an extra class to be a "delegate" to handle the `QLineEdit` that is embedded in the `QTreeWidget` derived special `ExitsTreeWidget` when a text field (in this case the exit roomID) is edited. We use that and the code from Mudlet#5513 for normal exits to provide the same icons in that widget whilst the exit roomID is being edited and we put the same icon in a new column to the immediate right of that column when that field is not being edited. This is a major functional part extracted from the previous draft mega-PR Mudlet#5303 and deals only with the special exit roomIDs. This follows on from a separate PR Mudlet#5513 already merged to handle normal exits. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…alog This is a bit more involved than the normal exit ones as we have to provide an extra class to be a "delegate" to handle the `QLineEdit` that is embedded in the `QTreeWidget` derived special `ExitsTreeWidget` when a text field (in this case the exit roomID) is edited. We use that and the code from Mudlet#5513 for normal exits to provide the same icons in that widget whilst the exit roomID is being edited and we put the same icon in a new column to the immediate right of that column when that field is not being edited. This is a major functional part extracted from the previous draft mega-PR Mudlet#5303 and deals only with the special exit roomIDs. This follows on from a separate PR Mudlet#5513 already merged to handle normal exits. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…alog (#5543) This is a bit more involved than the normal exit ones as we have to provide an extra class to be a "delegate" to handle the `QLineEdit` that is embedded in the `QTreeWidget` derived special `ExitsTreeWidget` when a text field (in this case the exit roomID) is edited. We use that and the code from #5513 for normal exits to provide the same icons in that widget whilst the exit roomID is being edited and we put the same icon in a new column to the immediate right of that column when that field is not being edited. This is a major functional part extracted from the previous draft mega-PR #5303 and deals only with the special exit roomIDs. This follows on from a separate PR #5513 already merged to handle normal exits. Revised to adopt some peer review points. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…alog (Mudlet#5543) This is a bit more involved than the normal exit ones as we have to provide an extra class to be a "delegate" to handle the `QLineEdit` that is embedded in the `QTreeWidget` derived special `ExitsTreeWidget` when a text field (in this case the exit roomID) is edited. We use that and the code from Mudlet#5513 for normal exits to provide the same icons in that widget whilst the exit roomID is being edited and we put the same icon in a new column to the immediate right of that column when that field is not being edited. This is a major functional part extracted from the previous draft mega-PR Mudlet#5303 and deals only with the special exit roomIDs. This follows on from a separate PR Mudlet#5513 already merged to handle normal exits. Revised to adopt some peer review points. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>




This PR puts an icon to the right of the text for each normal exit room ID
QLineEditentry widget in the room exits form/dialogue. The icon is one of four (blank, green tick, orange warning triangle, white-on-red cross) to indicate whether the entry is:respectively. This replaces the previous use of coloured texts which did not work well, particularly with dark styling.
This is a major functional part extracted from the previous draft mega-PR #5303 and deals only with the normal exits. A separate PR is to follow to deal with the special exits.
Also:
room_exits.uifor the normal exit directionQLineEditentry widgets - as the text is now incorrect and they are not needed as the appropriate text is generated during the dialogue's construction in the C++ code.slot_????_textEdited(const QString&)slot_stub_????_stateChanged(int)slot methods.
Signed-off-by: Stephen Lyons slysven@virginmedia.com
Release post highlight
Coloured text in room exits dialogue now removed and replaced with status icons (normal exits initially, special exits to follow) - which is more friendly for styling, particularly for those using dark desktop environments.