Commit f6d32246 authored by Dan Pascu's avatar Dan Pascu

Fixed layout issues in incoming dialogs

parent 445a986a
...@@ -511,13 +511,19 @@ class PresenceManager(object): ...@@ -511,13 +511,19 @@ class PresenceManager(object):
ui_class, base_class = uic.loadUiType(Resources.get('pending_watcher.ui')) ui_class, base_class = uic.loadUiType(Resources.get('pending_watcher.ui'))
class PendingWatcherDialog(base_class, ui_class): class PendingWatcherDialog(base_class, ui_class):
def __init__(self, account, uri, display_name, parent=None): def __init__(self, account, uri, display_name, parent=None):
super(PendingWatcherDialog, self).__init__(parent) super(PendingWatcherDialog, self).__init__(parent)
self.setWindowFlags(Qt.WindowStaysOnTopHint) self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
self.setAttribute(Qt.WA_DeleteOnClose) self.setAttribute(Qt.WA_DeleteOnClose)
with Resources.directory: with Resources.directory:
self.setupUi(self) self.setupUi(self)
default_font_size = self.uri_label.fontInfo().pointSizeF()
name_font_size = limit(default_font_size + 3, max=14)
font = self.name_label.font()
font.setPointSizeF(name_font_size)
self.name_label.setFont(font)
addressbook_manager = addressbook.AddressbookManager() addressbook_manager = addressbook.AddressbookManager()
try: try:
self.contact = next(contact for contact in addressbook_manager.get_contacts() if uri in (addr.uri for addr in contact.uris)) self.contact = next(contact for contact in addressbook_manager.get_contacts() if uri in (addr.uri for addr in contact.uris))
...@@ -528,14 +534,10 @@ class PendingWatcherDialog(base_class, ui_class): ...@@ -528,14 +534,10 @@ class PendingWatcherDialog(base_class, ui_class):
icon_manager = IconManager() icon_manager = IconManager()
icon = icon_manager.get(self.contact.id) icon = icon_manager.get(self.contact.id)
if icon is not None: if icon is not None:
self.user_icon.setPixmap(icon.pixmap(32)) self.user_icon.setPixmap(icon.pixmap(48))
self.account_label.setText(u'For account %s' % account.id) self.description_label.setText(u'Wants to subscribe to your availability information at {}'.format(account.id))
self.name_label.setText(display_name or uri) self.name_label.setText(display_name or uri)
self.uri_label.setText(uri) self.uri_label.setText(uri)
font = self.name_label.font()
font.setPointSizeF(self.uri_label.fontInfo().pointSizeF() + 3)
font.setFamily("Sans Serif")
self.name_label.setFont(font)
self.accept_button.released.connect(self._accept_watcher) self.accept_button.released.connect(self._accept_watcher)
self.block_button.released.connect(self._block_watcher) self.block_button.released.connect(self._block_watcher)
self.position = None self.position = None
...@@ -565,35 +567,6 @@ class PendingWatcherDialog(base_class, ui_class): ...@@ -565,35 +567,6 @@ class PendingWatcherDialog(base_class, ui_class):
policy.presence.policy = 'block' policy.presence.policy = 'block'
policy.save() policy.save()
def show(self, position=1):
from blink import Blink
blink = Blink()
screen_geometry = blink.desktop().screenGeometry(self)
available_geometry = blink.desktop().availableGeometry(self)
main_window_geometry = blink.main_window.geometry()
main_window_framegeometry = blink.main_window.frameGeometry()
horizontal_decorations = main_window_framegeometry.width() - main_window_geometry.width()
vertical_decorations = main_window_framegeometry.height() - main_window_geometry.height()
width = limit(self.sizeHint().width(), min=self.minimumSize().width(), max=min(self.maximumSize().width(), available_geometry.width()-horizontal_decorations))
height = limit(self.sizeHint().height(), min=self.minimumSize().height(), max=min(self.maximumSize().height(), available_geometry.height()-vertical_decorations))
total_width = width + horizontal_decorations
total_height = height + vertical_decorations
x = limit(screen_geometry.center().x() - total_width/2, min=available_geometry.left(), max=available_geometry.right()-total_width)
if position is None:
y = -1
elif position % 2 == 0:
y = screen_geometry.center().y() + (position-1)*total_height/2
else:
y = screen_geometry.center().y() - position*total_height/2
if available_geometry.top() <= y <= available_geometry.bottom() - total_height:
self.setGeometry(x, y, width, height)
else:
self.resize(width, height)
self.position = position
super(PendingWatcherDialog, self).show()
del ui_class, base_class del ui_class, base_class
...@@ -5098,16 +5098,18 @@ ui_class, base_class = uic.loadUiType(Resources.get('incoming_dialog.ui')) ...@@ -5098,16 +5098,18 @@ ui_class, base_class = uic.loadUiType(Resources.get('incoming_dialog.ui'))
class IncomingDialog(IncomingDialogBase, ui_class): class IncomingDialog(IncomingDialogBase, ui_class):
def __init__(self, parent=None): def __init__(self, parent=None):
super(IncomingDialog, self).__init__(parent) super(IncomingDialog, self).__init__(parent)
self.setWindowFlags(Qt.WindowStaysOnTopHint) self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
self.setAttribute(Qt.WA_DeleteOnClose) self.setAttribute(Qt.WA_DeleteOnClose)
with Resources.directory: with Resources.directory:
self.setupUi(self) self.setupUi(self)
default_font_size = self.uri_label.fontInfo().pointSizeF()
name_font_size = limit(default_font_size + 3, max=14)
note_font_size = limit(default_font_size - 1, max=9)
font = self.username_label.font() font = self.username_label.font()
font.setPointSizeF(self.uri_label.fontInfo().pointSizeF() + 3) font.setPointSizeF(name_font_size)
font.setFamily("Sans Serif")
self.username_label.setFont(font) self.username_label.setFont(font)
font = self.note_label.font() font = self.note_label.font()
font.setPointSizeF(self.uri_label.fontInfo().pointSizeF() - 1) font.setPointSizeF(note_font_size)
self.note_label.setFont(font) self.note_label.setFont(font)
self.reject_mode = 'ignore' self.reject_mode = 'ignore'
self.slot = None self.slot = None
...@@ -5150,7 +5152,7 @@ class IncomingDialog(IncomingDialogBase, ui_class): ...@@ -5150,7 +5152,7 @@ class IncomingDialog(IncomingDialogBase, ui_class):
self.chat_stream.active = True self.chat_stream.active = True
self.screensharing_stream.active = True self.screensharing_stream.active = True
self.video_stream.active = True self.video_stream.active = True
self.note_label.setText(u'To refuse a stream click its icon') self.note_label.setText(u'To refuse a media type click its icon')
else: else:
self.audio_stream.active = False self.audio_stream.active = False
self.chat_stream.active = False self.chat_stream.active = False
...@@ -5198,8 +5200,7 @@ class IncomingRequest(QObject): ...@@ -5198,8 +5200,7 @@ class IncomingRequest(QObject):
address = u'%s@%s' % (session.remote_identity.uri.user, session.remote_identity.uri.host) address = u'%s@%s' % (session.remote_identity.uri.user, session.remote_identity.uri.host)
self.dialog.uri_label.setText(address) self.dialog.uri_label.setText(address)
self.dialog.username_label.setText(contact.name or session.remote_identity.display_name or address) self.dialog.username_label.setText(contact.name or session.remote_identity.display_name or address)
if contact.pixmap: self.dialog.user_icon.setPixmap(contact.icon.pixmap(48))
self.dialog.user_icon.setPixmap(contact.pixmap)
self.dialog.audio_stream.setVisible(self.audio_stream is not None) self.dialog.audio_stream.setVisible(self.audio_stream is not None)
self.dialog.video_stream.setVisible(self.video_stream is not None) self.dialog.video_stream.setVisible(self.video_stream is not None)
self.dialog.chat_stream.setVisible(self.chat_stream is not None) self.dialog.chat_stream.setVisible(self.chat_stream is not None)
...@@ -5210,7 +5211,6 @@ class IncomingRequest(QObject): ...@@ -5210,7 +5211,6 @@ class IncomingRequest(QObject):
else: else:
self.dialog.screensharing_label.setText(u'is asking to share your screen') self.dialog.screensharing_label.setText(u'is asking to share your screen')
# self.dialog.screensharing_stream.accepted = bool(proposal) # self.dialog.screensharing_stream.accepted = bool(proposal)
self.dialog.audio_device_label.setText(u'Selected audio device is: %s' % SIPApplication.voice_audio_bridge.mixer.real_output_device)
self.dialog.finished.connect(self._SH_DialogFinished) self.dialog.finished.connect(self._SH_DialogFinished)
...@@ -5288,20 +5288,19 @@ class IncomingRequest(QObject): ...@@ -5288,20 +5288,19 @@ class IncomingRequest(QObject):
ui_class, base_class = uic.loadUiType(Resources.get('incoming_filetransfer_dialog.ui')) ui_class, base_class = uic.loadUiType(Resources.get('incoming_filetransfer_dialog.ui'))
class IncomingFileTransferDialog(IncomingDialogBase, ui_class): class IncomingFileTransferDialog(IncomingDialogBase, ui_class):
def __init__(self, parent=None): def __init__(self, parent=None):
super(IncomingFileTransferDialog, self).__init__(parent) super(IncomingFileTransferDialog, self).__init__(parent)
self.setWindowFlags(Qt.WindowStaysOnTopHint) self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
self.setAttribute(Qt.WA_DeleteOnClose) self.setAttribute(Qt.WA_DeleteOnClose)
with Resources.directory: with Resources.directory:
self.setupUi(self) self.setupUi(self)
default_font_size = self.uri_label.fontInfo().pointSizeF()
name_font_size = limit(default_font_size + 3, max=14)
font = self.username_label.font() font = self.username_label.font()
font.setPointSizeF(self.uri_label.fontInfo().pointSizeF() + 3) font.setPointSizeF(name_font_size)
font.setFamily("Sans Serif")
self.username_label.setFont(font) self.username_label.setFont(font)
font = self.file_label.font()
font.setPointSizeF(self.uri_label.fontInfo().pointSizeF() - 1)
self.file_label.setFont(font)
self.slot = None self.slot = None
self.reject_mode = 'ignore' self.reject_mode = 'ignore'
self.reject_button.released.connect(self._set_reject_mode) self.reject_button.released.connect(self._set_reject_mode)
...@@ -5332,13 +5331,9 @@ class IncomingFileTransferRequest(QObject): ...@@ -5332,13 +5331,9 @@ class IncomingFileTransferRequest(QObject):
self.session = session self.session = session
self.stream = stream self.stream = stream
self.dialog.setWindowTitle(u'Incoming File Transfer')
self.dialog.setWindowIconText(u'Incoming File Transfer')
self.dialog.uri_label.setText(contact_uri.uri) self.dialog.uri_label.setText(contact_uri.uri)
self.dialog.username_label.setText(contact.name) self.dialog.username_label.setText(contact.name)
if contact.pixmap: self.dialog.user_icon.setPixmap(contact.icon.pixmap(48))
self.dialog.user_icon.setPixmap(contact.pixmap)
filename = os.path.basename(self.stream.file_selector.name) filename = os.path.basename(self.stream.file_selector.name)
size = self.stream.file_selector.size size = self.stream.file_selector.size
if size: if size:
...@@ -5380,17 +5375,15 @@ ui_class, base_class = uic.loadUiType(Resources.get('incoming_calltransfer_dialo ...@@ -5380,17 +5375,15 @@ ui_class, base_class = uic.loadUiType(Resources.get('incoming_calltransfer_dialo
class IncomingCallTransferDialog(IncomingDialogBase, ui_class): class IncomingCallTransferDialog(IncomingDialogBase, ui_class):
def __init__(self, parent=None): def __init__(self, parent=None):
super(IncomingCallTransferDialog, self).__init__(parent) super(IncomingCallTransferDialog, self).__init__(parent)
self.setWindowFlags(Qt.WindowStaysOnTopHint) self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
self.setAttribute(Qt.WA_DeleteOnClose) self.setAttribute(Qt.WA_DeleteOnClose)
with Resources.directory: with Resources.directory:
self.setupUi(self) self.setupUi(self)
default_font_size = self.uri_label.fontInfo().pointSizeF()
name_font_size = limit(default_font_size + 3, max=14)
font = self.username_label.font() font = self.username_label.font()
font.setPointSizeF(self.uri_label.fontInfo().pointSizeF() + 3) font.setPointSizeF(name_font_size)
font.setFamily("Sans Serif")
self.username_label.setFont(font) self.username_label.setFont(font)
font = self.transfer_label.font()
font.setPointSizeF(self.uri_label.fontInfo().pointSizeF() - 1)
self.transfer_label.setFont(font)
self.slot = None self.slot = None
self.reject_mode = 'reject' self.reject_mode = 'reject'
...@@ -5409,21 +5402,17 @@ class IncomingCallTransferRequest(QObject): ...@@ -5409,21 +5402,17 @@ class IncomingCallTransferRequest(QObject):
priority = 0 priority = 0
stream_types = {'audio'} stream_types = {'audio'}
def __init__(self, dialog, contact, contact_uri, session): def __init__(self, dialog, contact, contact_uri, blink_session):
super(IncomingCallTransferRequest, self).__init__() super(IncomingCallTransferRequest, self).__init__()
self.dialog = dialog self.dialog = dialog
self.contact = contact self.contact = contact
self.contact_uri = contact_uri self.contact_uri = contact_uri
self.session = session self.session = blink_session.sip_session
self.dialog.setWindowTitle(u'Incoming Call Transfer')
self.dialog.setWindowIconText(u'Incoming Call Transfer')
self.dialog.uri_label.setText(contact_uri.uri) self.dialog.uri_label.setText(contact_uri.uri)
self.dialog.username_label.setText(contact.name) self.dialog.username_label.setText(contact.name)
if contact.pixmap: self.dialog.user_icon.setPixmap(contact.icon.pixmap(48))
self.dialog.user_icon.setPixmap(contact.pixmap) self.dialog.transfer_label.setText(u'transfer requested by {}'.format(blink_session.contact.name or blink_session.contact_uri.uri))
self.dialog.transfer_label.setText(u'would like to transfer you to {.uri}'.format(contact_uri))
self.dialog.finished.connect(self._SH_DialogFinished) self.dialog.finished.connect(self._SH_DialogFinished)
...@@ -5903,11 +5892,10 @@ class SessionManager(object): ...@@ -5903,11 +5892,10 @@ class SessionManager(object):
def _NH_BlinkSessionTransferNewIncoming(self, notification): def _NH_BlinkSessionTransferNewIncoming(self, notification):
from blink.contacts import URIUtils from blink.contacts import URIUtils
session = notification.sender.sip_session
contact, contact_uri = URIUtils.find_contact(notification.data.transfer_destination) contact, contact_uri = URIUtils.find_contact(notification.data.transfer_destination)
dialog = IncomingCallTransferDialog() # Build the dialog without a parent in order to be displayed on the current workspace on Linux. dialog = IncomingCallTransferDialog() # Build the dialog without a parent in order to be displayed on the current workspace on Linux.
incoming_request = IncomingCallTransferRequest(dialog, contact, contact_uri, session) incoming_request = IncomingCallTransferRequest(dialog, contact, contact_uri, notification.sender)
incoming_request.finished.connect(self._SH_IncomingRequestFinished) incoming_request.finished.connect(self._SH_IncomingRequestFinished)
incoming_request.accepted.connect(self._SH_IncomingCallTransferRequestAccepted) incoming_request.accepted.connect(self._SH_IncomingCallTransferRequestAccepted)
incoming_request.rejected.connect(self._SH_IncomingCallTransferRequestRejected) incoming_request.rejected.connect(self._SH_IncomingCallTransferRequestRejected)
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>Dialog</class> <class>dialog</class>
<widget class="QDialog" name="Dialog"> <widget class="QDialog" name="dialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>480</width> <width>480</width>
<height>165</height> <height>170</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>480</width> <width>480</width>
<height>165</height> <height>170</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>165</height> <height>170</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Incoming Call Transfer</string> <string>Call Transfer Request</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset> <iconset>
...@@ -31,9 +31,18 @@ ...@@ -31,9 +31,18 @@
</property> </property>
<layout class="QVBoxLayout" name="dialog_layout"> <layout class="QVBoxLayout" name="dialog_layout">
<property name="spacing"> <property name="spacing">
<number>34</number> <number>32</number>
</property> </property>
<property name="margin"> <property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number> <number>8</number>
</property> </property>
<item> <item>
...@@ -76,14 +85,13 @@ ...@@ -76,14 +85,13 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Sans Serif</family>
<pointsize>12</pointsize> <pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Caller name</string> <string>Destination name</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
...@@ -163,7 +171,7 @@ ...@@ -163,7 +171,7 @@
</palette> </palette>
</property> </property>
<property name="text"> <property name="text">
<string>Caller URI</string> <string>Destination URI</string>
</property> </property>
<property name="indent"> <property name="indent">
<number>1</number> <number>1</number>
...@@ -172,18 +180,6 @@ ...@@ -172,18 +180,6 @@
</item> </item>
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<widget class="QLabel" name="user_icon"> <widget class="QLabel" name="user_icon">
<property name="minimumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="pixmap"> <property name="pixmap">
<pixmap>icons/default-avatar.png</pixmap> <pixmap>icons/default-avatar.png</pixmap>
</property> </property>
...@@ -199,8 +195,8 @@ ...@@ -199,8 +195,8 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>0</width> <width>20</width>
<height>0</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
...@@ -272,7 +268,7 @@ ...@@ -272,7 +268,7 @@
</palette> </palette>
</property> </property>
<property name="text"> <property name="text">
<string extracomment="is offering to share his screen">would like to transfer you to user@domain</string> <string extracomment="is offering to share his screen">transfer requested by Sender name</string>
</property> </property>
<property name="indent"> <property name="indent">
<number>3</number> <number>3</number>
...@@ -289,16 +285,10 @@ ...@@ -289,16 +285,10 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="reject_button"> <widget class="QPushButton" name="reject_button">
<property name="minimumSize">
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>24</height> <height>28</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
...@@ -321,16 +311,10 @@ ...@@ -321,16 +311,10 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="accept_button"> <widget class="QPushButton" name="accept_button">
<property name="minimumSize">
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>24</height> <height>28</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
...@@ -354,7 +338,7 @@ ...@@ -354,7 +338,7 @@
<connection> <connection>
<sender>accept_button</sender> <sender>accept_button</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>dialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
...@@ -370,7 +354,7 @@ ...@@ -370,7 +354,7 @@
<connection> <connection>
<sender>reject_button</sender> <sender>reject_button</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>dialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>Dialog</class> <class>dialog</class>
<widget class="QDialog" name="Dialog"> <widget class="QDialog" name="dialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>480</width> <width>480</width>
<height>165</height> <height>170</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>480</width> <width>480</width>
<height>165</height> <height>170</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>165</height> <height>170</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -31,9 +31,18 @@ ...@@ -31,9 +31,18 @@
</property> </property>
<layout class="QVBoxLayout" name="dialog_layout"> <layout class="QVBoxLayout" name="dialog_layout">
<property name="spacing"> <property name="spacing">
<number>34</number> <number>32</number>
</property> </property>
<property name="margin"> <property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number> <number>8</number>
</property> </property>
<item> <item>
...@@ -156,7 +165,6 @@ ...@@ -156,7 +165,6 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Sans Serif</family>
<pointsize>12</pointsize> <pointsize>12</pointsize>
<weight>75</weight> <weight>75</weight>
<bold>true</bold> <bold>true</bold>
...@@ -172,18 +180,6 @@ ...@@ -172,18 +180,6 @@
</item> </item>
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<widget class="QLabel" name="user_icon"> <widget class="QLabel" name="user_icon">
<property name="minimumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="pixmap"> <property name="pixmap">
<pixmap>icons/default-avatar.png</pixmap> <pixmap>icons/default-avatar.png</pixmap>
</property> </property>
...@@ -199,8 +195,8 @@ ...@@ -199,8 +195,8 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>0</width> <width>20</width>
<height>0</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
...@@ -289,16 +285,10 @@ ...@@ -289,16 +285,10 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="reject_button"> <widget class="QPushButton" name="reject_button">
<property name="minimumSize">
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>24</height> <height>28</height>
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
...@@ -324,16 +314,10 @@ ...@@ -324,16 +314,10 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="accept_button"> <widget class="QPushButton" name="accept_button">
<property name="minimumSize">
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>24</height> <height>28</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
...@@ -357,7 +341,7 @@ ...@@ -357,7 +341,7 @@
<connection> <connection>
<sender>accept_button</sender> <sender>accept_button</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>dialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
...@@ -373,7 +357,7 @@ ...@@ -373,7 +357,7 @@
<connection> <connection>
<sender>reject_button</sender> <sender>reject_button</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>dialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>Dialog</class> <class>dialog</class>
<widget class="QDialog" name="Dialog"> <widget class="QDialog" name="dialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
...@@ -31,7 +31,19 @@ ...@@ -31,7 +31,19 @@
</property> </property>
<layout class="QVBoxLayout" name="dialog_layout"> <layout class="QVBoxLayout" name="dialog_layout">
<property name="spacing"> <property name="spacing">
<number>10</number> <number>32</number>
</property>
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property> </property>
<item> <item>
<widget class="QFrame" name="frame"> <widget class="QFrame" name="frame">
...@@ -64,77 +76,12 @@ ...@@ -64,77 +76,12 @@
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<layout class="QVBoxLayout" name="user_icon_layout"> <widget class="QLabel" name="user_icon">
<property name="spacing"> <property name="pixmap">
<number>0</number> <pixmap>icons/default-avatar.png</pixmap>
</property>
<item>
<widget class="QLabel" name="user_icon">
<property name="minimumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="pixmap">
<pixmap>icons/default-avatar.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="user_icon_spacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QLabel" name="name_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>26</height>
</size>
</property>
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Watcher name</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -218,7 +165,36 @@ ...@@ -218,7 +165,36 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="3"> <item row="0" column="1">
<widget class="QLabel" name="name_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>26</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Watcher name</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="description_label"> <widget class="QLabel" name="description_label">
<property name="palette"> <property name="palette">
<palette> <palette>
...@@ -285,22 +261,22 @@ ...@@ -285,22 +261,22 @@
</palette> </palette>
</property> </property>
<property name="text"> <property name="text">
<string>Wants to subscribe to your availability information</string> <string>Wants to subscribe to your availability information at user@domain</string>
</property> </property>
<property name="indent"> <property name="indent">
<number>3</number> <number>3</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="3"> <item row="2" column="0" colspan="2">
<spacer name="frame_spacer"> <spacer name="frame_spacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>407</width> <width>20</width>
<height>22</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
...@@ -308,110 +284,17 @@ ...@@ -308,110 +284,17 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="account_label">
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>68</red>
<green>68</green>
<blue>68</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>68</red>
<green>68</green>
<blue>68</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>68</red>
<green>68</green>
<blue>68</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>68</red>
<green>68</green>
<blue>68</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>118</red>
<green>118</green>
<blue>117</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>118</red>
<green>118</green>
<blue>117</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string>For account user@domain.com</string>
</property>
<property name="indent">
<number>3</number>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="button_layout"> <layout class="QHBoxLayout" name="button_layout">
<property name="spacing"> <property name="spacing">
<number>5</number> <number>5</number>
</property> </property>
<item>
<spacer name="button_spacer">
<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> <item>
<widget class="QPushButton" name="block_button"> <widget class="QPushButton" name="block_button">
<property name="minimumSize">
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>24</height> <height>28</height>
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
...@@ -423,17 +306,24 @@ ...@@ -423,17 +306,24 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="accept_button"> <spacer name="button_spacer">
<property name="minimumSize"> <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>85</width> <width>40</width>
<height>24</height> <height>20</height>
</size> </size>
</property> </property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="accept_button">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>24</height> <height>28</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
...@@ -450,14 +340,13 @@ ...@@ -450,14 +340,13 @@
</widget> </widget>
<tabstops> <tabstops>
<tabstop>accept_button</tabstop> <tabstop>accept_button</tabstop>
<tabstop>block_button</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
<sender>accept_button</sender> <sender>accept_button</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>dialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
...@@ -473,7 +362,7 @@ ...@@ -473,7 +362,7 @@
<connection> <connection>
<sender>block_button</sender> <sender>block_button</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>Dialog</receiver> <receiver>dialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
......
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