Project

General

Profile

Bug #50

Chatline/widget should make use of QFontMetrics::elidedText

Added by EgS over 17 years ago. Updated almost 16 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Quassel GUI (Qt)
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Version:
0.13.1
OS:
Any

Description

Each chatline consists of three parts separated by 2 invisible sliders:
Timestamp, Sender/Nick, Text

For the time beeing the Sender is chopped of at the beginning if there is not enough space to display the whole nick. Nicks are easier to identify if the end is missing rather then the beginning and it should be indicated that they are chopped by the use of an ellipse.

QFontMetrics::elidedText takes care of this problem.

I wanted to fix this myself but honestly... the chatwidget/chatline could use a refactoring themselves...

History

#1 Updated by Sputnick over 17 years ago

Well, code probably needs to go into ChatLine::draw(). Right now, we allow for changing text formats in the sender column (as in the normal message text as well), which does not allow for simply using elidedText. Easy fix would be to only allow one format for the column (which we have right now anyway) and just output the string using elidedText. If we, instead, like to keep the flexibility we have now, we'd have to compute this ourselves (which should not be too hard either).

#2 Updated by Sputnick over 16 years ago

Nowadays I'd favor a gradient or something more pretty than an ellipse.

#3 Updated by Sputnick about 16 years ago

We now have a gradient (rather than an ellipsis). ChatView can cut off senders both front and back, depending on a yet unconfigurable setting (ChatScene::setSenderCutoffMode()).

http://git.quassel-irc.org/?p=quassel.git;a=commit;h=6e277a228833579b9295d45ca7bd6c6f51aa1152

Also available in: Atom PDF