Results 1 to 3 of 3

Thread: spawnlist fixed row height

  1. #1
    Registered User
    Join Date
    Nov 2022
    Posts
    2

    spawnlist fixed row height

    I've been testing the following patch for a bit today. It will cause the lists/trees in the spawnlist windows to use a fixed height for all cells which reduces the performance hit when the distance column is displayed.

    Code:
    diff --git a/src/spawnlistcommon.cpp b/src/spawnlistcommon.cpp
    index 0483573..31ddc9f 100644
    --- a/src/spawnlistcommon.cpp
    +++ b/src/spawnlistcommon.cpp
    @@ -69,6 +69,7 @@ SpawnListItem::~SpawnListItem()
     QVariant SpawnListItem::data(int column, int role) const
     {
         QFont font = treeWidget()->font();
    +    QFontMetrics metrics(font);
         uint32_t filterFlags = 0;
         if (m_item)
             filterFlags = m_item->filterFlags();
    @@ -114,6 +115,8 @@ QVariant SpawnListItem::data(int column, int role) const
                     return QColor(Qt::gray);
                 else
                     return m_textColor;
    +       case Qt::SizeHintRole:
    +            return QSize(-1, metrics.lineSpacing());
    
    
             default:
                 return SEQListViewItem::data(column, role);

  2. #2
    Registered User
    Join Date
    Apr 2019
    Posts
    124

    Re: spawnlist fixed row height

    This patch is great. Bascially fixed my performance issues I'm having with ShowEQ6. Not quite there yet but it's so much better.

  3. #3
    Administrator
    Join Date
    Oct 2019
    Posts
    512

    Re: spawnlist fixed row height

    Added to trunk for next release. Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On