overlay for code view
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "qt/element/QtCodeArea.h"
|
||||
#include "qt/element/QtCodeFileList.h"
|
||||
#include "qt/utility/QtHighlighter.h"
|
||||
#include "qt/view/QtViewOverlay.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
#include "settings/ColorScheme.h"
|
||||
|
||||
@@ -41,6 +42,7 @@ void QtCodeView::createWidgetWrapper()
|
||||
|
||||
void QtCodeView::initView()
|
||||
{
|
||||
m_overlay = new QtViewOverlay(m_widget);
|
||||
}
|
||||
|
||||
void QtCodeView::refreshView()
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
class QFrame;
|
||||
class QtCodeFileList;
|
||||
class QtViewOverlay;
|
||||
class QWidget;
|
||||
|
||||
class QtCodeView
|
||||
@@ -89,6 +90,8 @@ private:
|
||||
|
||||
std::vector<Id> m_activeTokenIds;
|
||||
std::vector<ErrorInfo> m_errorInfos;
|
||||
|
||||
QtViewOverlay* m_overlay;
|
||||
};
|
||||
|
||||
# endif // QT_CODE_VIEW_H
|
||||
|
||||
@@ -23,10 +23,9 @@ bool ResizeFilter::eventFilter(QObject* obj, QEvent* event)
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
|
||||
QtOverlay::QtOverlay(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_count(0)
|
||||
, m_count(rand() % 1000000)
|
||||
, m_size(40)
|
||||
{
|
||||
}
|
||||
@@ -65,11 +64,11 @@ void QtOverlay::paintEvent(QPaintEvent *event)
|
||||
|
||||
if (s > 50 && s < 150)
|
||||
{
|
||||
painter.setBrush(QBrush("#CC2E3C86"));
|
||||
painter.setBrush(QBrush("#882E3C86"));
|
||||
}
|
||||
else
|
||||
{
|
||||
painter.setBrush(QBrush("#CC007AC2"));
|
||||
painter.setBrush(QBrush("#88007AC2"));
|
||||
}
|
||||
|
||||
painter.setPen(QPen(Qt::transparent));
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "utility/messaging/type/MessageDispatchWhenLicenseValid.h"
|
||||
#include "utility/messaging/type/MessageFind.h"
|
||||
#include "utility/messaging/type/MessageInterruptTasks.h"
|
||||
#include "utility/messaging/type/MessageLoadBefore.h"
|
||||
#include "utility/messaging/type/MessageLoadProject.h"
|
||||
#include "utility/messaging/type/MessageRedo.h"
|
||||
#include "utility/messaging/type/MessageRefresh.h"
|
||||
@@ -371,8 +370,6 @@ void QtMainWindow::showStartScreen()
|
||||
|
||||
connect(startScreen, SIGNAL(openOpenProjectDialog()), this, SLOT(openProject()));
|
||||
connect(startScreen, SIGNAL(openNewProjectDialog()), this, SLOT(newProject()));
|
||||
|
||||
MessageLoadBefore().dispatch();
|
||||
}
|
||||
|
||||
void QtMainWindow::hideStartScreen()
|
||||
|
||||
Reference in New Issue
Block a user