mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Рефакт Message Item
This commit is contained in:
@@ -90,8 +90,8 @@ void MsgWidget::on_editText_textChanged()
|
||||
|
||||
if(textRect.width() > widthEdit)
|
||||
{//Не помещается в одну строку
|
||||
textRect = metricsFont.boundingRect(QRect(0, 0, widthEdit, 1000), 0, text);
|
||||
|
||||
textRect = metricsFont.boundingRect(QRect(0, 0, widthEdit, 1000), 0, text);
|
||||
|
||||
if(textRect.width() > widthEdit)
|
||||
{
|
||||
@@ -109,13 +109,12 @@ void MsgWidget::on_editText_textChanged()
|
||||
{
|
||||
this->setFixedHeight(textRect.height() + X + 20 + 30);
|
||||
ui->editText->setFixedHeight(textRect.height() + X);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{//В одну строку
|
||||
this->setFixedHeight(textRect.height() + X + 20 + 30);
|
||||
ui->editText->setFixedWidth(textRect.width() + X);
|
||||
ui->editText->setFixedHeight(textRect.height() + X);
|
||||
this->setFixedHeight(textRect.height() + X + 20 + 30);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user