mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Room and Message tabs: focus input line when convenient; Fix #180
As suggest by Daenyth in #185
This commit is contained in:
parent
7f77082466
commit
aead0843af
6 changed files with 16 additions and 9 deletions
|
|
@ -34,10 +34,6 @@ TabMessage::TabMessage(TabSupervisor *_tabSupervisor, AbstractClient *_client, c
|
|||
|
||||
retranslateUi();
|
||||
setLayout(vbox);
|
||||
|
||||
setFocusProxy(sayEdit);
|
||||
chatView->setFocusProxy(sayEdit);
|
||||
sayEdit->setFocus();
|
||||
}
|
||||
|
||||
TabMessage::~TabMessage()
|
||||
|
|
@ -53,6 +49,12 @@ void TabMessage::retranslateUi()
|
|||
aLeave->setText(tr("&Leave"));
|
||||
}
|
||||
|
||||
void TabMessage::tabActivated()
|
||||
{
|
||||
if(!sayEdit->hasFocus())
|
||||
sayEdit->setFocus();
|
||||
}
|
||||
|
||||
QString TabMessage::getUserName() const
|
||||
{
|
||||
return QString::fromStdString(otherUserInfo->name());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue