Skip to content
Snippets Groups Projects
Commit 27bee407 authored by inso's avatar inso
Browse files

Multiple fixes for windows

- Toast are placed on the bottom right
- Generating translations uses lrelease instead of QtChoose
parent 154be797
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,9 @@ def prepare_qm():
for (ts_file, qm_file) in translations:
# avoid conflict with qt4 lrelease by running qtchooser directly
if sys.platform.startswith('win'):
subprocess.call(["lrelease", ts_file, "-qm", qm_file])
else:
subprocess.call(["qtchooser", "-run-tool=lrelease", "-qt=5", ts_file, "-qm", qm_file])
print(ts_file + " >> " + qm_file)
......
......@@ -4,7 +4,7 @@ Created on 18 mars 2015
@author: inso
'''
from PyQt5.QtCore import QThread, Qt
from PyQt5.QtCore import QThread, Qt, QObject
from .blockchain import BlockchainWatcher
from .persons import PersonsWatcher
import logging
......@@ -19,6 +19,7 @@ class Monitor(object):
'''
Constructor
'''
super().__init__()
self.account = account
self.threads_pool = []
self._blockchain_watchers = {}
......
......@@ -6,7 +6,7 @@ Created on 1 mai 2015
import sys, time
import logging
from PyQt5.QtCore import Qt, QThread
from PyQt5.QtWidgets import QMainWindow
from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5.QtGui import QImage, QPixmap
from ..gen_resources.toast_uic import Ui_Toast
......@@ -49,9 +49,14 @@ class _Toast(QMainWindow, Ui_Toast):
global window # some space outside the local stack
window = self # save pointer till killed to avoid GC
super().__init__()
self.setWindowFlags(Qt.FramelessWindowHint)
rect = QApplication.desktop().availableGeometry()
height = rect.height()
width = rect.width()
self.setWindowFlags(Qt.FramelessWindowHint |Qt.NoDropShadowWindowHint)
self.setupUi(self)
x = width - self.width()
y = height - self.height()
self.move(x, y)
self.display.setText("""<h1>{0}</h1>
<p>{1}</p>""".format(title, msg))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment