forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -388,15 +388,20 @@ QPixmap ManhattanStyle::standardPixmap(StandardPixmap standardPixmap, const QSty
|
|||||||
int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget,
|
int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget,
|
||||||
QStyleHintReturn *returnData) const
|
QStyleHintReturn *returnData) const
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = d->style->styleHint(hint, option, widget, returnData);
|
||||||
switch (hint) {
|
switch (hint) {
|
||||||
|
// Make project explorer alternate rows all the way
|
||||||
|
case QStyle::SH_ItemView_PaintAlternatingRowColorsForEmptyArea:
|
||||||
|
if (widget && widget->property("AlternateEmpty").toBool())
|
||||||
|
ret = true;
|
||||||
|
break;
|
||||||
case QStyle::SH_EtchDisabledText:
|
case QStyle::SH_EtchDisabledText:
|
||||||
ret = false; // We really should only enforce this for panel widgets
|
if (panelWidget(widget))
|
||||||
|
ret = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = d->style->styleHint(hint, option, widget, returnData);
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -908,11 +908,13 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
moveToFirstNonBlankOnLine();
|
moveToFirstNonBlankOnLine();
|
||||||
finishMovement();
|
finishMovement();
|
||||||
} else if (key == 'i') {
|
} else if (key == 'i') {
|
||||||
|
recordBeginGroup();
|
||||||
enterInsertMode();
|
enterInsertMode();
|
||||||
updateMiniBuffer();
|
updateMiniBuffer();
|
||||||
if (atEndOfLine())
|
if (atEndOfLine())
|
||||||
moveLeft();
|
moveLeft();
|
||||||
} else if (key == 'I') {
|
} else if (key == 'I') {
|
||||||
|
recordBeginGroup();
|
||||||
setAnchor();
|
setAnchor();
|
||||||
enterInsertMode();
|
enterInsertMode();
|
||||||
if (m_gflag)
|
if (m_gflag)
|
||||||
@@ -976,13 +978,13 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
} else if (key == 'N') {
|
} else if (key == 'N') {
|
||||||
search(lastSearchString(), !m_lastSearchForward);
|
search(lastSearchString(), !m_lastSearchForward);
|
||||||
} else if (key == 'o' || key == 'O') {
|
} else if (key == 'o' || key == 'O') {
|
||||||
|
recordBeginGroup();
|
||||||
|
recordMove();
|
||||||
enterInsertMode();
|
enterInsertMode();
|
||||||
moveToFirstNonBlankOnLine();
|
moveToFirstNonBlankOnLine();
|
||||||
recordBeginGroup();
|
|
||||||
int numSpaces = leftDist();
|
int numSpaces = leftDist();
|
||||||
|
if (key == 'O')
|
||||||
moveUp();
|
moveUp();
|
||||||
if (key == 'o')
|
|
||||||
moveDown();
|
|
||||||
moveToEndOfLine();
|
moveToEndOfLine();
|
||||||
recordInsertText("\n");
|
recordInsertText("\n");
|
||||||
moveToStartOfLine();
|
moveToStartOfLine();
|
||||||
@@ -990,7 +992,6 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
recordInsertText(QString(indentDist(), ' '));
|
recordInsertText(QString(indentDist(), ' '));
|
||||||
else
|
else
|
||||||
recordInsertText(QString(numSpaces, ' '));
|
recordInsertText(QString(numSpaces, ' '));
|
||||||
recordEndGroup();
|
|
||||||
} else if (key == 'p' || key == 'P') {
|
} else if (key == 'p' || key == 'P') {
|
||||||
recordBeginGroup();
|
recordBeginGroup();
|
||||||
QString text = m_registers[m_register];
|
QString text = m_registers[m_register];
|
||||||
@@ -1034,8 +1035,13 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
redo();
|
redo();
|
||||||
} else if (key == 's') {
|
} else if (key == 's') {
|
||||||
recordBeginGroup();
|
recordBeginGroup();
|
||||||
m_submode = ChangeSubMode;
|
setAnchor();
|
||||||
moveRight(qMin(count(), rightDist()));
|
moveRight(qMin(count(), rightDist()));
|
||||||
|
m_registers[m_register] = recordRemoveSelectedText();
|
||||||
|
//m_dotCommand = QString("%1s").arg(count());
|
||||||
|
m_opcount.clear();
|
||||||
|
m_mvcount.clear();
|
||||||
|
enterInsertMode();
|
||||||
} else if (key == 't' || key == 'T') {
|
} else if (key == 't' || key == 'T') {
|
||||||
m_subsubmode = FtSubSubMode;
|
m_subsubmode = FtSubSubMode;
|
||||||
m_subsubdata = key;
|
m_subsubdata = key;
|
||||||
@@ -2043,7 +2049,6 @@ void FakeVimHandler::Private::enterInsertMode()
|
|||||||
EDITOR(setOverwriteMode(false));
|
EDITOR(setOverwriteMode(false));
|
||||||
m_mode = InsertMode;
|
m_mode = InsertMode;
|
||||||
m_lastInsertion.clear();
|
m_lastInsertion.clear();
|
||||||
recordBeginGroup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FakeVimHandler::Private::enterCommandMode()
|
void FakeVimHandler::Private::enterCommandMode()
|
||||||
|
@@ -73,6 +73,8 @@ public:
|
|||||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
setUniformRowHeights(true);
|
setUniformRowHeights(true);
|
||||||
setTextElideMode(Qt::ElideNone);
|
setTextElideMode(Qt::ElideNone);
|
||||||
|
setAlternatingRowColors(true);
|
||||||
|
setProperty("AlternateEmpty", true); // Let Manhattan to override style default
|
||||||
// setExpandsOnDoubleClick(false);
|
// setExpandsOnDoubleClick(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user