Mercurial > minori
comparison src/gui/widgets/text.cpp @ 77:6f7385bd334c
*: update
formatted all source files, no more subclassing QThread... many other
changes :)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Fri, 06 Oct 2023 06:18:53 -0400 |
parents | 3364fadc8a36 |
children |
comparison
equal
deleted
inserted
replaced
76:3364fadc8a36 | 77:6f7385bd334c |
---|---|
1 #include "gui/widgets/text.h" | 1 #include "gui/widgets/text.h" |
2 #include "core/session.h" | 2 #include "core/session.h" |
3 #include <QDebug> | |
3 #include <QFrame> | 4 #include <QFrame> |
4 #include <QLabel> | 5 #include <QLabel> |
5 #include <QTextBlock> | 6 #include <QTextBlock> |
6 #include <QVBoxLayout> | 7 #include <QVBoxLayout> |
7 | 8 |
14 static_text_title = new QLabel(title, this); | 15 static_text_title = new QLabel(title, this); |
15 static_text_title->setTextFormat(Qt::PlainText); | 16 static_text_title->setTextFormat(Qt::PlainText); |
16 QFont font = static_text_title->font(); | 17 QFont font = static_text_title->font(); |
17 font.setWeight(QFont::Bold); | 18 font.setWeight(QFont::Bold); |
18 static_text_title->setFont(font); | 19 static_text_title->setFont(font); |
19 /* FIXME: is this needed? */ | |
20 static_text_title->setFixedHeight(16); | |
21 | 20 |
22 static_text_line = new QFrame(this); | 21 static_text_line = new QFrame(this); |
23 static_text_line->setFrameShape(QFrame::HLine); | 22 static_text_line->setFrameShape(QFrame::HLine); |
24 static_text_line->setFrameShadow(QFrame::Sunken); | 23 static_text_line->setFrameShadow(QFrame::Sunken); |
25 static_text_line->setFixedHeight(2); | 24 static_text_line->setFixedHeight(2); |
74 exists because sometimes with SelectableSection it will let you go | 73 exists because sometimes with SelectableSection it will let you go |
75 out of bounds */ | 74 out of bounds */ |
76 Line::Line(QString text, QWidget* parent) : QLineEdit(text, parent) { | 75 Line::Line(QString text, QWidget* parent) : QLineEdit(text, parent) { |
77 setFrame(false); | 76 setFrame(false); |
78 setReadOnly(true); | 77 setReadOnly(true); |
78 setCursorPosition(0); /* displays left text first */ | |
79 | 79 |
80 QPalette pal; | 80 QPalette pal; |
81 pal.setColor(QPalette::Window, Qt::transparent); | 81 pal.setColor(QPalette::Window, Qt::transparent); |
82 setPalette(pal); | 82 setPalette(pal); |
83 | 83 |