summaryrefslogtreecommitdiffstats
blob: c22680f5a8af0638bd981654577e6906ff543784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (c) 2018 Isode Limited.
 * All rights reserved.
 * See the COPYING file for more information.
 */

#include <Swift/QtUI/ServerList/QtServerListView.h>

namespace Swift {

QtServerListView::QtServerListView() {
    QPalette newPalette = palette();
    //TODO move color and theme variables to a shared location.
    newPalette.setColor(QPalette::Base, { 38, 81, 112 });
    setAutoFillBackground(true);
    setPalette(newPalette);
    delegate_ = std::make_unique<ServerListDelegate>();
    setItemDelegate(delegate_.get());
    setMaximumWidth(widgetWidth);
    setMinimumWidth(widgetWidth);
    setFrameStyle(QFrame::NoFrame);
    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    setSelectionMode(QAbstractItemView::NoSelection);
}

QtServerListView::~QtServerListView() {

}

}