Explorar o código

Fixed: project names with more than 25 characters create a gap in the project manager (#9228)

* Fixed: project names with more than 25 characters create a gap between tiles in the project manager

Signed-off-by: pyvyx <[email protected]>

* Fixed: project names with more than 25 characters create a gap between tiles in the project manager

Signed-off-by: pyvyx <[email protected]>

* add viewport UI manager to animation editor

Signed-off-by: greerdv <[email protected]>
Signed-off-by: pyvyx <[email protected]>

* remove redundant comment following PR feedback

Signed-off-by: greerdv <[email protected]>
Signed-off-by: pyvyx <[email protected]>

* using QFontMetrics::elidedText instead of looking at the size of the string

Signed-off-by: pyvyx <[email protected]>

* using QFontMetrics::elidedText instead of looking at the size of the string

Signed-off-by: pyvyx <[email protected]>

* using AzQtComponents::ElidingLabel instead of qts elidinglabel

Signed-off-by: pyvyx <[email protected]>

* Update Code/Tools/ProjectManager/Resources/ProjectManager.qss

Co-authored-by: Alex Peterson <[email protected]>
Signed-off-by: pyvyx <[email protected]>

* Update Code/Tools/ProjectManager/Resources/ProjectManager.qss

Co-authored-by: Alex Peterson <[email protected]>
Signed-off-by: pyvyx <[email protected]>

Co-authored-by: pyvyx <[email protected]>
Co-authored-by: greerdv <[email protected]>
Co-authored-by: Alex Peterson <[email protected]>
pyvyx %!s(int64=3) %!d(string=hai) anos
pai
achega
e2b5b24cb1

+ 9 - 1
Code/Tools/ProjectManager/Resources/ProjectManager.qss

@@ -449,7 +449,14 @@ QTabBar::tab:focus {
     border:1px solid #1e70eb;
 }
 
-#projectButton > QFrame  {
+#projectButton  {
+    min-width: 210px;
+    max-width: 210px;
+    min-height: 310px;
+    max-height: 310px;
+}
+
+#projectButton > Frame {
     margin-top:6px;
 }
 
@@ -457,6 +464,7 @@ QTabBar::tab:focus {
     font-weight:bold;
     font-size:14px;
     qproperty-indent: 0;
+    margin:0;
 }
 
 #labelButton QPushButton {

+ 2 - 1
Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp

@@ -11,6 +11,7 @@
 #include <ProjectUtils.h>
 #include <ProjectManager_Traits_Platform.h>
 #include <AzQtComponents/Utilities/DesktopUtilities.h>
+#include <AzQtComponents/Components/Widgets/ElidingLabel.h>
 #include <AzCore/IO/SystemFile.h>
 #include <AzCore/IO/Path/Path.h>
 
@@ -251,7 +252,7 @@ namespace O3DE::ProjectManager
         hLayout->setContentsMargins(0, 0, 0, 0);
         projectFooter->setLayout(hLayout);
         {
-            QLabel* projectNameLabel = new QLabel(m_projectInfo.GetProjectDisplayName(), this);
+            AzQtComponents::ElidingLabel* projectNameLabel = new AzQtComponents::ElidingLabel(m_projectInfo.GetProjectDisplayName(), this);
             projectNameLabel->setToolTip(m_projectInfo.m_path);
             hLayout->addWidget(projectNameLabel);
 

+ 1 - 1
Code/Tools/ProjectManager/Source/ProjectInfo.h

@@ -37,7 +37,7 @@ namespace O3DE::ProjectManager
         bool operator!=(const ProjectInfo& rhs) const;
 
         bool IsValid() const;
-        const QString& GetProjectDisplayName() const; 
+        const QString& GetProjectDisplayName() const;
 
         // from o3de_manifest.json and o3de_projects.json
         QString m_path;