From fe14787ccaa95c4c85d5a8418a0ec812eddc959c Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Wed, 26 Aug 2009 22:22:54 +0100 Subject: Make the roster text sizes relative to the defaults. diff --git a/Swift/QtUI/Roster/RosterDelegate.cpp b/Swift/QtUI/Roster/RosterDelegate.cpp index ae7a4b0..778345e 100644 --- a/Swift/QtUI/Roster/RosterDelegate.cpp +++ b/Swift/QtUI/Roster/RosterDelegate.cpp @@ -12,9 +12,9 @@ namespace Swift { RosterDelegate::RosterDelegate() : nameFont_(QApplication::font()), statusFont_(QApplication::font()) { - nameFont_.setPointSize(12); + int statusFontSizeDrop = nameFont_.pointSize() >= 10 ? 2 : 0; statusFont_.setStyle(QFont::StyleItalic); - statusFont_.setPointSize(10); + statusFont_.setPointSize(nameFont_.pointSize() - statusFontSizeDrop); } QSize RosterDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index ) const { -- cgit v0.10.2-6-g49f6