int StyleHelper::listViewItemHeight(int nType) { QFont f; switch (nType) { case ListTypeOneLine: return fontHead(f) + margin() * 4; case ListTypeTwoLine: return fontHead(f) + fontNormal(f) + margin() * 5; case ListTypeThumb: return thumbnailHeight() + margin() * 2; default: Q_ASSERT(0); return 0; } }
int StyleHelper::avatarHeight(bool bNoScreenFactor) { QFont f; int nHeight = fontHead(f) + fontNormal(f) + margin() * 3 ; if (bNoScreenFactor) return nHeight; #ifdef Q_OS_LINUX return nHeight; #else float factor = qt_mac_get_scalefactor(0); return nHeight * factor; #endif }
int StyleHelper::thumbnailHeight() { QFont f; return fontHead(f) + fontNormal(f) * 3 + margin() * 5; }
int StyleHelper::avatarHeight() { QFont f; return fontHead(f) + fontNormal(f) + margin() * 3; }