From e1ef6b391122e4d05e2a622c03d4a9ec05823887 Mon Sep 17 00:00:00 2001
From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
Date: Wed, 8 May 2024 02:52:08 +0300
Subject: [PATCH] s/ellided/elided

---
 CMakeLists.txt                                |  4 +--
 .../{ellided_label.hpp => elided_label.hpp}   |  6 ++---
 src/panda_qt/elided_label.cpp                 | 25 +++++++++++++++++++
 src/panda_qt/ellided_label.cpp                | 25 -------------------
 src/panda_qt/patch_window.cpp                 |  4 +--
 5 files changed, 32 insertions(+), 32 deletions(-)
 rename include/panda_qt/{ellided_label.hpp => elided_label.hpp} (53%)
 create mode 100644 src/panda_qt/elided_label.cpp
 delete mode 100644 src/panda_qt/ellided_label.cpp

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88ad6aeb..748c298b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -449,11 +449,11 @@ if(NOT BUILD_HYDRA_CORE)
 
         set(FRONTEND_SOURCE_FILES src/panda_qt/main.cpp src/panda_qt/screen.cpp src/panda_qt/main_window.cpp src/panda_qt/about_window.cpp
             src/panda_qt/config_window.cpp src/panda_qt/zep.cpp src/panda_qt/text_editor.cpp src/panda_qt/cheats_window.cpp src/panda_qt/mappings.cpp
-            src/panda_qt/patch_window.cpp src/panda_qt/ellided_label.cpp
+            src/panda_qt/patch_window.cpp src/panda_qt/elided_label.cpp
         )
         set(FRONTEND_HEADER_FILES include/panda_qt/screen.hpp include/panda_qt/main_window.hpp include/panda_qt/about_window.hpp
             include/panda_qt/config_window.hpp include/panda_qt/text_editor.hpp include/panda_qt/cheats_window.hpp
-            include/panda_qt/patch_window.hpp include/panda_qt/ellided_label.hpp
+            include/panda_qt/patch_window.hpp include/panda_qt/elided_label.hpp
         )
 
         source_group("Source Files\\Qt" FILES ${FRONTEND_SOURCE_FILES})
diff --git a/include/panda_qt/ellided_label.hpp b/include/panda_qt/elided_label.hpp
similarity index 53%
rename from include/panda_qt/ellided_label.hpp
rename to include/panda_qt/elided_label.hpp
index 19fd8c74..9d937f9b 100644
--- a/include/panda_qt/ellided_label.hpp
+++ b/include/panda_qt/elided_label.hpp
@@ -4,11 +4,11 @@
 #include <QString>
 #include <QWidget>
 
-class EllidedLabel : public QLabel {
+class ElidedLabel : public QLabel {
 	Q_OBJECT
   public:
-	explicit EllidedLabel(Qt::TextElideMode elideMode = Qt::ElideLeft, QWidget* parent = nullptr);
-	explicit EllidedLabel(QString text, Qt::TextElideMode elideMode = Qt::ElideLeft, QWidget* parent = nullptr);
+	explicit ElidedLabel(Qt::TextElideMode elideMode = Qt::ElideLeft, QWidget* parent = nullptr);
+	explicit ElidedLabel(QString text, Qt::TextElideMode elideMode = Qt::ElideLeft, QWidget* parent = nullptr);
 	void setText(QString text);
 
   protected:
diff --git a/src/panda_qt/elided_label.cpp b/src/panda_qt/elided_label.cpp
new file mode 100644
index 00000000..f15cf11d
--- /dev/null
+++ b/src/panda_qt/elided_label.cpp
@@ -0,0 +1,25 @@
+#include "panda_qt/elided_label.hpp"
+
+// Based on https://stackoverflow.com/questions/7381100/text-overflow-for-a-qlabel-s-text-rendering-in-qt
+ElidedLabel::ElidedLabel(Qt::TextElideMode elideMode, QWidget* parent) : ElidedLabel("", elideMode, parent) {}
+
+ElidedLabel::ElidedLabel(QString text, Qt::TextElideMode elideMode, QWidget* parent) : QLabel(parent) {
+	m_elideMode = elideMode;
+	setText(text);
+}
+
+void ElidedLabel::setText(QString text) {
+	m_text = text;
+	updateText();
+}
+
+void ElidedLabel::resizeEvent(QResizeEvent* event) {
+	QLabel::resizeEvent(event);
+	updateText();
+}
+
+void ElidedLabel::updateText() {
+	QFontMetrics metrics(font());
+	QString elided = metrics.elidedText(m_text, m_elideMode, width());
+	QLabel::setText(elided);
+}
\ No newline at end of file
diff --git a/src/panda_qt/ellided_label.cpp b/src/panda_qt/ellided_label.cpp
deleted file mode 100644
index 68c0da76..00000000
--- a/src/panda_qt/ellided_label.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "panda_qt/ellided_label.hpp"
-
-// Based on https://stackoverflow.com/questions/7381100/text-overflow-for-a-qlabel-s-text-rendering-in-qt
-EllidedLabel::EllidedLabel(Qt::TextElideMode elideMode, QWidget* parent) : EllidedLabel("", elideMode, parent) {}
-
-EllidedLabel::EllidedLabel(QString text, Qt::TextElideMode elideMode, QWidget* parent) : QLabel(parent) {
-	m_elideMode = elideMode;
-	setText(text);
-}
-
-void EllidedLabel::setText(QString text) {
-	m_text = text;
-	updateText();
-}
-
-void EllidedLabel::resizeEvent(QResizeEvent* event) {
-	QLabel::resizeEvent(event);
-	updateText();
-}
-
-void EllidedLabel::updateText() {
-	QFontMetrics metrics(font());
-	QString elided = metrics.elidedText(m_text, m_elideMode, width());
-	QLabel::setText(elided);
-}
\ No newline at end of file
diff --git a/src/panda_qt/patch_window.cpp b/src/panda_qt/patch_window.cpp
index de5cd277..189288eb 100644
--- a/src/panda_qt/patch_window.cpp
+++ b/src/panda_qt/patch_window.cpp
@@ -20,7 +20,7 @@ PatchWindow::PatchWindow(QWidget* parent) : QWidget(parent, Qt::Window) {
 	QHBoxLayout* inputLayout = new QHBoxLayout;
 	QLabel* inputText = new QLabel(tr("Select input file"));
 	QPushButton* inputButton = new QPushButton(tr("Select"));
-	inputPathLabel = new EllidedLabel("");
+	inputPathLabel = new ElidedLabel("");
 	inputPathLabel->setFixedWidth(200);
 
 	inputLayout->addWidget(inputText);
@@ -32,7 +32,7 @@ PatchWindow::PatchWindow(QWidget* parent) : QWidget(parent, Qt::Window) {
 	QHBoxLayout* patchLayout = new QHBoxLayout;
 	QLabel* patchText = new QLabel(tr("Select patch file"));
 	QPushButton* patchButton = new QPushButton(tr("Select"));
-	patchPathLabel = new EllidedLabel("");
+	patchPathLabel = new ElidedLabel("");
 	patchPathLabel->setFixedWidth(200);
 
 	patchLayout->addWidget(patchText);