Устранить сжатие панели звонка и распараллелить HEVC внутри кадра
This commit is contained in:
1 parent
21e4821e22
commit
3ed9acb384
2 files changed
+14
-3
No files matched your search
@@ -191,7 +191,6 @@ CallWindow::CallWindow(QWidget* parent)
|
||||
: QWidget(parent, Qt::Window) {
|
||||
setWindowTitle(QCoreApplication::translate("ChatGui", "Call"));
|
||||
resize(520, 520);
|
||||
setMinimumSize(420, 360);
|
||||
setAttribute(Qt::WA_DeleteOnClose, false);
|
||||
|
||||
m_avatarLabel = new QLabel(this);
|
||||
@@ -244,10 +243,14 @@ CallWindow::CallWindow(QWidget* parent)
|
||||
|
||||
auto* root = new QVBoxLayout(this);
|
||||
root->setContentsMargins(12, 12, 12, 12);
|
||||
root->setSizeConstraint(QLayout::SetMinimumSize);
|
||||
m_videoWindow = new CallVideoWindow(this);
|
||||
m_panel = new QWidget(this); m_panel->setObjectName("callPanel"); m_panel->setMaximumWidth(640);
|
||||
m_panel->setStyleSheet("QWidget#callPanel { background: palette(window); border-radius: 12px; }");
|
||||
root->addWidget(m_panel, 0, Qt::AlignCenter);
|
||||
// Вертикальное центрирование через отступы сохраняет минимальную высоту панели в расчёте размера окна.
|
||||
root->addStretch(1);
|
||||
root->addWidget(m_panel, 0, Qt::AlignHCenter);
|
||||
root->addStretch(1);
|
||||
QVBoxLayout* lay = new QVBoxLayout(m_panel);
|
||||
lay->setContentsMargins(16, 20, 16, 16);
|
||||
lay->setSpacing(8);
|
||||
@@ -457,6 +460,9 @@ void CallWindow::updateVideoPresentation() {
|
||||
m_videoEnabled->setVisible(active); m_settingsBtn->setVisible(active);
|
||||
m_videoControls->setVisible(settings); m_showVideoBtn->setVisible(receiving);
|
||||
m_videoStatus->setVisible(active && !m_videoStatus->text().isEmpty());
|
||||
QSize panelMinimum = m_panel->minimumSizeHint();
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "call layout active=%d preview=%d settings=%d window=%dx%d panel_min=%dx%d",
|
||||
active, m_localPreview->isVisible(), settings, width(), height(), panelMinimum.width(), panelMinimum.height());
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user