aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-23 18:06:05 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-23 18:06:13 (GMT)
commit67152a940c10e672be40a7907e740ec027a8b909 (patch)
tree0383c28c46b1fc9293532651ed3c72c5315a03e5
parentfc76c578b29118a532a350feda309c59d9486696 (diff)
swap line numbers and mode
-rw-r--r--src/view/katestatusbar.cpp15
-rw-r--r--src/view/kateview.cpp6
2 files changed, 11 insertions, 10 deletions
diff --git a/src/view/katestatusbar.cpp b/src/view/katestatusbar.cpp
index 0e1f298..732f3e0 100644
--- a/src/view/katestatusbar.cpp
+++ b/src/view/katestatusbar.cpp
@@ -73,15 +73,16 @@ KateStatusBar::KateStatusBar(KTextEditor::ViewPrivate *view)
option.initFrom(this);
topLayout->addSpacing(style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this));
- m_insertModeLabel = new QLabel( this );
- topLayout->addWidget( m_insertModeLabel, 1000 /* this one should strech */ );
- m_insertModeLabel->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
- m_insertModeLabel->setFocusProxy(m_view);
-
m_lineColLabel = new QLabel( this );
topLayout->addWidget( m_lineColLabel, 0 );
+ m_lineColLabel->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
m_lineColLabel->setFocusProxy(m_view);
+ m_insertModeLabel = new QLabel( this );
+ topLayout->addWidget( m_insertModeLabel, 1000 /* this one should strech */ );
+ m_insertModeLabel->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
+ m_insertModeLabel->setFocusProxy(m_view);
+
m_modifiedLabel = new QToolButton( this );
m_modifiedLabel->setAutoRaise(true);
m_modifiedLabel->setEnabled(false);
@@ -215,10 +216,10 @@ void KateStatusBar::selectionChanged ()
void KateStatusBar::viewModeChanged ()
{
- // append BLOCK for block selection mode
+ // prepend BLOCK for block selection mode
QString text = m_view->viewMode();
if (m_view->blockSelection())
- text = i18n (" %1 <em>[BLOCK]</em>", text);
+ text = i18n ("<em>[BLOCK]</em> %1", text);
m_insertModeLabel->setText(text);
}
diff --git a/src/view/kateview.cpp b/src/view/kateview.cpp
index ab02f0c..caa3be4 100644
--- a/src/view/kateview.cpp
+++ b/src/view/kateview.cpp
@@ -1122,7 +1122,7 @@ QString KTextEditor::ViewPrivate::viewMode() const
*/
if (m_viewInternal->getViInputModeManager()) {
if (m_viewInternal->getViInputModeManager()->isRecordingMacro()) {
- currentMode += QLatin1String(" (") + i18n("recording") + QLatin1String(") ");
+ currentMode.prepend (QLatin1String("(") + i18n("recording") + QLatin1String(") "));
}
/**
@@ -1130,7 +1130,7 @@ QString KTextEditor::ViewPrivate::viewMode() const
*/
QString cmd = m_viewInternal->getViInputModeManager()->getVerbatimKeys();
if (!cmd.isEmpty()) {
- currentMode.append(QString::fromLatin1(" <em>%1</em>").arg(cmd));
+ currentMode.prepend(QString::fromLatin1("<em>%1</em> ").arg(cmd));
}
}
@@ -1144,7 +1144,7 @@ QString KTextEditor::ViewPrivate::viewMode() const
* append read-only if needed
*/
if (!m_doc->isReadWrite()) {
- currentMode = i18n("%1 (R/O)", currentMode);
+ currentMode = i18n("(R/O) %1", currentMode);
}
/**