Skip to content
Snippets Groups Projects
Commit fd0d7c0a authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

fix regression introduced by 37ccc1c3

Change-Id: I392b63a202673aa41b473e2a7073f7bdfc025211
parent 37ccc1c3
Branches
Tags
No related merge requests found
...@@ -170,8 +170,11 @@ CallWidget::CallWidget(QWidget* parent) : ...@@ -170,8 +170,11 @@ CallWidget::CallWidget(QWidget* parent) :
this, &CallWidget::on_sendContactRequestButton_clicked); this, &CallWidget::on_sendContactRequestButton_clicked);
// connect conversation filter buttons to act as radio buttons // connect conversation filter buttons to act as radio buttons
connect(ui->buttonInvites, &ConversationFilterButton::clicked, ui->buttonConversations, &ConversationFilterButton::setUnselected); connect(ui->buttonInvites, &ConversationFilterButton::clicked,
connect(ui->buttonConversations, &ConversationFilterButton::clicked, ui->buttonInvites, &ConversationFilterButton::setUnselected); ui->buttonConversations, &ConversationFilterButton::setUnselected);
connect(ui->buttonConversations, &ConversationFilterButton::clicked,
ui->buttonInvites, &ConversationFilterButton::setUnselected);
connect(ui->currentAccountComboBox, QOverload<int>::of(&CurrentAccountComboBox::currentIndexChanged), connect(ui->currentAccountComboBox, QOverload<int>::of(&CurrentAccountComboBox::currentIndexChanged),
[this] { [this] {
...@@ -610,8 +613,8 @@ void CallWidget::slotShowIncomingCallView(const std::string& accountId, ...@@ -610,8 +613,8 @@ void CallWidget::slotShowIncomingCallView(const std::string& accountId,
} }
ui->videoWidget->pushRenderer(convInfo.callId); ui->videoWidget->pushRenderer(convInfo.callId);
// TODO:(new lrc) in call chat
//ui->instantMessagingWidget->setMediaText(actualCall_); ui->instantMessagingWidget->setupCallMessaging(convInfo.callId, messageModel_.get());
disconnect(selectedCallChanged_); disconnect(selectedCallChanged_);
selectedCallChanged_ = connect( selectedCallChanged_ = connect(
......
...@@ -93,13 +93,16 @@ ...@@ -93,13 +93,16 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0"> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum> <enum>QLayout::SetDefaultConstraint</enum>
</property> </property>
<property name="topMargin">
<number>4</number>
</property>
<item> <item>
<widget class="CurrentAccountComboBox" name="currentAccountComboBox" native="true"> <widget class="CurrentAccountComboBox" name="currentAccountComboBox" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
...@@ -240,7 +243,7 @@ ...@@ -240,7 +243,7 @@
</item> </item>
<item> <item>
<widget class="QWidget" name="smartListWidget" native="true"> <widget class="QWidget" name="smartListWidget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="0,0,0"> <layout class="QVBoxLayout" name="verticalLayout_5" stretch="0,0">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
...@@ -256,22 +259,6 @@ ...@@ -256,22 +259,6 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>1</number> <number>1</number>
</property> </property>
<item>
<widget class="QWidget" name="missingButtonsDummyWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</widget>
</item>
<item> <item>
<widget class="ConversationsFilterWidget" name="conversationsFilterWidget" native="true"> <widget class="ConversationsFilterWidget" name="conversationsFilterWidget" native="true">
<layout class="QHBoxLayout" name="conversationFilterLayout"> <layout class="QHBoxLayout" name="conversationFilterLayout">
...@@ -288,14 +275,14 @@ ...@@ -288,14 +275,14 @@
<number>10</number> <number>10</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>10</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="ConversationFilterButton" name="buttonConversations"> <widget class="ConversationFilterButton" name="buttonConversations" native="true">
<property name="toolTip"> <property name="toolTip">
<string>Show conversations</string> <string>Show conversations</string>
</property> </property>
<property name="text"> <property name="text" stdset="0">
<string>Conversations</string> <string>Conversations</string>
</property> </property>
</widget> </widget>
...@@ -314,34 +301,12 @@ ...@@ -314,34 +301,12 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="SmartListView" name="smartList"> <layout class="QVBoxLayout" name="verticalLayout_13">
<property name="autoScrollMargin"> <property name="spacing">
<number>16</number>
</property>
<property name="indentation">
<number>0</number> <number>0</number>
</property> </property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="itemsExpandable">
<bool>false</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_13">
<property name="topMargin"> <property name="topMargin">
<number>6</number> <number>10</number>
</property> </property>
<item> <item>
<widget class="SmartListView" name="smartList"> <widget class="SmartListView" name="smartList">
...@@ -368,6 +333,9 @@ ...@@ -368,6 +333,9 @@
</layout> </layout>
</item> </item>
</layout> </layout>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
...@@ -2074,6 +2042,11 @@ ...@@ -2074,6 +2042,11 @@
<extends>QWidget</extends> <extends>QWidget</extends>
<header>currentaccountcombobox.h</header> <header>currentaccountcombobox.h</header>
</customwidget> </customwidget>
<customwidget>
<class>ConversationFilterButton</class>
<extends>QWidget</extends>
<header>conversationfilterbutton.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="ressources.qrc"/> <include location="ressources.qrc"/>
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#undef REGISTERED #undef REGISTERED
CurrentAccountComboBox::CurrentAccountComboBox(QWidget* parent) CurrentAccountComboBox::CurrentAccountComboBox(QWidget* parent)
{ {
Q_UNUSED(parent); Q_UNUSED(parent);
...@@ -75,9 +74,10 @@ CurrentAccountComboBox::paintEvent(QPaintEvent* e) ...@@ -75,9 +74,10 @@ CurrentAccountComboBox::paintEvent(QPaintEvent* e)
{ {
Q_UNUSED(e); Q_UNUSED(e);
gearPoint_.setX(this->width() - gearSize_ - 2 * gearBorder_); gearPoint_.setX(this->width() - gearSize_ - 4 * gearBorder_);
gearPoint_.setY(this->height() / 2 - gearLabel_.height() / 2 - gearBorder_); gearPoint_.setY(this->height() / 2 - gearLabel_.height() / 2 - 2 * gearBorder_);
gearLabel_.setGeometry(gearPoint_.x() - 3, gearPoint_.y(), gearSize_ + 2 * gearBorder_, gearSize_ + 2 * gearBorder_); gearLabel_.setGeometry(gearPoint_.x() - 3, gearPoint_.y(),
gearSize_ + 2 * gearBorder_, gearSize_ + 2 * gearBorder_);
gearLabel_.setMargin(gearBorder_); gearLabel_.setMargin(gearBorder_);
QPoint p(12, 2); QPoint p(12, 2);
...@@ -123,11 +123,13 @@ CurrentAccountComboBox::paintEvent(QPaintEvent* e) ...@@ -123,11 +123,13 @@ CurrentAccountComboBox::paintEvent(QPaintEvent* e)
// write primary and secondary account identifiers to combobox label // write primary and secondary account identifiers to combobox label
QString primaryAccountID = QString::fromStdString(Utils::bestNameForAccount(LRCInstance::getCurrentAccountInfo())); QString primaryAccountID = QString::fromStdString(Utils::bestNameForAccount(LRCInstance::getCurrentAccountInfo()));
painter.setPen(Qt::black); painter.setPen(Qt::black);
primaryAccountID = fontMetricPrimary.elidedText(primaryAccountID, Qt::ElideRight, comboBoxRect.width() - elidConst - gearSize_*!popupPresent); primaryAccountID = fontMetricPrimary.elidedText(primaryAccountID, Qt::ElideRight,
comboBoxRect.width() - elidConst - (popupPresent ? 0 : 2 * gearSize_));
painter.drawText(comboBoxRect, Qt::AlignLeft, primaryAccountID); painter.drawText(comboBoxRect, Qt::AlignLeft, primaryAccountID);
QString secondaryAccountID = QString::fromStdString(Utils::secondBestNameForAccount(LRCInstance::getCurrentAccountInfo())); QString secondaryAccountID = QString::fromStdString(Utils::secondBestNameForAccount(LRCInstance::getCurrentAccountInfo()));
secondaryAccountID = fontMetricSecondary.elidedText(secondaryAccountID, Qt::ElideRight, comboBoxRect.width() - elidConst - 2 - gearSize_ *!popupPresent); // [screen awareness] secondaryAccountID = fontMetricSecondary.elidedText(secondaryAccountID, Qt::ElideRight,
comboBoxRect.width() - elidConst - 2 - (popupPresent ? 0 : 2 * gearSize_)); // [screen awareness]
if (secondaryAccountID.length()) { // if secondary accound id exists if (secondaryAccountID.length()) { // if secondary accound id exists
painter.setFont(fontSecondary); painter.setFont(fontSecondary);
...@@ -135,12 +137,8 @@ CurrentAccountComboBox::paintEvent(QPaintEvent* e) ...@@ -135,12 +137,8 @@ CurrentAccountComboBox::paintEvent(QPaintEvent* e)
painter.drawText(comboBoxRect, (Qt::AlignBottom | Qt::AlignLeft), secondaryAccountID); painter.drawText(comboBoxRect, (Qt::AlignBottom | Qt::AlignLeft), secondaryAccountID);
} }
if (LRCInstance::accountModel().getAccountList().size() <= 1) { this->setEnabled(LRCInstance::accountModel().getAccountList().size() > 1);
this->setDisabled(true);
}
else {
this->setEnabled(true);
}
gearLabel_.setPixmap(gearPixmap_); gearLabel_.setPixmap(gearPixmap_);
} }
...@@ -172,8 +170,7 @@ CurrentAccountComboBox::mousePressEvent(QMouseEvent* mouseEvent) ...@@ -172,8 +170,7 @@ CurrentAccountComboBox::mousePressEvent(QMouseEvent* mouseEvent)
{ {
if (!gearLabel_.frameGeometry().contains(mouseEvent->localPos().toPoint())) { if (!gearLabel_.frameGeometry().contains(mouseEvent->localPos().toPoint())) {
QComboBox::mousePressEvent(mouseEvent); QComboBox::mousePressEvent(mouseEvent);
} } else {
else {
emit settingsButtonClicked(); emit settingsButtonClicked();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment