diff --git a/callwidget.cpp b/callwidget.cpp index b6ced4d0dca8857601a4683d5e2798856d8976cc..3275b1b29c625e16e4abbd2d36ae6cfdc826bfd3 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -261,7 +261,8 @@ CallWidget::navigated(bool to) } } -void CallWidget::updateCustomUI() +void +CallWidget::updateCustomUI() { auto scalingRatio = MainWindow::instance().getCurrentScalingRatio(); if (scalingRatio > 1.0) { diff --git a/callwidget.ui b/callwidget.ui index 28609769362c8fe0517662e9396cde5d2f268b29..44d2dbb4db048b6d41fa82e4384d0d2698097b77 100644 --- a/callwidget.ui +++ b/callwidget.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>1350</width> - <height>657</height> + <height>664</height> </rect> </property> <property name="sizePolicy"> @@ -1645,10 +1645,16 @@ Copy and share it with your friends! <verstretch>0</verstretch> </sizepolicy> </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>60</height> + </size> + </property> <property name="maximumSize"> <size> <width>16777215</width> - <height>16777215</height> + <height>60</height> </size> </property> <layout class="QHBoxLayout" name="horizontalLayout_10"> @@ -1656,13 +1662,13 @@ Copy and share it with your friends! <number>6</number> </property> <property name="leftMargin"> - <number>10</number> + <number>14</number> </property> <property name="topMargin"> <number>6</number> </property> <property name="rightMargin"> - <number>10</number> + <number>14</number> </property> <property name="bottomMargin"> <number>6</number> @@ -1735,9 +1741,9 @@ Copy and share it with your friends! </property> <property name="font"> <font> - <pointsize>10</pointsize> - <weight>75</weight> - <bold>true</bold> + <pointsize>11</pointsize> + <weight>50</weight> + <bold>false</bold> </font> </property> <property name="styleSheet"> diff --git a/conversationitemdelegate.cpp b/conversationitemdelegate.cpp index 30ce4cb40f3c939f9fc8884fa10a40489b693e21..9bc78f22ff008a286956e81a243d1941b7ae7cf6 100644 --- a/conversationitemdelegate.cpp +++ b/conversationitemdelegate.cpp @@ -174,6 +174,7 @@ ConversationItemDelegate::paintRingConversationItem(QPainter* painter, infoText2HeightModifier = 2; } else { font.setPointSize(fontSize_); + infoTextWidthModifier = 10; } auto leftMargin = dx_ + sizeImage_ + dx_; diff --git a/currentaccountcombobox.cpp b/currentaccountcombobox.cpp index feefccd849784bcf5e20bbc7bc3eb3ac2850925c..30b515646d978bcf95e4da14ff6b424d158eb538 100644 --- a/currentaccountcombobox.cpp +++ b/currentaccountcombobox.cpp @@ -153,10 +153,12 @@ void CurrentAccountComboBox::resizeEvent(QResizeEvent* event) void CurrentAccountComboBox::setupSettingsButton() { - gearPoint_.setX(this->width() - gearSize_ - 4 * gearBorder_ + 2); + gearPoint_.setX(this->width() - gearSize_ - 5 * gearBorder_ - 1); gearPoint_.setY(this->height() / 2 - gearLabel_.height() / 2 - 2 * gearBorder_ + 4.5); - gearLabel_.setGeometry(gearPoint_.x() - 3, gearPoint_.y(), - gearSize_ + 2 * gearBorder_, gearSize_ + 2 * gearBorder_); + gearLabel_.setGeometry( + gearPoint_.x(), gearPoint_.y(), + gearSize_ + 2 * gearBorder_, + gearSize_ + 2 * gearBorder_); gearLabel_.setMargin(gearBorder_); } diff --git a/mainwindow.cpp b/mainwindow.cpp index 5b3a03f9bf7330aae644a6adb377d3db915f5dfc..a715cb3af234e932f4391b588816e13d99604067 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -281,7 +281,6 @@ MainWindow::closeEvent(QCloseEvent* event) settings.setValue(SettingsKey::geometry, saveGeometry()); settings.setValue(SettingsKey::windowState, saveState()); } - this->disconnect(activeChangedConnection_); this->disconnect(screenChangedConnection_); QMainWindow::closeEvent(event); } @@ -342,17 +341,7 @@ MainWindow::show() disconnect(screenChangedConnection_); screenChangedConnection_ = connect(windowHandle(), &QWindow::screenChanged, this, &MainWindow::slotScreenChanged); - disconnect(activeChangedConnection_); - activeChangedConnection_ = connect(windowHandle(), &QWindow::activeChanged, - [this]() { - auto screenNumber = qApp->desktop()->screenNumber(); - windowHandle()->setScreen(nullptr); - QScreen* screen = qApp->screens().at(screenNumber); - windowHandle()->setScreen(screen); - }); - auto screenNumber = qApp->desktop()->screenNumber(); - QScreen* screen = qApp->screens().at(screenNumber); - currentScalingRatio_ = screen->logicalDotsPerInchX() / 96; + currentScalingRatio_ = 1.0; qobject_cast<NavWidget*>(ui->navStack->currentWidget())->updateCustomUI(); } diff --git a/mainwindow.h b/mainwindow.h index d73568d87afcb100c4df328f8eeeb909a20c3644..7645325e55701c38d478acab6f493b427e14fbdb 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -80,12 +80,11 @@ private: ScreenEnum lastScr_; int lastAccountCount_; Qt::WindowFlags flags_; - float currentScalingRatio_ = 1.0; + float currentScalingRatio_; void readSettingsFromRegistry(); Ui::MainWindow* ui; QNetworkConfigurationManager netManager_; QMetaObject::Connection screenChangedConnection_; - QMetaObject::Connection activeChangedConnection_; }; diff --git a/settingswidget.ui b/settingswidget.ui index 362e880ba087a3700056e0ac31182ebe051dbd9a..66df373cd2a09753ee040320e047cbbdf8944d3e 100644 --- a/settingswidget.ui +++ b/settingswidget.ui @@ -117,7 +117,7 @@ <number>0</number> </property> <property name="rightMargin"> - <number>9</number> + <number>14</number> </property> <item> <spacer name="horizontalSpacer_8"> @@ -1087,7 +1087,7 @@ QPushButton:pressed {background: rgb(230,230, 230); border: 0px; border-radius: <rect> <x>0</x> <y>0</y> - <width>696</width> + <width>691</width> <height>647</height> </rect> </property>