mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
* fix * refactor
This commit is contained in:
parent
cfbe59868b
commit
b270562a44
1 changed files with 21 additions and 13 deletions
|
|
@ -1682,20 +1682,8 @@ void TabGame::createMessageDock(bool bReplay)
|
||||||
auto messageLogLayout = new QVBoxLayout;
|
auto messageLogLayout = new QVBoxLayout;
|
||||||
messageLogLayout->setContentsMargins(0, 0, 0, 0);
|
messageLogLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
messageLog = new MessageLogWidget(tabSupervisor, this);
|
// clock
|
||||||
connect(messageLog, &MessageLogWidget::cardNameHovered, cardInfoFrameWidget,
|
|
||||||
qOverload<const QString &>(&CardInfoFrameWidget::setCard));
|
|
||||||
connect(messageLog, &MessageLogWidget::showCardInfoPopup, this, &TabGame::showCardInfoPopup);
|
|
||||||
connect(messageLog, &MessageLogWidget::deleteCardInfoPopup, this, &TabGame::deleteCardInfoPopup);
|
|
||||||
|
|
||||||
messageLogLayout->addWidget(messageLog);
|
|
||||||
|
|
||||||
if (!bReplay) {
|
if (!bReplay) {
|
||||||
connect(messageLog, &MessageLogWidget::openMessageDialog, this, &TabGame::openMessageDialog);
|
|
||||||
connect(messageLog, &MessageLogWidget::addMentionTag, this, &TabGame::addMentionTag);
|
|
||||||
connect(&SettingsCache::instance(), &SettingsCache::chatMentionCompleterChanged, this,
|
|
||||||
&TabGame::actCompleterChanged);
|
|
||||||
|
|
||||||
timeElapsedLabel = new QLabel;
|
timeElapsedLabel = new QLabel;
|
||||||
timeElapsedLabel->setAlignment(Qt::AlignCenter);
|
timeElapsedLabel->setAlignment(Qt::AlignCenter);
|
||||||
gameTimer = new QTimer(this);
|
gameTimer = new QTimer(this);
|
||||||
|
|
@ -1704,7 +1692,26 @@ void TabGame::createMessageDock(bool bReplay)
|
||||||
gameTimer->start();
|
gameTimer->start();
|
||||||
|
|
||||||
messageLogLayout->addWidget(timeElapsedLabel);
|
messageLogLayout->addWidget(timeElapsedLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// message log
|
||||||
|
messageLog = new MessageLogWidget(tabSupervisor, this);
|
||||||
|
connect(messageLog, &MessageLogWidget::cardNameHovered, cardInfoFrameWidget,
|
||||||
|
qOverload<const QString &>(&CardInfoFrameWidget::setCard));
|
||||||
|
connect(messageLog, &MessageLogWidget::showCardInfoPopup, this, &TabGame::showCardInfoPopup);
|
||||||
|
connect(messageLog, &MessageLogWidget::deleteCardInfoPopup, this, &TabGame::deleteCardInfoPopup);
|
||||||
|
|
||||||
|
if (!bReplay) {
|
||||||
|
connect(messageLog, &MessageLogWidget::openMessageDialog, this, &TabGame::openMessageDialog);
|
||||||
|
connect(messageLog, &MessageLogWidget::addMentionTag, this, &TabGame::addMentionTag);
|
||||||
|
connect(&SettingsCache::instance(), &SettingsCache::chatMentionCompleterChanged, this,
|
||||||
|
&TabGame::actCompleterChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
messageLogLayout->addWidget(messageLog);
|
||||||
|
|
||||||
|
// chat entry
|
||||||
|
if (!bReplay) {
|
||||||
sayLabel = new QLabel;
|
sayLabel = new QLabel;
|
||||||
sayEdit = new LineEditCompleter;
|
sayEdit = new LineEditCompleter;
|
||||||
sayEdit->setMaxLength(MAX_TEXT_LENGTH);
|
sayEdit->setMaxLength(MAX_TEXT_LENGTH);
|
||||||
|
|
@ -1740,6 +1747,7 @@ void TabGame::createMessageDock(bool bReplay)
|
||||||
messageLogLayout->addLayout(sayHLayout);
|
messageLogLayout->addLayout(sayHLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dock
|
||||||
auto messageLogLayoutWidget = new QWidget;
|
auto messageLogLayoutWidget = new QWidget;
|
||||||
messageLogLayoutWidget->setLayout(messageLogLayout);
|
messageLogLayoutWidget->setLayout(messageLogLayout);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue