forked from qt-creator/qt-creator
New Error and Warning icons.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 539 B |
Binary file not shown.
|
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 550 B |
@@ -5,9 +5,7 @@
|
|||||||
<file>images/clean.png</file>
|
<file>images/clean.png</file>
|
||||||
<file>images/clean_small.png</file>
|
<file>images/clean_small.png</file>
|
||||||
<file>images/closetab.png</file>
|
<file>images/closetab.png</file>
|
||||||
<file>images/compile_error.png</file>
|
|
||||||
<file>images/compile_unspecified.png</file>
|
<file>images/compile_unspecified.png</file>
|
||||||
<file>images/compile_warning.png</file>
|
|
||||||
<file>images/debugger_start.png</file>
|
<file>images/debugger_start.png</file>
|
||||||
<file>images/debugger_start_small.png</file>
|
<file>images/debugger_start_small.png</file>
|
||||||
<file>images/filtericon.png</file>
|
<file>images/filtericon.png</file>
|
||||||
@@ -28,5 +26,7 @@
|
|||||||
<file>images/rightselection.png</file>
|
<file>images/rightselection.png</file>
|
||||||
<file>images/midselection.png</file>
|
<file>images/midselection.png</file>
|
||||||
<file>images/targetremovebutton.png</file>
|
<file>images/targetremovebutton.png</file>
|
||||||
|
<file>images/compile_error.png</file>
|
||||||
|
<file>images/compile_warning.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -48,6 +48,11 @@
|
|||||||
#include <QtGui/QStyledItemDelegate>
|
#include <QtGui/QStyledItemDelegate>
|
||||||
#include <QtGui/QSortFilterProxyModel>
|
#include <QtGui/QSortFilterProxyModel>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const int TASK_ICON_SIZE = 16;
|
||||||
|
const int TASK_ICON_MARGIN = 2;
|
||||||
|
}
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -769,6 +774,8 @@ QSize TaskDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelInd
|
|||||||
} else {
|
} else {
|
||||||
s.setHeight(fontHeight + 3);
|
s.setHeight(fontHeight + 3);
|
||||||
}
|
}
|
||||||
|
if (s.height() < TASK_ICON_SIZE + 2 * TASK_ICON_MARGIN)
|
||||||
|
s.setHeight(TASK_ICON_SIZE + 2 * TASK_ICON_MARGIN);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -817,7 +824,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
|||||||
TaskModel *model = static_cast<TaskFilterModel *>(view->model())->taskModel();
|
TaskModel *model = static_cast<TaskFilterModel *>(view->model())->taskModel();
|
||||||
TaskWindow::TaskType type = TaskWindow::TaskType(index.data(TaskModel::Type).toInt());
|
TaskWindow::TaskType type = TaskWindow::TaskType(index.data(TaskModel::Type).toInt());
|
||||||
QIcon icon = model->iconFor(type);
|
QIcon icon = model->iconFor(type);
|
||||||
painter->drawPixmap(2, opt.rect.top() + 2, icon.pixmap(16, 16));
|
painter->drawPixmap(TASK_ICON_MARGIN, opt.rect.top() + TASK_ICON_MARGIN, icon.pixmap(TASK_ICON_SIZE, TASK_ICON_SIZE));
|
||||||
|
|
||||||
int width = opt.rect.width() - model->sizeOfFile() - model->sizeOfLineNumber() - 12 - 22;
|
int width = opt.rect.width() - model->sizeOfFile() - model->sizeOfLineNumber() - 12 - 22;
|
||||||
if (!selected) {
|
if (!selected) {
|
||||||
|
|||||||
Reference in New Issue
Block a user