Commit dcbe9115 authored by hjk's avatar hjk
Browse files

fakevim: minibuffer cosmetics

Insert a separator line, remove the tooltip-style background.
parent 3fe66ea6
...@@ -309,6 +309,7 @@ EditorView::EditorView(EditorModel *model, QWidget *parent) : ...@@ -309,6 +309,7 @@ EditorView::EditorView(EditorModel *model, QWidget *parent) :
m_defaultToolBar(new QToolBar(this)), m_defaultToolBar(new QToolBar(this)),
m_infoWidget(new QFrame(this)), m_infoWidget(new QFrame(this)),
m_editorForInfoWidget(0), m_editorForInfoWidget(0),
m_statusHLine(new QFrame(this)),
m_statusWidget(new QFrame(this)) m_statusWidget(new QFrame(this))
{ {
QVBoxLayout *tl = new QVBoxLayout(this); QVBoxLayout *tl = new QVBoxLayout(this);
...@@ -397,10 +398,12 @@ EditorView::EditorView(EditorModel *model, QWidget *parent) : ...@@ -397,10 +398,12 @@ EditorView::EditorView(EditorModel *model, QWidget *parent) :
tl->addWidget(m_container); tl->addWidget(m_container);
{ {
m_statusHLine->setFrameStyle(QFrame::HLine);
m_statusWidget->setFrameStyle(QFrame::Panel | QFrame::Raised); m_statusWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
m_statusWidget->setLineWidth(1); m_statusWidget->setLineWidth(1);
m_statusWidget->setForegroundRole(QPalette::ToolTipText); //m_statusWidget->setForegroundRole(QPalette::ToolTipText);
m_statusWidget->setBackgroundRole(QPalette::ToolTipBase); //m_statusWidget->setBackgroundRole(QPalette::ToolTipBase);
m_statusWidget->setAutoFillBackground(true); m_statusWidget->setAutoFillBackground(true);
...@@ -416,6 +419,7 @@ EditorView::EditorView(EditorModel *model, QWidget *parent) : ...@@ -416,6 +419,7 @@ EditorView::EditorView(EditorModel *model, QWidget *parent) :
hbox->addWidget(m_statusWidgetButton); hbox->addWidget(m_statusWidgetButton);
m_statusWidget->setVisible(false); m_statusWidget->setVisible(false);
tl->addWidget(m_statusHLine);
tl->addWidget(m_statusWidget); tl->addWidget(m_statusWidget);
} }
...@@ -458,13 +462,16 @@ void EditorView::showEditorStatusBar(const QString &kind, ...@@ -458,13 +462,16 @@ void EditorView::showEditorStatusBar(const QString &kind,
if (object && member) if (object && member)
connect(m_statusWidgetButton, SIGNAL(clicked()), object, member); connect(m_statusWidgetButton, SIGNAL(clicked()), object, member);
m_statusWidget->setVisible(true); m_statusWidget->setVisible(true);
m_statusHLine->setVisible(true);
//m_editorForInfoWidget = currentEditor(); //m_editorForInfoWidget = currentEditor();
} }
void EditorView::hideEditorStatusBar(const QString &kind) void EditorView::hideEditorStatusBar(const QString &kind)
{ {
if (kind == m_statusWidgetKind) if (kind == m_statusWidgetKind) {
m_statusWidget->setVisible(false); m_statusWidget->setVisible(false);
m_statusHLine->setVisible(false);
}
} }
void EditorView::addEditor(IEditor *editor) void EditorView::addEditor(IEditor *editor)
......
...@@ -166,6 +166,7 @@ private: ...@@ -166,6 +166,7 @@ private:
QToolButton *m_infoWidgetButton; QToolButton *m_infoWidgetButton;
IEditor *m_editorForInfoWidget; IEditor *m_editorForInfoWidget;
QString m_statusWidgetKind; QString m_statusWidgetKind;
QFrame *m_statusHLine;
QFrame *m_statusWidget; QFrame *m_statusWidget;
QLabel *m_statusWidgetLabel; QLabel *m_statusWidgetLabel;
QToolButton *m_statusWidgetButton; QToolButton *m_statusWidgetButton;
......
Supports Markdown
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