Resizable Headers for Gem Catalog and Gem Repo Screen (#6885)
* Initial mostly working attempt at resizable headers Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Add const and constexpr to variables Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Add header tracking for buttons, display items based on header scrollbar position, fix some spacing issues Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Correct styling for adjustable header, and intending header section and alingned item content with header text Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Prevent header resizing larger than table width. Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> * Fix resize graphical glitching Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> * Remove unecessary qss Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Removed necessary headers Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Remove extra nl and old comment Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Address PR feedback Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Removed unused variables Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Change variable to constexpr Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Remove AUTOMOC from headers, set background color of Gem Catalog to 333333 and adjustable header to transparent Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Change to using update instead of repaint when sections are resized Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> * Change temp directory creation on for gradle Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com> Co-authored-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
namespace O3DE::ProjectManager
|
||||
{
|
||||
GemRequirementDelegate::GemRequirementDelegate(QAbstractItemModel* model, QObject* parent)
|
||||
: GemItemDelegate(model, parent)
|
||||
: GemItemDelegate(model, nullptr, parent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace O3DE::ProjectManager
|
||||
// Gem name
|
||||
QString gemName = GemModel::GetDisplayName(modelIndex);
|
||||
QFont gemNameFont(options.font);
|
||||
const int firstColumnMaxTextWidth = s_summaryStartX - 30;
|
||||
const int firstColumnMaxTextWidth = s_defaultSummaryStartX - 30;
|
||||
gemName = QFontMetrics(gemNameFont).elidedText(gemName, Qt::TextElideMode::ElideRight, firstColumnMaxTextWidth);
|
||||
gemNameFont.setPixelSize(static_cast<int>(s_gemNameFontSize));
|
||||
gemNameFont.setBold(true);
|
||||
@@ -75,8 +75,8 @@ namespace O3DE::ProjectManager
|
||||
|
||||
QRect GemRequirementDelegate::CalcRequirementRect(const QRect& contentRect) const
|
||||
{
|
||||
const QSize requirementSize = QSize(contentRect.width() - s_summaryStartX - s_itemMargins.right(), contentRect.height());
|
||||
return QRect(QPoint(contentRect.left() + s_summaryStartX, contentRect.top()), requirementSize);
|
||||
const QSize requirementSize = QSize(contentRect.width() - s_defaultSummaryStartX - s_itemMargins.right(), contentRect.height());
|
||||
return QRect(QPoint(contentRect.left() + s_defaultSummaryStartX, contentRect.top()), requirementSize);
|
||||
}
|
||||
|
||||
bool GemRequirementDelegate::editorEvent(
|
||||
|
||||
Reference in New Issue
Block a user