ui: styled code view
* updated spacings and colors in QtCodeView and QtCodeFile * using Source Code Pro Regular (had to remove light cut from the Fonts folder because it got always used) * updated syntax highlighted colors to fit design * changed colors of highlights * indent all QtCodeSnippets by maximum line number in QtCodeFile * fixed syntax highlighting to work with sole multiline comment end fortune cookie message = Your present plans are going to succeed.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "utility/FileSystem.h"
|
||||
#include "utility/messaging/type/MessageActivateToken.h"
|
||||
#include "utility/text/TextAccess.h"
|
||||
|
||||
QtCodeView::QtCodeView(ViewLayout* viewLayout)
|
||||
: CodeView(viewLayout)
|
||||
@@ -30,14 +31,15 @@ void QtCodeView::createWidgetWrapper()
|
||||
void QtCodeView::initGui()
|
||||
{
|
||||
QWidget* widget = QtWidgetWrapper::getWidgetOfView(this);
|
||||
utility::setWidgetBackgroundColor(widget, Colori(255, 125, 0, 255));
|
||||
widget->setStyleSheet(TextAccess::createFromFile("data/gui/code_view/code_view.css")->getText().c_str());
|
||||
widget->setObjectName("code_view");
|
||||
|
||||
QScrollArea* scroll = dynamic_cast<QScrollArea*>(widget);
|
||||
m_frame = std::make_shared<QFrame>(scroll);
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(m_frame.get());
|
||||
layout->setSpacing(10);
|
||||
layout->setContentsMargins(3, 3, 3, 3);
|
||||
layout->setContentsMargins(15, 15, 15, 15);
|
||||
layout->setAlignment(Qt::AlignTop);
|
||||
m_frame->setLayout(layout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user