diff --git a/src/callwidget.cpp b/src/callwidget.cpp index 8bfc450e268efa190a6459d71c970d8049ad2d5a..e5c7a97623dbc988536977302d1d3dd6cf594547 100644 --- a/src/callwidget.cpp +++ b/src/callwidget.cpp @@ -103,6 +103,8 @@ CallWidget::CallWidget(QWidget* parent) : if (settings.contains(SettingsKey::mainSplitterState)) { auto splitterStates = settings.value(SettingsKey::mainSplitterState).toByteArray(); ui->mainActivitySplitter->restoreState(splitterStates); + splitterStates = settings.value(SettingsKey::smartListToWebviewSplitterState).toByteArray(); + ui->splitter->restoreState(splitterStates); } ui->mainActivitySplitter->setCollapsible(0, false); @@ -139,6 +141,14 @@ CallWidget::CallWidget(QWidget* parent) : settings.setValue(SettingsKey::mainSplitterState, ui->mainActivitySplitter->saveState()); }); + connect(ui->splitter, &QSplitter::splitterMoved, + [this](int pos, int index) { + Q_UNUSED(index); + Q_UNUSED(pos); + QSettings settings("jami.net", "Jami"); + settings.setValue(SettingsKey::smartListToWebviewSplitterState, ui->splitter->saveState()); + }); + connect(ui->btnConversations, &QPushButton::clicked, this, &CallWidget::conversationsButtonClicked); @@ -243,6 +253,9 @@ CallWidget::CallWidget(QWidget* parent) : setVisible(false); ui->sipCallerBestIdLabel->setVisible(false); + + // set collapsible + ui->splitter->setCollapsible(ui->splitter->indexOf(ui->stackedWidget), false); } CallWidget::~CallWidget() @@ -290,12 +303,6 @@ CallWidget::navigated(bool to) void CallWidget::updateCustomUI() { - auto scalingRatio = Utils::getCurrentScalingRatio(); - if (scalingRatio > 1.0) { - ui->messageView->setZoomFactor(1.15); - } else { - ui->messageView->setZoomFactor(1.0); - } } void diff --git a/src/callwidget.ui b/src/callwidget.ui index 7d39e03f0ae17097d454b78a1c7330735df33ffb..e06d3aae1312caf74cf3dc49fa2e4b9d02520d98 100644 --- a/src/callwidget.ui +++ b/src/callwidget.ui @@ -6,12 +6,12 @@ <rect> <x>0</x> <y>0</y> - <width>1091</width> - <height>665</height> + <width>868</width> + <height>561</height> </rect> </property> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -19,7 +19,7 @@ <property name="windowTitle"> <string/> </property> - <layout class="QHBoxLayout" name="horizontalLayout_6"> + <layout class="QVBoxLayout" name="verticalLayout_11"> <property name="spacing"> <number>0</number> </property> @@ -45,20 +45,20 @@ </property> <widget class="QWidget" name="sidePanelLayoutWidget" native="true"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>380</width> + <width>0</width> <height>0</height> </size> </property> <property name="maximumSize"> <size> - <width>16777215</width> + <width>502</width> <height>16777215</height> </size> </property> @@ -441,14 +441,14 @@ </widget> <widget class="QStackedWidget" name="stackedWidget"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>580</width> + <width>0</width> <height>0</height> </size> </property> @@ -460,12 +460,12 @@ </property> <widget class="QWidget" name="welcomePage"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <layout class="QVBoxLayout" name="verticalLayout_16"> + <layout class="QVBoxLayout" name="verticalLayout_10"> <property name="spacing"> <number>0</number> </property> @@ -481,512 +481,543 @@ <property name="bottomMargin"> <number>0</number> </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_9"> - <property name="spacing"> - <number>0</number> - </property> - <property name="topMargin"> - <number>7</number> - </property> - <property name="rightMargin"> - <number>7</number> - </property> - <item> - <spacer name="horizontalSpacer_11"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>40</height> + <height>13</height> </size> </property> </spacer> </item> <item> - <widget class="QLabel" name="ringLogo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>100</width> - <height>100</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>100</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="scaledContents"> - <bool>false</bool> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <layout class="QGridLayout" name="gridLayout_3"> - <property name="leftMargin"> - <number>10</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>10</number> - </property> - <property name="spacing"> - <number>0</number> - </property> - <item row="0" column="0"> - <widget class="QLabel" name="descLabel"> + <layout class="QVBoxLayout" name="verticalLayout_9"> + <item> + <widget class="QLabel" name="ringLogo"> <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>400</width> - <height>0</height> + <width>0</width> + <height>100</height> </size> </property> <property name="maximumSize"> <size> - <width>400</width> + <width>16777215</width> <height>16777215</height> </size> </property> - <property name="baseSize"> - <size> - <width>400</width> - <height>0</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>11</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> <property name="text"> - <string>Jami is free software for universal communication which respects the freedoms and privacy of its users.</string> + <string/> </property> - <property name="textFormat"> - <enum>Qt::PlainText</enum> + <property name="scaledContents"> + <bool>false</bool> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="thisIsYourLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <underline>false</underline> - <strikeout>false</strikeout> - <kerning>true</kerning> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color: #aeaeae</string> - </property> - <property name="text"> - <string> - This is your ID. -Copy and share it with your friends! - </string> - </property> - <property name="textFormat"> - <enum>Qt::PlainText</enum> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <property name="topMargin"> - <number>0</number> - </property> - <item> - <spacer name="horizontalSpacer_8"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="IdLabel" name="ringIdLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="lineWidth"> - <number>0</number> - </property> - <property name="text"> - <string notr="true">id</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="margin"> - <number>5</number> - </property> - <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> + <bool>false</bool> </property> </widget> </item> <item> - <spacer name="horizontalSpacer_10"> + <spacer name="verticalSpacer_14"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Vertical</enum> </property> <property name="sizeType"> <enum>QSizePolicy::Fixed</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>5</width> - <height>20</height> + <width>20</width> + <height>13</height> </size> </property> </spacer> </item> <item> - <widget class="QToolButton" name="qrButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>30</height> - </size> + <layout class="QGridLayout" name="gridLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> </property> - <property name="toolTip"> - <string>Show ring ID QR code</string> - </property> - <property name="text"> - <string/> + <property name="leftMargin"> + <number>10</number> </property> - <property name="icon"> - <iconset resource="../ressources.qrc"> - <normaloff>:/images/qrcode.png</normaloff>:/images/qrcode.png</iconset> + <property name="topMargin"> + <number>5</number> </property> - <property name="iconSize"> - <size> - <width>18</width> - <height>18</height> - </size> + <property name="rightMargin"> + <number>10</number> </property> - <property name="checkable"> - <bool>true</bool> + <property name="bottomMargin"> + <number>5</number> </property> - </widget> + <item row="0" column="0"> + <widget class="QLabel" name="descLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>100</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>400</width> + <height>16777215</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>400</width> + <height>0</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>11</pointsize> + <weight>50</weight> + <bold>false</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Jami is free software for universal communication which respects the freedoms and privacy of its users.</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> </item> <item> - <spacer name="horizontalSpacer_12"> + <spacer name="verticalSpacer_15"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Vertical</enum> </property> <property name="sizeType"> <enum>QSizePolicy::Fixed</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>5</width> - <height>20</height> + <width>20</width> + <height>5</height> </size> </property> </spacer> </item> <item> - <widget class="QToolButton" name="shareButton"> - <property name="minimumSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>30</height> - </size> - </property> - <property name="toolTip"> - <string>Share ring ID button</string> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="../ressources.qrc"> - <normaloff>:/images/icons/ic_share_black_48dp_2x.png</normaloff>:/images/icons/ic_share_black_48dp_2x.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>18</width> - <height>18</height> - </size> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_9"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <property name="spacing"> + <number>0</number> </property> - </spacer> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="copyLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>50</width> - <height>0</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color: #aeaeae</string> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="text"> - <string>Double-click to copy</string> - </property> - <property name="textFormat"> - <enum>Qt::PlainText</enum> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="wordWrap"> - <bool>false</bool> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_4"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>10</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="qrLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">color: #aeaeae</string> - </property> - <property name="text"> - <string>Error while generating QR Code</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_11"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>5</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_7"> - <property name="spacing"> - <number>0</number> - </property> + <item> + <widget class="QLabel" name="thisIsYourLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>50</height> + </size> + </property> + <property name="font"> + <font> + <underline>false</underline> + <strikeout>false</strikeout> + <kerning>true</kerning> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: #aeaeae</string> + </property> + <property name="text"> + <string>This is your ID. +Copy and share it with your friends!</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <property name="topMargin"> + <number>0</number> + </property> + <item> + <spacer name="horizontalSpacer_8"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="IdLabel" name="ringIdLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>14</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="lineWidth"> + <number>0</number> + </property> + <property name="text"> + <string notr="true">id</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="margin"> + <number>5</number> + </property> + <property name="textInteractionFlags"> + <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_10"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>5</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="qrButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="toolTip"> + <string>Show ring ID QR code</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../ressources.qrc"> + <normaloff>:/images/qrcode.png</normaloff>:/images/qrcode.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>18</width> + <height>18</height> + </size> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_12"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>5</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="shareButton"> + <property name="minimumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="toolTip"> + <string>Share ring ID button</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../ressources.qrc"> + <normaloff>:/images/icons/ic_share_black_48dp_2x.png</normaloff>:/images/icons/ic_share_black_48dp_2x.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>18</width> + <height>18</height> + </size> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_9"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="copyLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>50</width> + <height>0</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>8</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: #aeaeae</string> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="text"> + <string>Double-click to copy</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> <item> - <spacer name="horizontalSpacer_3"> + <spacer name="verticalSpacer_4"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>40</width> - <height>20</height> + <width>20</width> + <height>5</height> </size> </property> </spacer> </item> <item> - <widget class="QPushButton" name="changelogButton"> + <widget class="QLabel" name="qrLabel"> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> - <size> - <width>100</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>30</height> - </size> + <property name="styleSheet"> + <string notr="true">color: #aeaeae</string> </property> <property name="text"> - <string>About</string> + <string>Error while generating QR Code</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> </property> </widget> </item> <item> - <spacer name="horizontalSpacer_4"> + <spacer name="verticalSpacer_11"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>40</width> - <height>20</height> + <width>20</width> + <height>5</height> </size> </property> </spacer> </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="changelogButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>100</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>100</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string>About</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> </layout> </item> <item> @@ -995,12 +1026,12 @@ Copy and share it with your friends! <enum>Qt::Vertical</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::MinimumExpanding</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>20</width> - <height>20</height> + <width>17</width> + <height>17</height> </size> </property> </spacer> @@ -1009,7 +1040,7 @@ Copy and share it with your friends! </widget> <widget class="QWidget" name="mainActivityWidget"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -1033,7 +1064,7 @@ Copy and share it with your friends! <item row="0" column="0"> <widget class="QSplitter" name="mainActivitySplitter"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -1049,17 +1080,17 @@ Copy and share it with your friends! </property> <widget class="QStackedWidget" name="callStackWidget"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="currentIndex"> - <number>0</number> + <number>2</number> </property> <widget class="QWidget" name="videoPage"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -1087,12 +1118,15 @@ Copy and share it with your friends! </widget> <widget class="QWidget" name="outgoingCallPage"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <layout class="QGridLayout" name="gridLayout_7"> + <layout class="QVBoxLayout" name="verticalLayout_16"> + <property name="spacing"> + <number>0</number> + </property> <property name="leftMargin"> <number>0</number> </property> @@ -1105,662 +1139,726 @@ Copy and share it with your friends! <property name="bottomMargin"> <number>0</number> </property> - <property name="spacing"> - <number>0</number> - </property> - <item row="0" column="0"> - <widget class="QWidget" name="outgoingCall" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>244</width> - <height>420</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>244</width> - <height>16777215</height> - </size> + <item> + <spacer name="verticalSpacer_20"> + <property name="orientation"> + <enum>Qt::Vertical</enum> </property> - <property name="baseSize"> + <property name="sizeHint" stdset="0"> <size> - <width>0</width> - <height>0</height> + <width>20</width> + <height>10</height> </size> </property> - <layout class="QVBoxLayout" name="spinnerLayout_3"> - <property name="spacing"> - <number>10</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="callingPhoto"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>166</width> - <height>166</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>166</width> - <height>166</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>166</width> - <height>166</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="callingBestNameLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="font"> - <font> - <family>Segoe UI Emoji</family> - <pointsize>10</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(128, 128, 128);</string> - </property> - <property name="text"> - <string>best name</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="callingBestIdLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(174, 174, 174);</string> - </property> - <property name="text"> - <string>best Id</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_9"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>10</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="spinnerLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="callingStatusLabel"> - <property name="font"> - <font> - <pointsize>8</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(174, 174, 174);</string> - </property> - <property name="text"> - <string> Incoming...</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_10"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>10</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <property name="spacing"> - <number>20</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QPushButton" name="cancelButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>56</width> - <height>56</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>56</width> - <height>56</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>56</width> - <height>56</height> - </size> - </property> - <property name="toolTip"> - <string>Cancel outgoing call</string> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="icon"> - <iconset resource="../ressources.qrc"> - <normaloff>:/images/icons/ic_close_white_24dp.png</normaloff>:/images/icons/ic_close_white_24dp.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>24</width> - <height>24</height> - </size> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="cancelCallLabel"> - <property name="styleSheet"> - <string notr="true">color: rgb(174, 174, 174);</string> - </property> - <property name="text"> - <string>Cancel</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_15"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="callingPhoto"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>133</width> + <height>133</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>133</width> + <height>133</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>166</width> + <height>166</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_19"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>30</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QLabel" name="callingBestNameLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="font"> + <font> + <family>Segoe UI Emoji</family> + <pointsize>10</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(128, 128, 128);</string> + </property> + <property name="text"> + <string>best name</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_9"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>17</width> + <height>5</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="callingBestIdLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <pointsize>8</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(174, 174, 174);</string> + </property> + <property name="text"> + <string>best Id</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_10"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>5</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="spinnerLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_18"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>5</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="callingStatusLabel"> + <property name="font"> + <font> + <pointsize>8</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(174, 174, 174);</string> + </property> + <property name="text"> + <string> Incoming...</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_22"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>10</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <property name="spacing"> + <number>5</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QPushButton" name="cancelButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>56</width> + <height>56</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>56</width> + <height>56</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>56</width> + <height>56</height> + </size> + </property> + <property name="toolTip"> + <string>Cancel outgoing call</string> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="icon"> + <iconset resource="../ressources.qrc"> + <normaloff>:/images/icons/ic_close_white_24dp.png</normaloff>:/images/icons/ic_close_white_24dp.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="cancelCallLabel"> + <property name="styleSheet"> + <string notr="true">color: rgb(174, 174, 174);</string> + </property> + <property name="text"> + <string>Cancel</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_21"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>10</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <widget class="QWidget" name="incomingCallPage"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QVBoxLayout" name="verticalLayout_18"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <spacer name="verticalSpacer_16"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>10</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_14"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="callerPhoto"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>133</width> + <height>133</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>133</width> + <height>133</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>166</width> + <height>166</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>179</width> + <height>13</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="callerBestNameLabel"> + <property name="font"> + <font> + <family>Segoe UI Emoji</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(128, 128, 128);</string> + </property> + <property name="text"> + <string>best name</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_13"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>179</width> + <height>13</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="sipCallerBestIdLabel"> + <property name="font"> + <font> + <family>Segoe UI Emoji</family> + <pointsize>9</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(128, 128, 128);</string> + </property> + <property name="text"> + <string>best id</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_12"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>179</width> + <height>13</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="wantToTalkLabel"> + <property name="styleSheet"> + <string notr="true">color: rgb(174, 174, 174);</string> + </property> + <property name="text"> + <string>Wants to talk to you!</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_5"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>179</width> + <height>35</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <item> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="spacing"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QPushButton" name="acceptButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>56</width> + <height>56</height> + </size> + </property> + <property name="toolTip"> + <string>Answer incoming call button</string> + </property> + <property name="icon"> + <iconset resource="../ressources.qrc"> + <normaloff>:/images/icons/ic_done_white_24dp.png</normaloff>:/images/icons/ic_done_white_24dp.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="acceptLabel"> + <property name="styleSheet"> + <string notr="true">color: rgb(174, 174, 174);</string> + </property> + <property name="text"> + <string>Answer</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="horizontalSpacer_21"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <property name="spacing"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QPushButton" name="refuseButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>56</width> + <height>56</height> + </size> + </property> + <property name="toolTip"> + <string>Ignore incoming call button</string> + </property> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="icon"> + <iconset resource="../ressources.qrc"> + <normaloff>:/images/icons/ic_close_white_24dp.png</normaloff>:/images/icons/ic_close_white_24dp.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="refuseLabel"> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(174, 174, 174);</string> + </property> + <property name="text"> + <string>Ignore</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + </layout> </item> - </layout> - </widget> - <widget class="QWidget" name="incomingCallPage"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <layout class="QGridLayout" name="gridLayout_8"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <property name="spacing"> - <number>0</number> - </property> - <item row="0" column="0"> - <widget class="QWidget" name="callInvite" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>200</width> - <height>420</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>200</width> - <height>420</height> - </size> + <item> + <spacer name="verticalSpacer_17"> + <property name="orientation"> + <enum>Qt::Vertical</enum> </property> - <property name="baseSize"> + <property name="sizeHint" stdset="0"> <size> - <width>200</width> - <height>420</height> + <width>20</width> + <height>10</height> </size> </property> - <layout class="QVBoxLayout" name="callInviteLayout" stretch="0,2,1,0,0,0,2,1,9"> - <property name="spacing"> - <number>0</number> - </property> - <item> - <widget class="QLabel" name="callerPhoto"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>166</width> - <height>166</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>166</width> - <height>166</height> - </size> - </property> - <property name="baseSize"> - <size> - <width>166</width> - <height>166</height> - </size> - </property> - <property name="text"> - <string/> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item alignment="Qt::AlignHCenter"> - <widget class="QLabel" name="callerBestNameLabel"> - <property name="font"> - <font> - <family>Segoe UI Emoji</family> - <pointsize>12</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(128, 128, 128);</string> - </property> - <property name="text"> - <string>best name</string> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_13"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>5</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="sipCallerBestIdLabel"> - <property name="font"> - <font> - <family>Segoe UI Emoji</family> - <pointsize>9</pointsize> - </font> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(128, 128, 128);</string> - </property> - <property name="text"> - <string>best id</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_12"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>5</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="wantToTalkLabel"> - <property name="styleSheet"> - <string notr="true">color: rgb(174, 174, 174);</string> - </property> - <property name="text"> - <string>Wants to talk to you!</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_5"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>50</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_3" stretch="2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <item> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="spacing"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QPushButton" name="acceptButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>56</width> - <height>56</height> - </size> - </property> - <property name="toolTip"> - <string>Answer incoming call button</string> - </property> - <property name="icon"> - <iconset resource="../ressources.qrc"> - <normaloff>:/images/icons/ic_done_white_24dp.png</normaloff>:/images/icons/ic_done_white_24dp.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>24</width> - <height>24</height> - </size> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="acceptLabel"> - <property name="styleSheet"> - <string notr="true">color: rgb(174, 174, 174);</string> - </property> - <property name="text"> - <string>Answer</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - <item> - <spacer name="horizontalSpacer_21"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_7"> - <property name="spacing"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <item> - <widget class="QPushButton" name="refuseButton"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>56</width> - <height>56</height> - </size> - </property> - <property name="toolTip"> - <string>Ignore incoming call button</string> - </property> - <property name="layoutDirection"> - <enum>Qt::RightToLeft</enum> - </property> - <property name="icon"> - <iconset resource="../ressources.qrc"> - <normaloff>:/images/icons/ic_close_white_24dp.png</normaloff>:/images/icons/ic_close_white_24dp.png</iconset> - </property> - <property name="iconSize"> - <size> - <width>24</width> - <height>24</height> - </size> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="refuseLabel"> - <property name="layoutDirection"> - <enum>Qt::RightToLeft</enum> - </property> - <property name="styleSheet"> - <string notr="true">color: rgb(174, 174, 174);</string> - </property> - <property name="text"> - <string>Ignore</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </widget> + </spacer> </item> </layout> </widget> @@ -1770,14 +1868,14 @@ Copy and share it with your friends! <bool>true</bool> </property> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>460</width> + <width>0</width> <height>0</height> </size> </property> @@ -1809,7 +1907,7 @@ Copy and share it with your friends! <item> <widget class="QWidget" name="messagingHeaderWidget" native="true"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -1883,6 +1981,22 @@ Copy and share it with your friends! </property> </widget> </item> + <item> + <spacer name="horizontalSpacer_15"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>10</width> + <height>20</height> + </size> + </property> + </spacer> + </item> <item> <layout class="QVBoxLayout" name="verticalLayout_17"> <property name="spacing"> @@ -1897,14 +2011,14 @@ Copy and share it with your friends! <item> <widget class="QLabel" name="imNameLabel"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>200</width> + <width>0</width> <height>0</height> </size> </property> @@ -1938,14 +2052,14 @@ Copy and share it with your friends! <item> <widget class="QLabel" name="imIdLabel"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>200</width> + <width>0</width> <height>0</height> </size> </property> @@ -1992,7 +2106,7 @@ Copy and share it with your friends! <enum>Qt::Horizontal</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Preferred</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -2141,7 +2255,7 @@ Copy and share it with your friends! <item> <widget class="MessageWebView" name="messageView" native="true"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> diff --git a/src/mainapplication.cpp b/src/mainapplication.cpp index 3162fb0b0b1a121c0bd39c1d0ae7febf90a9d8d3..34683ec03569667fe2a294213802ec8f11b73656 100644 --- a/src/mainapplication.cpp +++ b/src/mainapplication.cpp @@ -51,6 +51,9 @@ MainApplication::applicationInitialization() QApplication::setOrganizationDomain("jami.net"); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor); +#endif } void diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f5da61097cafd64e204fa8497516a71259e52e08..b53ac7c3aedff4039c69dcde30562a16097d1175 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -49,6 +49,8 @@ MainWindow::MainWindow(QWidget* parent) setWindowTitle(isBeta ? "Jami (Beta)" : "Jami"); + installEventFilter(this); + for (int i = 0; i < ui->navStack->count(); ++i) { if (auto navWidget = dynamic_cast<NavWidget*>(ui->navStack->widget(i))) { connect(navWidget, &NavWidget::NavigationRequested, @@ -275,6 +277,11 @@ void MainWindow::showWindow() activateWindow(); } raise(); +#if defined(Q_OS_WIN) + disconnect(screenChangedConnection_); + screenChangedConnection_ = connect(windowHandle(), &QWindow::screenChanged, + this, &MainWindow::slotScreenChanged); +#endif } void @@ -359,14 +366,6 @@ void MainWindow::readSettingsFromRegistry() void MainWindow::setWindowSize(ScreenEnum scr, bool firstUse) { auto accountList = LRCInstance::accountModel().getAccountList(); - if (scr == ScreenEnum::WizardScreen && !accountList.size()) { - hide(); - setFixedSize(wizardDialogWidth, wizardDialogHeight); - } else { - setMinimumSize(mainWindowMinWidth, mainWindowMinHeight); - setMaximumSize(QtMaxDimension, QtMaxDimension); - } - if (firstUse || !accountList.size()) { auto screenNumber = qApp->desktop()->screenNumber(); if (scr == ScreenEnum::WizardScreen) { @@ -388,30 +387,36 @@ void MainWindow::setWindowSize(ScreenEnum scr, bool firstUse) } } -void MainWindow::show() -{ - QMainWindow::show(); -#if defined(Q_OS_WIN) - disconnect(screenChangedConnection_); - screenChangedConnection_ = connect(windowHandle(), &QWindow::screenChanged, - this, &MainWindow::slotScreenChanged); -#endif -} - void MainWindow::slotScreenChanged(QScreen* screen) { Utils::setCurrentScalingRatio(screen->logicalDotsPerInchX() / 96); qobject_cast<NavWidget*>(ui->navStack->currentWidget())->updateCustomUI(); - adjustSize(); - updateGeometry(); + if (Utils::getCurrentScalingRatio() > 1.0) { + isScreenChanged_ = true; + } } void MainWindow::resizeEvent(QResizeEvent* event) { - Q_UNUSED(event); + Q_UNUSED(event) qobject_cast<NavWidget*>(ui->navStack->currentWidget())->updateCustomUI(); } +bool MainWindow::eventFilter(QObject* watched, QEvent* event) +{ + Q_UNUSED(watched) + if (event->type() == QEvent::NonClientAreaMouseButtonRelease) { + if (isScreenChanged_) { + if (!ui->callwidget->isVisible()) + resize(minimumSize()); + else + adjustSize(); + isScreenChanged_ = false; + } + } + return false; +} + void MainWindow::keyReleaseEvent(QKeyEvent* ke) { emit keyReleased(ke); diff --git a/src/mainwindow.h b/src/mainwindow.h index cd019c74dddbd1d6c388609cd963e38f07963036..bad0de6af4c233047640e20e0ece7ce8e356fc4e 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -31,12 +31,6 @@ static constexpr char IDM_ABOUTBOX = 0x0010; static constexpr char IDM_SHORTCUTSBOX = 0x0011; -static constexpr uint32_t QtMaxDimension = 16777215; -static constexpr uint32_t mainWindowMinWidth = 1088; -static constexpr uint32_t mainWindowMinHeight = 638; -static constexpr uint32_t wizardDialogWidth = 512; -static constexpr uint32_t wizardDialogHeight = 638; - namespace Ui { class MainWindow; } @@ -51,7 +45,6 @@ public: return *instance; } bool init(); - void show(); void showWindow(); void darken(); void lighten(); @@ -59,6 +52,7 @@ public: protected: bool nativeEvent(const QByteArray& eventType, void* message, long* result) override; void closeEvent(QCloseEvent* event) override; + bool eventFilter(QObject* watched, QEvent* event); void resizeEvent(QResizeEvent *event) override; void keyReleaseEvent(QKeyEvent* ke) override; void changeEvent(QEvent* e) override; @@ -91,6 +85,8 @@ private: void readSettingsFromRegistry(); + bool isScreenChanged_{ false }; + QAction* settingsAction_; QAction* exitAction_; QAction* keyboardShortcutsAction_; diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 1977d60a86d0eae791330fabfbfa430e778137e6..168156b0d5e0eb2a94d4aba285ff42c38581b66f 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -440,7 +440,7 @@ </property> <widget class="QWidget" name="centralWidget"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -467,7 +467,7 @@ <widget class="CallWidget" name="callwidget"/> <widget class="SettingsWidget" name="settingswidget"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> diff --git a/src/settingskey.h b/src/settingskey.h index 57944a0d69ee7b4ecd7f84a8dfc59a32c676b6d2..8dcd66a4256801ee0b4c198396877dcd8ca853c8 100644 --- a/src/settingskey.h +++ b/src/settingskey.h @@ -26,6 +26,7 @@ constexpr static char enableNotifications[] = "enableNotifications"; constexpr static char geometry[] = "geometry"; constexpr static char selectedAccount[] = "selectedAccount"; constexpr static char mainSplitterState[] = "mainSplitterState"; +constexpr static char smartListToWebviewSplitterState[] = "smartListToWebviewSplitterState"; constexpr static char windowState[] = "windowState"; constexpr static char autoUpdate[] = "autoUpdate"; constexpr static char neverShowMeAgain[] = "neverShowMeAgain";