short ui update

This commit is contained in:
ingvar1995 2016-07-02 22:19:04 +03:00
parent 3990487701
commit daa0053e4b
7 changed files with 24 additions and 23 deletions

View file

@ -408,9 +408,9 @@ class MainWindow(QtGui.QMainWindow):
if not hasattr(self, 'menu'): if not hasattr(self, 'menu'):
self.menu = DropdownMenu(self) self.menu = DropdownMenu(self)
self.menu.setGeometry(QtCore.QRect(0 if Settings.get_instance()['mirror_mode'] else 270, self.menu.setGeometry(QtCore.QRect(0 if Settings.get_instance()['mirror_mode'] else 270,
self.height() - 100, self.height() - 120,
150, 180,
100)) 120))
self.menu.show() self.menu.show()
# ----------------------------------------------------------------------------------------------------------------- # -----------------------------------------------------------------------------------------------------------------

View file

@ -198,52 +198,52 @@ class DropdownMenu(QtGui.QWidget):
super(DropdownMenu, self).__init__(parent) super(DropdownMenu, self).__init__(parent)
self.installEventFilter(self) self.installEventFilter(self)
self.setWindowFlags(QtCore.Qt.FramelessWindowHint) self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.setMaximumSize(150, 100) self.setMaximumSize(180, 120)
self.setMinimumSize(150, 100) self.setMinimumSize(180, 120)
self.screenshotButton = QRightClickButton(self) self.screenshotButton = QRightClickButton(self)
self.screenshotButton.setGeometry(QtCore.QRect(0, 50, 50, 50)) self.screenshotButton.setGeometry(QtCore.QRect(0, 60, 60, 60))
self.screenshotButton.setObjectName("screenshotButton") self.screenshotButton.setObjectName("screenshotButton")
self.fileTransferButton = QtGui.QPushButton(self) self.fileTransferButton = QtGui.QPushButton(self)
self.fileTransferButton.setGeometry(QtCore.QRect(50, 50, 50, 50)) self.fileTransferButton.setGeometry(QtCore.QRect(60, 60, 60, 60))
self.fileTransferButton.setObjectName("fileTransferButton") self.fileTransferButton.setObjectName("fileTransferButton")
self.audioMessageButton = QtGui.QPushButton(self) self.audioMessageButton = QtGui.QPushButton(self)
self.audioMessageButton.setGeometry(QtCore.QRect(100, 50, 50, 50)) self.audioMessageButton.setGeometry(QtCore.QRect(120, 60, 60, 60))
self.smileyButton = QtGui.QPushButton(self) self.smileyButton = QtGui.QPushButton(self)
self.smileyButton.setGeometry(QtCore.QRect(0, 0, 50, 50)) self.smileyButton.setGeometry(QtCore.QRect(0, 0, 60, 60))
self.videoMessageButton = QtGui.QPushButton(self) self.videoMessageButton = QtGui.QPushButton(self)
self.videoMessageButton.setGeometry(QtCore.QRect(100, 0, 50, 50)) self.videoMessageButton.setGeometry(QtCore.QRect(120, 0, 60, 60))
self.stickerButton = QtGui.QPushButton(self) self.stickerButton = QtGui.QPushButton(self)
self.stickerButton.setGeometry(QtCore.QRect(50, 0, 50, 50)) self.stickerButton.setGeometry(QtCore.QRect(60, 0, 60, 60))
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/file.png') pixmap = QtGui.QPixmap(util.curr_directory() + '/images/file.png')
icon = QtGui.QIcon(pixmap) icon = QtGui.QIcon(pixmap)
self.fileTransferButton.setIcon(icon) self.fileTransferButton.setIcon(icon)
self.fileTransferButton.setIconSize(QtCore.QSize(40, 40)) self.fileTransferButton.setIconSize(QtCore.QSize(50, 50))
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/screenshot.png') pixmap = QtGui.QPixmap(util.curr_directory() + '/images/screenshot.png')
icon = QtGui.QIcon(pixmap) icon = QtGui.QIcon(pixmap)
self.screenshotButton.setIcon(icon) self.screenshotButton.setIcon(icon)
self.screenshotButton.setIconSize(QtCore.QSize(40, 50)) self.screenshotButton.setIconSize(QtCore.QSize(50, 60))
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/audio_message.png') pixmap = QtGui.QPixmap(util.curr_directory() + '/images/audio_message.png')
icon = QtGui.QIcon(pixmap) icon = QtGui.QIcon(pixmap)
self.audioMessageButton.setIcon(icon) self.audioMessageButton.setIcon(icon)
self.audioMessageButton.setIconSize(QtCore.QSize(40, 40)) self.audioMessageButton.setIconSize(QtCore.QSize(50, 50))
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/smiley.png') pixmap = QtGui.QPixmap(util.curr_directory() + '/images/smiley.png')
icon = QtGui.QIcon(pixmap) icon = QtGui.QIcon(pixmap)
self.smileyButton.setIcon(icon) self.smileyButton.setIcon(icon)
self.smileyButton.setIconSize(QtCore.QSize(40, 40)) self.smileyButton.setIconSize(QtCore.QSize(50, 50))
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/video_message.png') pixmap = QtGui.QPixmap(util.curr_directory() + '/images/video_message.png')
icon = QtGui.QIcon(pixmap) icon = QtGui.QIcon(pixmap)
self.videoMessageButton.setIcon(icon) self.videoMessageButton.setIcon(icon)
self.videoMessageButton.setIconSize(QtCore.QSize(45, 45)) self.videoMessageButton.setIconSize(QtCore.QSize(55, 55))
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/sticker.png') pixmap = QtGui.QPixmap(util.curr_directory() + '/images/sticker.png')
icon = QtGui.QIcon(pixmap) icon = QtGui.QIcon(pixmap)
self.stickerButton.setIcon(icon) self.stickerButton.setIcon(icon)
self.stickerButton.setIconSize(QtCore.QSize(45, 45)) self.stickerButton.setIconSize(QtCore.QSize(55, 55))
self.screenshotButton.setToolTip(QtGui.QApplication.translate("MenuWindow", "Send screenshot", None, QtGui.QApplication.UnicodeUTF8)) self.screenshotButton.setToolTip(QtGui.QApplication.translate("MenuWindow", "Send screenshot", None, QtGui.QApplication.UnicodeUTF8))
self.fileTransferButton.setToolTip(QtGui.QApplication.translate("MenuWindow", "Send file", None, QtGui.QApplication.UnicodeUTF8)) self.fileTransferButton.setToolTip(QtGui.QApplication.translate("MenuWindow", "Send file", None, QtGui.QApplication.UnicodeUTF8))

View file

@ -378,7 +378,7 @@ class PrivacySettings(CenteredWidget):
self.auto_path = QtGui.QLabel(self) self.auto_path = QtGui.QLabel(self)
self.auto_path.setGeometry(QtCore.QRect(10, 230, 350, 30)) self.auto_path.setGeometry(QtCore.QRect(10, 230, 350, 30))
self.path = QtGui.QPlainTextEdit(self) self.path = QtGui.QPlainTextEdit(self)
self.path.setGeometry(QtCore.QRect(10, 265, 330, 45)) self.path.setGeometry(QtCore.QRect(10, 265, 350, 45))
self.change_path = QtGui.QPushButton(self) self.change_path = QtGui.QPushButton(self)
self.change_path.setGeometry(QtCore.QRect(10, 320, 350, 30)) self.change_path.setGeometry(QtCore.QRect(10, 320, 350, 30))
settings = Settings.get_instance() settings = Settings.get_instance()
@ -557,7 +557,7 @@ class InterfaceSettings(CenteredWidget):
self.themeSelect.setCurrentIndex(index) self.themeSelect.setCurrentIndex(index)
self.lang_choose = QtGui.QComboBox(self) self.lang_choose = QtGui.QComboBox(self)
self.lang_choose.setGeometry(QtCore.QRect(30, 110, 120, 30)) self.lang_choose.setGeometry(QtCore.QRect(30, 110, 120, 30))
supported = Settings.supported_languages() supported = sorted(Settings.supported_languages().keys(), reverse=True)
for key in supported: for key in supported:
self.lang_choose.insertItem(0, key) self.lang_choose.insertItem(0, key)
if settings['language'] == key: if settings['language'] == key:

View file

@ -393,6 +393,7 @@ class Profile(contact.Contact, Singleton):
plugin_support.PluginLoader.get_instance().command(text[8:]) plugin_support.PluginLoader.get_instance().command(text[8:])
self._screen.messageEdit.clear() self._screen.messageEdit.clear()
elif text and self._active_friend + 1: elif text and self._active_friend + 1:
text = ''.join(c if c <= '\u10FFFF' else '\u25AF' for c in text)
if text.startswith('/me '): if text.startswith('/me '):
message_type = TOX_MESSAGE_TYPE['ACTION'] message_type = TOX_MESSAGE_TYPE['ACTION']
text = text[4:] text = text[4:]

View file

@ -95,8 +95,8 @@ class Settings(dict, Singleton):
'ipv6_enabled': True, 'ipv6_enabled': True,
'udp_enabled': True, 'udp_enabled': True,
'proxy_type': 0, 'proxy_type': 0,
'proxy_host': '0', 'proxy_host': '127.0.0.1',
'proxy_port': 0, 'proxy_port': 9050,
'start_port': 0, 'start_port': 0,
'end_port': 0, 'end_port': 0,
'tcp_port': 0, 'tcp_port': 0,

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@ import os
import time import time
program_version = '0.2.0' program_version = '0.2.1'
def log(data): def log(data):