added a tip to the SplitHeader when you have >1 tab

This commit is contained in:
fourtf 2018-01-17 02:04:10 +01:00
parent 0a3c6e29c7
commit 1fe7e652b1
2 changed files with 18 additions and 5 deletions

View file

@ -85,14 +85,14 @@ void SplitHeader::addDropdownItems(RippleEffectLabel *label)
// clang-format off
this->dropdownMenu.addAction("Add new split", this->split, &Split::doAddSplit, QKeySequence(tr("Ctrl+T")));
this->dropdownMenu.addAction("Close split", this->split, &Split::doCloseSplit, QKeySequence(tr("Ctrl+W")));
this->dropdownMenu.addAction("Move split", this, SLOT(menuMoveSplit()));
// this->dropdownMenu.addAction("Move split", this, SLOT(menuMoveSplit()));
this->dropdownMenu.addAction("Popup", this->split, &Split::doPopup);
this->dropdownMenu.addAction("Open viewer list", this->split, &Split::doOpenViewerList);
this->dropdownMenu.addSeparator();
this->dropdownMenu.addAction("Change channel", this->split, &Split::doChangeChannel, QKeySequence(tr("Ctrl+R")));
this->dropdownMenu.addAction("Clear chat", this->split, &Split::doClearChat);
this->dropdownMenu.addAction("Open channel", this->split, &Split::doOpenChannel);
this->dropdownMenu.addAction("Open popup player", this->split, &Split::doOpenPopupPlayer);
this->dropdownMenu.addAction("Open in web browser", this->split, &Split::doOpenChannel);
this->dropdownMenu.addAction("Open web popup player", this->split, &Split::doOpenPopupPlayer);
this->dropdownMenu.addAction("Open in Streamlink", this->split, &Split::doOpenStreamlink);
this->dropdownMenu.addSeparator();
this->dropdownMenu.addAction("Reload channel emotes", this, SLOT(menuReloadChannelEmotes()));

View file

@ -161,7 +161,7 @@ void SplitContainer::addChat(bool openChannelNameDialog, std::string chatUUID)
Split *w = this->createChatWidget(chatUUID);
if (openChannelNameDialog) {
bool ret = w->showChangeChannelPopup("Open channel", true);
bool ret = w->showChangeChannelPopup("Open channel name", true);
if (!ret) {
delete w;
@ -394,7 +394,19 @@ void SplitContainer::paintEvent(QPaintEvent *)
painter.fillRect(rect(), this->themeManager.splits.background);
painter.setPen(this->themeManager.splits.header.text);
painter.drawText(rect(), "Add Chat", QTextOption(Qt::AlignCenter));
QString text = "Click to add a <split>";
Notebook *notebook = dynamic_cast<Notebook *>(this->parentWidget());
if (notebook != nullptr) {
if (notebook->tabCount() > 1) {
text += "\n\ntip: you can drag a <split> while holding <Alt>";
text += "\nor add another one by pressing <Ctrl+T>";
}
}
painter.drawText(rect(), text, QTextOption(Qt::AlignCenter));
} else {
painter.fillRect(rect(), this->themeManager.splits.messageSeperator);
}
@ -439,6 +451,7 @@ Split *SplitContainer::createChatWidget(const std::string &uuid)
auto split = new Split(this, uuid);
split->getChannelView().highlightedMessageReceived.connect([this] {
// fourtf: error potentionally here
this->tab->setHighlightState(HighlightState::Highlighted); //
});