Skip to content

Commit

Permalink
adjust ui
Browse files Browse the repository at this point in the history
  • Loading branch information
rekols committed Jun 22, 2019
1 parent 8b23c11 commit b56c8e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/serviceitemdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ void ServiceItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
const int column(index.column());

painter->setRenderHint(QPainter::Antialiasing);
painter->setPen(QColor("#303030"));

if (option.state & QStyle::State_Selected) {
painter->fillRect(option.rect, QColor("#D0E8FA"));
painter->setPen(QColor("#000000"));
} else {
painter->setPen(QColor("#303030"));
}

// painting each column item.
if (column == 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/serviceview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ServiceView::ServiceView(QWidget *parent)
: QTreeView(parent)
{
setEditTriggers(QAbstractItemView::NoEditTriggers);
setSelectionMode(QAbstractItemView::NoSelection);
setSelectionMode(QAbstractItemView::SingleSelection);
setSelectionBehavior(QAbstractItemView::SelectRows);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
Expand Down

0 comments on commit b56c8e1

Please sign in to comment.