forked from qt-creator/qt-creator
Merge branch '1.2' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
#include <QtGui/QBrush>
|
#include <QtGui/QBrush>
|
||||||
#include <QtGui/QColor>
|
#include <QtGui/QColor>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
#define PROGRESSBAR_HEIGHT 11
|
||||||
|
|
||||||
ProgressBar::ProgressBar(QWidget *parent)
|
ProgressBar::ProgressBar(QWidget *parent)
|
||||||
: QProgressBar(parent), m_error(false)
|
: QProgressBar(parent), m_error(false)
|
||||||
@@ -72,7 +73,7 @@ QSize ProgressBar::sizeHint() const
|
|||||||
{
|
{
|
||||||
QSize s;
|
QSize s;
|
||||||
s.setWidth(50);
|
s.setWidth(50);
|
||||||
s.setHeight(fontMetrics().height() * 2);
|
s.setHeight(fontMetrics().height() + PROGRESSBAR_HEIGHT + 7);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
|
|||||||
p.drawText(textRect, Qt::AlignHCenter | Qt::AlignBottom, m_title);
|
p.drawText(textRect, Qt::AlignHCenter | Qt::AlignBottom, m_title);
|
||||||
p.translate(0, 1);
|
p.translate(0, 1);
|
||||||
|
|
||||||
m_progressHeight = h-4;
|
m_progressHeight = PROGRESSBAR_HEIGHT;
|
||||||
m_progressHeight += ((m_progressHeight % 2) + 1) % 2; // make odd
|
m_progressHeight += ((m_progressHeight % 2) + 1) % 2; // make odd
|
||||||
// draw outer rect
|
// draw outer rect
|
||||||
QRect rect(INDENT - 1, h+6, size().width()-2*INDENT, m_progressHeight-1);
|
QRect rect(INDENT - 1, h+6, size().width()-2*INDENT, m_progressHeight-1);
|
||||||
|
|||||||
@@ -2732,8 +2732,9 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber
|
if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber
|
||||||
|| highlightColumn != d->extraAreaHighlightCollapseColumn)
|
|| highlightColumn != d->extraAreaHighlightCollapseColumn) {
|
||||||
d->m_highlightBlocksTimer->start(d->m_highlightBlocksInfo.isEmpty() ? 40 : 10);
|
d->m_highlightBlocksTimer->start(d->m_highlightBlocksInfo.isEmpty() ? 120 : 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) {
|
if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) {
|
||||||
|
|||||||
Reference in New Issue
Block a user