diff src/gui/ui_utils.cpp @ 15:cde8f67a7c7d

*: update, megacommit :)
author Paper <mrpapersonic@gmail.com>
date Tue, 19 Sep 2023 22:36:08 -0400
parents 5c0397762b53
children 2743011a6042
line wrap: on
line diff
--- a/src/gui/ui_utils.cpp	Tue Sep 19 16:33:07 2023 -0400
+++ b/src/gui/ui_utils.cpp	Tue Sep 19 22:36:08 2023 -0400
@@ -10,9 +10,9 @@
 #include <QTextBlock>
 #include <QVBoxLayout>
 #ifdef MACOSX
-#include "sys/osx/dark_theme.h"
+#	include "sys/osx/dark_theme.h"
 #else
-#include "sys/win32/dark_theme.h"
+#	include "sys/win32/dark_theme.h"
 #endif
 
 namespace UiUtils {
@@ -98,8 +98,9 @@
 	return paragraph;
 }
 
-LabelledTextParagraph::LabelledTextParagraph(QString title, QString label, QString data, QWidget* parent)
-	: QWidget(parent) {
+LabelledTextParagraph::LabelledTextParagraph(QString title, QString label, QString data,
+                                             QWidget* parent)
+    : QWidget(parent) {
 	setLayout(new QVBoxLayout);
 
 	header = new Header(title, this);
@@ -107,13 +108,13 @@
 	// this is not accessible from the object because there's really
 	// no reason to make it accessible...
 	QWidget* content = new QWidget(this);
-	content->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
+	content->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
 
 	labels = new Paragraph(label, this);
 	labels->setTextInteractionFlags(Qt::NoTextInteraction);
 	labels->setAttribute(Qt::WidgetAttribute::WA_TransparentForMouseEvents);
 	labels->setWordWrapMode(QTextOption::NoWrap);
-	labels->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
+	labels->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
 	labels->setFixedWidth(123);
 
 	paragraph = new Paragraph(data, this);
@@ -148,7 +149,8 @@
 	return paragraph;
 }
 
-SelectableTextParagraph::SelectableTextParagraph(QString title, QString data, QWidget* parent) : QWidget(parent) {
+SelectableTextParagraph::SelectableTextParagraph(QString title, QString data, QWidget* parent)
+    : QWidget(parent) {
 	setLayout(new QVBoxLayout);
 
 	header = new Header(title, this);
@@ -199,8 +201,8 @@
 QSize Paragraph::minimumSizeHint() const {
 	QTextDocument* doc = document();
 	long h = (long)(blockBoundingGeometry(doc->findBlockByNumber(doc->blockCount() - 1)).bottom() +
-					(2 * doc->documentMargin()));
-	return QSize(QPlainTextEdit::sizeHint().width(), (long)h);
+	                (2 * doc->documentMargin()));
+	return QSize(QPlainTextEdit::sizeHint().width(), h);
 }
 
 QSize Paragraph::sizeHint() const {