Commit 2469f05c authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

No root decoration + minimal indentation

parent 897e2743
......@@ -113,12 +113,26 @@ private:
KateProjectPlugin *m_plugin;
};
class GitWidgetTreeView : public QTreeView
{
public:
GitWidgetTreeView(QWidget *parent)
: QTreeView(parent)
{
}
// we want no branches!
void drawBranches(QPainter *, const QRect &, const QModelIndex &) const override
{
}
};
GitWidget::GitWidget(KateProject *project, KTextEditor::MainWindow *mainWindow, KateProjectPluginView *pluginView)
: m_project(project)
, m_mainWin(mainWindow)
, m_pluginView(pluginView)
{
m_treeView = new QTreeView(this);
m_treeView = new GitWidgetTreeView(this);
initGitExe();
......@@ -185,6 +199,8 @@ GitWidget::GitWidget(KateProject *project, KTextEditor::MainWindow *mainWindow,
m_treeView->setSelectionMode(QTreeView::ExtendedSelection);
m_treeView->setModel(m_model);
m_treeView->installEventFilter(this);
m_treeView->setRootIsDecorated(false);
m_treeView->setIndentation(4);
m_treeView->header()->setStretchLastSection(false);
m_treeView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
......
......@@ -23,6 +23,7 @@ class QMenu;
class QToolButton;
class QTemporaryFile;
class KateProjectPluginView;
class GitWidgetTreeView;
namespace KTextEditor
{
......@@ -54,7 +55,7 @@ private:
QToolButton *m_commitBtn;
QToolButton *m_pushBtn;
QToolButton *m_pullBtn;
QTreeView *m_treeView;
GitWidgetTreeView *m_treeView;
GitStatusModel *m_model;
KateProject *m_project;
/** This ends with "/", always remember this */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment