Mercurial > minori
comparison src/gui/widgets/text.cpp @ 62:4c6dd5999b39
*: update
1. updated animia
2. use widestrings for filesystem on Windows
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Sun, 01 Oct 2023 06:16:06 -0400 |
| parents | 75c804f713b2 |
| children | 3d2decf093bb |
comparison
equal
deleted
inserted
replaced
| 61:327568ad9be9 | 62:4c6dd5999b39 |
|---|---|
| 26 static_text_line->setFixedHeight(2); | 26 static_text_line->setFixedHeight(2); |
| 27 | 27 |
| 28 layout()->addWidget(static_text_title); | 28 layout()->addWidget(static_text_title); |
| 29 layout()->addWidget(static_text_line); | 29 layout()->addWidget(static_text_line); |
| 30 layout()->setSpacing(0); | 30 layout()->setSpacing(0); |
| 31 layout()->setMargin(0); | 31 layout()->setContentsMargins(0, 0, 0, 0); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void Header::SetTitle(QString title) { | 34 void Header::SetTitle(QString title) { |
| 35 static_text_title->setText(title); | 35 static_text_title->setText(title); |
| 36 } | 36 } |
| 48 paragraph->setAttribute(Qt::WidgetAttribute::WA_TransparentForMouseEvents); | 48 paragraph->setAttribute(Qt::WidgetAttribute::WA_TransparentForMouseEvents); |
| 49 paragraph->setWordWrapMode(QTextOption::NoWrap); | 49 paragraph->setWordWrapMode(QTextOption::NoWrap); |
| 50 | 50 |
| 51 content->layout()->addWidget(paragraph); | 51 content->layout()->addWidget(paragraph); |
| 52 content->layout()->setSpacing(0); | 52 content->layout()->setSpacing(0); |
| 53 content->layout()->setMargin(0); | 53 content->layout()->setContentsMargins(0, 0, 0, 0); |
| 54 content->setContentsMargins(12, 0, 0, 0); | 54 content->setContentsMargins(12, 0, 0, 0); |
| 55 | 55 |
| 56 layout()->addWidget(header); | 56 layout()->addWidget(header); |
| 57 layout()->addWidget(paragraph); | 57 layout()->addWidget(paragraph); |
| 58 layout()->setSpacing(0); | 58 layout()->setSpacing(0); |
| 59 layout()->setMargin(0); | 59 layout()->setContentsMargins(0, 0, 0, 0); |
| 60 } | 60 } |
| 61 | 61 |
| 62 Header* TextParagraph::GetHeader() { | 62 Header* TextParagraph::GetHeader() { |
| 63 return header; | 63 return header; |
| 64 } | 64 } |
| 91 | 91 |
| 92 QHBoxLayout* content_layout = new QHBoxLayout(content); | 92 QHBoxLayout* content_layout = new QHBoxLayout(content); |
| 93 content_layout->addWidget(labels, 0, Qt::AlignTop); | 93 content_layout->addWidget(labels, 0, Qt::AlignTop); |
| 94 content_layout->addWidget(paragraph, 0, Qt::AlignTop); | 94 content_layout->addWidget(paragraph, 0, Qt::AlignTop); |
| 95 content_layout->setSpacing(20); | 95 content_layout->setSpacing(20); |
| 96 content_layout->setMargin(0); | 96 content_layout->setContentsMargins(0, 0, 0, 0); |
| 97 | 97 |
| 98 content->setContentsMargins(12, 0, 0, 0); | 98 content->setContentsMargins(12, 0, 0, 0); |
| 99 | 99 |
| 100 layout()->addWidget(header); | 100 layout()->addWidget(header); |
| 101 layout()->addWidget(content); | 101 layout()->addWidget(content); |
| 102 layout()->setSpacing(0); | 102 layout()->setSpacing(0); |
| 103 layout()->setMargin(0); | 103 layout()->setContentsMargins(0, 0, 0, 0); |
| 104 } | 104 } |
| 105 | 105 |
| 106 Header* LabelledTextParagraph::GetHeader() { | 106 Header* LabelledTextParagraph::GetHeader() { |
| 107 return header; | 107 return header; |
| 108 } | 108 } |
| 125 | 125 |
| 126 paragraph = new Paragraph(data, content); | 126 paragraph = new Paragraph(data, content); |
| 127 | 127 |
| 128 content->layout()->addWidget(paragraph); | 128 content->layout()->addWidget(paragraph); |
| 129 content->layout()->setSpacing(0); | 129 content->layout()->setSpacing(0); |
| 130 content->layout()->setMargin(0); | 130 content->layout()->setContentsMargins(0, 0, 0, 0); |
| 131 content->setContentsMargins(12, 0, 0, 0); | 131 content->setContentsMargins(12, 0, 0, 0); |
| 132 | 132 |
| 133 layout()->addWidget(header); | 133 layout()->addWidget(header); |
| 134 layout()->addWidget(content); | 134 layout()->addWidget(content); |
| 135 layout()->setSpacing(0); | 135 layout()->setSpacing(0); |
| 136 layout()->setMargin(0); | 136 layout()->setContentsMargins(0, 0, 0, 0); |
| 137 } | 137 } |
| 138 | 138 |
| 139 Header* SelectableTextParagraph::GetHeader() { | 139 Header* SelectableTextParagraph::GetHeader() { |
| 140 return header; | 140 return header; |
| 141 } | 141 } |
