mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
remove focus rectangle on Mac
This commit is contained in:
parent
1410c16280
commit
5ca9ea6b92
@ -93,6 +93,7 @@ void VConfirmDeletionDialog::setupUI(const QString &p_title,
|
||||
labelLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
m_listWidget = new QListWidget();
|
||||
m_listWidget->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
connect(m_listWidget, &QListWidget::currentRowChanged,
|
||||
this, &VConfirmDeletionDialog::currentFileChanged);
|
||||
connect(m_listWidget, &QListWidget::itemActivated,
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
explicit VTreeWidget(QWidget *p_parent = 0)
|
||||
: QTreeWidget(p_parent)
|
||||
{
|
||||
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <QDebug>
|
||||
#include <QRegExp>
|
||||
#include <QByteArray>
|
||||
#include <QPixMap>
|
||||
#include <QPixmap>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include "vutils.h"
|
||||
|
@ -101,6 +101,7 @@ void VAttachmentList::setupUI()
|
||||
m_attachmentList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
m_attachmentList->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
m_attachmentList->setEditTriggers(QAbstractItemView::SelectedClicked);
|
||||
m_attachmentList->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
connect(m_attachmentList, &QListWidget::customContextMenuRequested,
|
||||
this, &VAttachmentList::handleContextMenuRequested);
|
||||
connect(m_attachmentList, &QListWidget::itemActivated,
|
||||
|
@ -30,6 +30,7 @@ VDirectoryTree::VDirectoryTree(QWidget *parent)
|
||||
setColumnCount(1);
|
||||
setHeaderHidden(true);
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
|
||||
initShortcuts();
|
||||
initActions();
|
||||
|
@ -41,6 +41,7 @@ void VFileList::setupUI()
|
||||
fileList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
fileList->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
fileList->setObjectName("FileList");
|
||||
fileList->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
mainLayout->addWidget(fileList);
|
||||
|
@ -18,6 +18,7 @@ VOutline::VOutline(QWidget *parent)
|
||||
setColumnCount(1);
|
||||
setHeaderHidden(true);
|
||||
setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
|
||||
// TODO: jump to the header when user click the same item twice.
|
||||
connect(this, &VOutline::currentItemChanged,
|
||||
|
@ -69,6 +69,7 @@ void VSnippetList::setupUI()
|
||||
btnLayout->setContentsMargins(0, 0, 3, 0);
|
||||
|
||||
m_snippetList = new QListWidget();
|
||||
m_snippetList->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
m_snippetList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
m_snippetList->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
m_snippetList->setEditTriggers(QAbstractItemView::SelectedClicked);
|
||||
|
Loading…
x
Reference in New Issue
Block a user