From ac42ab0d74e4827c21423a25cf0639dbd6a42559 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 31 Oct 2022 10:48:20 -0400 Subject: Disable horizontal scrollbar. --- qdeduper/mingui.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'qdeduper') diff --git a/qdeduper/mingui.cpp b/qdeduper/mingui.cpp index 670b128..bb60537 100644 --- a/qdeduper/mingui.cpp +++ b/qdeduper/mingui.cpp @@ -108,16 +108,15 @@ DeduperMainWindow::DeduperMainWindow() im = new QStandardItemModel(this); lv->setModel(im); lv->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); - lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); + lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff); id = new ImageItemDelegate(); - id->set_scrollbar_margins(lv->verticalScrollBar()->width(), - lv->horizontalScrollBar()->height()); + id->set_scrollbar_margins(lv->verticalScrollBar()->width(), 0); id->set_model(im); lv->setItemDelegate(id); lv->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection); lv->setResizeMode(QListView::ResizeMode::Adjust); lv->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAsNeeded); - lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAsNeeded); + lv->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff); lv->setHorizontalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel); lv->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel); lv->setMinimumWidth(240); -- cgit v1.2.3