From 47eb9ebecf01118b6443103683afa4ac91cc03db Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 28 May 2024 11:11:19 +0800 Subject: [PATCH] - fix: Layout for function tips. --- NEWS.md | 1 + RedPandaIDE/widgets/functiontooltipwidget.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index ec9e2221..e223d94d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,7 @@ Red Panda C++ Version 3.1 - enhancement: Handle problems info from competitive-companion in background thread. - enhancement: Handle time/memory limits in problems info from competitive-companion in background thread. - enhancement: When problems info from competitive-companion received, show tips in the status bar. + - fix: Layout for function tips. Red Panda C++ Version 3.0 diff --git a/RedPandaIDE/widgets/functiontooltipwidget.cpp b/RedPandaIDE/widgets/functiontooltipwidget.cpp index 9b75899b..bca2aa22 100644 --- a/RedPandaIDE/widgets/functiontooltipwidget.cpp +++ b/RedPandaIDE/widgets/functiontooltipwidget.cpp @@ -49,6 +49,9 @@ FunctionTooltipWidget::FunctionTooltipWidget(QWidget *parent) : layout()->addWidget(mTotalLabel); layout()->addWidget(mDownButton); layout()->addWidget(mInfoLabel); + QSizePolicy policy=mInfoLabel->sizePolicy(); + policy.setHorizontalPolicy(QSizePolicy::Expanding); + mInfoLabel->setSizePolicy(policy); connect(mUpButton,&QPushButton::clicked, this,&FunctionTooltipWidget::previousTip); connect(mDownButton,&QPushButton::clicked,