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,