Mercurial > minori
comparison src/gui/ui_utils.cpp @ 36:2743011a6042
*: mass update
formatted all source files, converted ALL instances of setStyleSheet() to
palettes and fonts (stylesheets suck), and I changed the clang-format file because
it wasn't working on my laptop for some reason.
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 21 Sep 2023 15:17:47 -0400 |
parents | cde8f67a7c7d |
children |
comparison
equal
deleted
inserted
replaced
35:329b7921a6be | 36:2743011a6042 |
---|---|
96 | 96 |
97 Paragraph* TextParagraph::GetParagraph() { | 97 Paragraph* TextParagraph::GetParagraph() { |
98 return paragraph; | 98 return paragraph; |
99 } | 99 } |
100 | 100 |
101 LabelledTextParagraph::LabelledTextParagraph(QString title, QString label, QString data, | 101 LabelledTextParagraph::LabelledTextParagraph(QString title, QString label, QString data, QWidget* parent) |
102 QWidget* parent) | |
103 : QWidget(parent) { | 102 : QWidget(parent) { |
104 setLayout(new QVBoxLayout); | 103 setLayout(new QVBoxLayout); |
105 | 104 |
106 header = new Header(title, this); | 105 header = new Header(title, this); |
107 | 106 |
147 | 146 |
148 Paragraph* LabelledTextParagraph::GetParagraph() { | 147 Paragraph* LabelledTextParagraph::GetParagraph() { |
149 return paragraph; | 148 return paragraph; |
150 } | 149 } |
151 | 150 |
152 SelectableTextParagraph::SelectableTextParagraph(QString title, QString data, QWidget* parent) | 151 SelectableTextParagraph::SelectableTextParagraph(QString title, QString data, QWidget* parent) : QWidget(parent) { |
153 : QWidget(parent) { | |
154 setLayout(new QVBoxLayout); | 152 setLayout(new QVBoxLayout); |
155 | 153 |
156 header = new Header(title, this); | 154 header = new Header(title, this); |
157 | 155 |
158 QWidget* content = new QWidget(this); | 156 QWidget* content = new QWidget(this); |
191 setReadOnly(true); | 189 setReadOnly(true); |
192 setTextInteractionFlags(Qt::TextBrowserInteraction); | 190 setTextInteractionFlags(Qt::TextBrowserInteraction); |
193 setFrameShape(QFrame::NoFrame); | 191 setFrameShape(QFrame::NoFrame); |
194 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | 192 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
195 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); | 193 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); |
196 setStyleSheet("background: transparent;"); | 194 |
195 QPalette pal; | |
196 pal.setColor(QPalette::Window, QColor(0, 0, 0, 0)); | |
197 setPalette(pal); | |
198 | |
197 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); | 199 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); |
198 } | 200 } |
199 | 201 |
200 /* highly based upon... some stackoverflow answer for PyQt */ | 202 /* highly based upon... some stackoverflow answer for PyQt */ |
201 QSize Paragraph::minimumSizeHint() const { | 203 QSize Paragraph::minimumSizeHint() const { |