Skip to content

Commit 7061251

Browse files
authored
Fix TTD Memory Query widget scroll bar clipping issue (#877)
1 parent 1d32b55 commit 7061251

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

ui/ttdmemorywidget.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ TTDMemoryQueryWidget::~TTDMemoryQueryWidget()
128128

129129
void TTDMemoryQueryWidget::setupUI()
130130
{
131-
setMinimumSize(800, 600);
131+
// Set size policy to allow widget to adapt to sidebar space and prevent scroll bar clipping
132+
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
132133

133134
QVBoxLayout* mainLayout = new QVBoxLayout(this);
134135

@@ -226,6 +227,9 @@ void TTDMemoryQueryWidget::setupTable()
226227
m_resultsTable->setColumnCount(m_columnNames.size());
227228
m_resultsTable->setHorizontalHeaderLabels(m_columnNames);
228229

230+
// Set size policy to ensure table scrollbar works correctly within sidebar constraints
231+
m_resultsTable->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
232+
229233
// Configure table appearance
230234
m_resultsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
231235
m_resultsTable->setAlternatingRowColors(true);
@@ -709,7 +713,8 @@ TTDMemoryWidget::~TTDMemoryWidget()
709713
void TTDMemoryWidget::setupUI()
710714
{
711715
setWindowTitle("TTD Memory Analysis");
712-
setMinimumSize(900, 700);
716+
// Set size policy to allow widget to adapt to sidebar space and prevent scroll bar clipping
717+
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
713718

714719
QVBoxLayout* mainLayout = new QVBoxLayout(this);
715720
mainLayout->setContentsMargins(0, 0, 0, 0);

0 commit comments

Comments
 (0)