Mercurial > minori
diff src/gui/sidebar.cpp @ 37:9ae9365dd4ea
window.cpp: fix sidebar on Linux
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 21 Sep 2023 17:15:43 -0400 |
parents | 2743011a6042 |
children |
line wrap: on
line diff
--- a/src/gui/sidebar.cpp Thu Sep 21 15:17:47 2023 -0400 +++ b/src/gui/sidebar.cpp Thu Sep 21 17:15:43 2023 -0400 @@ -6,7 +6,6 @@ #include <QMouseEvent> SideBar::SideBar(QWidget* parent) : QListWidget(parent) { - setObjectName("sidebar"); setFrameShape(QFrame::NoFrame); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); @@ -14,9 +13,11 @@ setSelectionBehavior(QAbstractItemView::SelectItems); setMouseTracking(true); viewport()->setAutoFillBackground(false); + QFont font; font.setPointSize(9); setFont(font); + connect(this, &QListWidget::currentRowChanged, this, [this](int index) { emit CurrentItemChanged(RemoveSeparatorsFromIndex(index)); }); }