diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-06-26 19:21:31 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-06-26 19:21:31 (GMT) |
commit | de7ee8e38a2dfaab9fde40a7916c8212f5859d68 (patch) | |
tree | c2b8b07ea10b81fb52fef9cbb79f57a52589e657 /Swift/QtUI/Roster/DelegateCommons.h | |
parent | 53f132042a6d470f94a9721a31c86514aba11c4f (diff) | |
download | swift-contrib-de7ee8e38a2dfaab9fde40a7916c8212f5859d68.zip swift-contrib-de7ee8e38a2dfaab9fde40a7916c8212f5859d68.tar.bz2 |
Elide text in the various roster views.
Resolves: #426
Diffstat (limited to 'Swift/QtUI/Roster/DelegateCommons.h')
-rw-r--r-- | Swift/QtUI/Roster/DelegateCommons.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/DelegateCommons.h b/Swift/QtUI/Roster/DelegateCommons.h index ac5efc4..9213ef5 100644 --- a/Swift/QtUI/Roster/DelegateCommons.h +++ b/Swift/QtUI/Roster/DelegateCommons.h @@ -8,6 +8,9 @@ #include <QApplication> #include <QFont> +#include <QPainter> +#include <QRect> +#include <QString> namespace Swift { class DelegateCommons { @@ -18,6 +21,8 @@ namespace Swift { detailFont.setPointSize(nameFont.pointSize() - detailFontSizeDrop); } + static void drawElidedText(QPainter* painter, const QRect& region, const QString& text); + int detailFontSizeDrop; QFont nameFont; QFont detailFont; |