Move Chat notify button from search bar to tool bar.

As search bar is hidden by default.
This commit is contained in:
Phenom 2016-04-10 16:42:15 +02:00
parent d512c4a35a
commit c5873f3216
2 changed files with 68 additions and 68 deletions

View File

@ -218,7 +218,7 @@ void ChatWidget::setDefaultExtraFileFlags(TransferRequestFlags fl)
void ChatWidget::addChatHorizontalWidget(QWidget *w)
{
ui->vl_Plugins->addWidget(w) ;
ui->pluginsVLayout->addWidget(w) ;
update() ;
}
@ -234,8 +234,8 @@ void ChatWidget::addTitleBarWidget(QWidget *w)
void ChatWidget::hideChatText(bool hidden)
{
ui->frame_ChatText->setHidden(hidden); ;
ui->searchframe->setVisible(ui->actionSearch_History->isChecked() && !hidden); ;
ui->chatTextFrame->setHidden(hidden); ;
ui->searchFrame->setVisible(ui->actionSearch_History->isChecked() && !hidden); ;
}
RSButtonOnText* ChatWidget::getNewButtonOnTextBrowser()
@ -400,12 +400,12 @@ void ChatWidget::processSettings(bool load)
// load settings
// state of splitter
ui->chatsplitter->restoreState(Settings->value("ChatSplitter").toByteArray());
ui->chatVSplitter->restoreState(Settings->value("ChatSplitter").toByteArray());
} else {
// save settings
// state of splitter
Settings->setValue("ChatSplitter", ui->chatsplitter->saveState());
Settings->setValue("ChatSplitter", ui->chatVSplitter->saveState());
}
Settings->endGroup();
@ -835,7 +835,7 @@ void ChatWidget::on_notifyButton_clicked()
QIcon icoLobby=(ui->notifyButton->icon());
notify->makeSubMenu(menu, icoLobby, title, chatId.toLobbyId());
menu->exec(ui->notifyButton->mapToGlobal(ui->notifyButton->geometry().bottomLeft()));
menu->exec(ui->notifyButton->mapToGlobal(QPoint(0,ui->notifyButton->geometry().height())));
}
@ -1031,7 +1031,7 @@ void ChatWidget::chatCharFormatChanged()
void ChatWidget::resetStatusBar()
{
ui->typingLabel->clear();
ui->typingpixmapLabel->clear();
ui->typingPixmapLabel->clear();
typing = false;
@ -1430,9 +1430,9 @@ void ChatWidget::messageHistory()
void ChatWidget::searchHistory()
{
if(ui->actionSearch_History->isChecked()){
ui->searchframe->show();
ui->searchFrame->show();
}else {
ui->searchframe->hide();
ui->searchFrame->hide();
}
}
@ -1661,7 +1661,7 @@ void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)
{
ui->typingLabel->setText(QString(statusMask).arg(tr(statusString.toUtf8()))); // displays info for 5 secs.
ui->typingpixmapLabel->setPixmap(QPixmap(":images/typing.png") );
ui->typingPixmapLabel->setPixmap(QPixmap(":images/typing.png") );
if (statusString == "is typing...") {
typing = true;

View File

@ -10,7 +10,7 @@
<height>323</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -27,12 +27,12 @@
<number>2</number>
</property>
<item row="1" column="0">
<layout class="QHBoxLayout" name="hl_TextChat">
<layout class="QHBoxLayout" name="textChatHLayout">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QFrame" name="frame_ChatText">
<widget class="QFrame" name="chatTextFrame">
<property name="minimumSize">
<size>
<width>20</width>
@ -45,7 +45,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QVBoxLayout" name="chatTextFrameVLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -130,7 +130,7 @@
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QHBoxLayout" name="infoFrameHLayout">
<property name="leftMargin">
<number>6</number>
</property>
@ -207,7 +207,7 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item>
<widget class="QSplitter" name="chatsplitter">
<widget class="QSplitter" name="chatVSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -235,14 +235,14 @@ border-image: url(:/images/closepressed.png)
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="chatTextVLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QHBoxLayout" name="typingHLayout">
<item>
<widget class="QLabel" name="typingpixmapLabel">
<widget class="QLabel" name="typingPixmapLabel">
<property name="minimumSize">
<size>
<width>18</width>
@ -280,7 +280,7 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<spacer name="typingHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -308,7 +308,7 @@ border-image: url(:/images/closepressed.png)
<height>30</height>
</size>
</property>
<property name="placeholderText" stdset="0">
<property name="placeholderText">
<string>Type a message here</string>
</property>
</widget>
@ -325,7 +325,7 @@ border-image: url(:/images/closepressed.png)
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="toolBarFrameHLayout">
<property name="leftMargin">
<number>2</number>
</property>
@ -521,7 +521,7 @@ border-image: url(:/images/closepressed.png)
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="HL_pluginButtonFrame">
<layout class="QHBoxLayout" name="pluginButtonFrameHLayout">
<property name="leftMargin">
<number>2</number>
</property>
@ -538,7 +538,39 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item>
<spacer>
<widget class="QToolButton" name="notifyButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/chat_red24.png</normaloff>:/images/chat_red24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="toolBarHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -571,12 +603,12 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="vl_Plugins"/>
<layout class="QVBoxLayout" name="pluginsVLayout"/>
</item>
</layout>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="hTitleLayout">
<layout class="QHBoxLayout" name="titleBarMainHLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
@ -600,7 +632,7 @@ border-image: url(:/images/closepressed.png)
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="hlTitleBarFrame">
<layout class="QHBoxLayout" name="titleBarFrameHLayout">
<property name="leftMargin">
<number>2</number>
</property>
@ -670,7 +702,7 @@ border-image: url(:/images/closepressed.png)
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<spacer name="titleBarHSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -690,7 +722,7 @@ border-image: url(:/images/closepressed.png)
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="HL_pluginTitleFrame">
<layout class="QHBoxLayout" name="pluginTitleFrameHLayout">
<property name="leftMargin">
<number>2</number>
</property>
@ -707,14 +739,14 @@ border-image: url(:/images/closepressed.png)
</widget>
</item>
<item>
<widget class="QFrame" name="searchframe">
<widget class="QFrame" name="searchFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="searchFrameGLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -771,38 +803,6 @@ border-image: url(:/images/closepressed.png)
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QToolButton" name="notifyButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/chat_red24.png</normaloff>:/images/chat_red24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QToolButton" name="searchAfter">
<property name="minimumSize">
@ -1099,8 +1099,8 @@ border-image: url(:/images/closepressed.png)
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>
<include location="../emojione.qrc"/>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>