Browse Source

remove focus rectangle on Mac

Le Tan 8 years ago
parent
commit
5ca9ea6b92

+ 1 - 0
src/dialog/vconfirmdeletiondialog.cpp

@@ -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,

+ 1 - 0
src/dialog/vsortdialog.h

@@ -19,6 +19,7 @@ public:
     explicit VTreeWidget(QWidget *p_parent = 0)
         : QTreeWidget(p_parent)
     {
+        setAttribute(Qt::WA_MacShowFocusRect, false);
     }
 
 protected:

+ 1 - 1
src/utils/viconutils.cpp

@@ -3,7 +3,7 @@
 #include <QDebug>
 #include <QRegExp>
 #include <QByteArray>
-#include <QPixMap>
+#include <QPixmap>
 #include <QFileInfo>
 
 #include "vutils.h"

+ 1 - 0
src/vattachmentlist.cpp

@@ -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,

+ 1 - 0
src/vdirectorytree.cpp

@@ -30,6 +30,7 @@ VDirectoryTree::VDirectoryTree(QWidget *parent)
     setColumnCount(1);
     setHeaderHidden(true);
     setContextMenuPolicy(Qt::CustomContextMenu);
+    setAttribute(Qt::WA_MacShowFocusRect, false);
 
     initShortcuts();
     initActions();

+ 1 - 0
src/vfilelist.cpp

@@ -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);

+ 1 - 0
src/voutline.cpp

@@ -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,

+ 1 - 0
src/vsnippetlist.cpp

@@ -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);