nurupo / ProjectTox-Qt-GUI

A cross-platform front end for ProjectTox Core library, written in C++11 with use of Qt5
GNU General Public License v3.0
342 stars 116 forks source link

Status Messages for OurUser #79

Closed chriskonstad closed 11 years ago

chriskonstad commented 11 years ago

Here's the code that adds support for OurUser's status message (part of issue #69, does NOT include code for friends' status messages). Let me know what you think!

To edit the status message, click on it and it changes to a RenameEditWidget.

capture windows screenshot from 2013-10-19 16-27-10

nurupo commented 11 years ago

I don't like that you added extra code to the elidelabel, which is supposed to just add ellipsis when text doesn't fit in it and nothing more. Username gets changed by clicking a button, but status message by clicking on it, that's not consistent at all. It makes sense to remove the username edit button and make the username lable clickable too. Changing cursor icon for labels on something that suggests editability or clickability to indicate that you can actually click on the label and expect something to happen — would be nice too. OurUserItemWidget::onChangeStatusMessageButtonClicked but it's not a button that is clicked... you could just drop the ButtonClicked part.

chriskonstad commented 11 years ago

Okay. If you want, I can remove the the username edit button and allow the user to click on the elidelabel to edit the username (and change the mouse cursor icon).

I will change that function name to drop the ButtonClicked part. Sorry about that! I first implemented a toolbar button for changing the status message, and I forgot to change that function when I changed it over to the modified elidelabel.

nurupo commented 11 years ago

Could you create a new class derived from ElideLabel that would contain all the changes you have done (the cursor and the signal)? It's just that the cursor change affected all ElideLabels (marked in red):

rgfgfg

Labels on the right side of the window shouldn't have cursor changed on hover.

I can fix it myself if you don't want to, I will modify the label class either way, after merging the pull request.

chriskonstad commented 11 years ago

Sure! I'll get that done today.

nurupo commented 11 years ago

Merged