Commit 31570de4 authored by Dan Pascu's avatar Dan Pascu

Do not override font in some cases

parent 0c098f15
......@@ -15,7 +15,7 @@ from PyQt5.QtWebKitWidgets import QWebView, QWebPage
from PyQt5.QtWidgets import QApplication, QButtonGroup, QComboBox, QMenu
from application.notification import IObserver, NotificationCenter
from application.python import Null
from application.python import Null, limit
from application.system import makedirs
from collections import defaultdict
from gnutls.crypto import X509Certificate, X509PrivateKey
......@@ -248,9 +248,10 @@ class AddAccountDialog(base_class, ui_class):
self.button_group.setObjectName("button_group")
self.button_group.addButton(self.add_account_button, self.panel_view.indexOf(self.add_account_panel))
self.button_group.addButton(self.create_account_button, self.panel_view.indexOf(self.create_account_panel))
default_font_size = self.info_label.fontInfo().pointSizeF()
title_font_size = limit(default_font_size + 3, max=14)
font = self.title_label.font()
font.setPointSizeF(self.info_label.fontInfo().pointSizeF() + 3)
font.setFamily("Sans Serif")
font.setPointSizeF(title_font_size)
self.title_label.setFont(font)
font_metrics = self.create_status_label.fontMetrics()
self.create_status_label.setMinimumHeight(font_metrics.height() + 2*(font_metrics.height() + font_metrics.leading())) # reserve space for 3 lines
......
......@@ -1401,7 +1401,6 @@ class NoSessionsLabel(QLabel):
super(NoSessionsLabel, self).__init__(chat_window.session_panel)
self.chat_window = chat_window
font = self.font()
font.setFamily("Sans Serif")
font.setPointSize(20)
self.setFont(font)
self.setAlignment(Qt.AlignCenter)
......
......@@ -60,7 +60,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<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>
......@@ -102,7 +111,6 @@
<widget class="QLabel" name="title_label">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
......@@ -183,7 +191,7 @@
<item row="4" column="1">
<widget class="QRadioButton" name="add_account_button">
<property name="text">
<string>Add an existing SIP account</string>
<string>Add an e&amp;xisting SIP account</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -193,7 +201,7 @@
<item row="5" column="1">
<widget class="QRadioButton" name="create_account_button">
<property name="text">
<string>Create a free SIP account</string>
<string>Crea&amp;te a free SIP account</string>
</property>
</widget>
</item>
......@@ -204,7 +212,16 @@
</property>
<widget class="QWidget" name="add_account_panel">
<layout class="QGridLayout" name="add_panel_layout">
<property name="margin">
<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 row="0" column="0">
......@@ -312,7 +329,16 @@
</widget>
<widget class="QWidget" name="create_account_panel">
<layout class="QGridLayout" name="create_panel_layout">
<property name="margin">
<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 row="0" column="0">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment