Revert window pos set to start + add tmpl_name to all fake_app_gui

This commit is contained in:
2016-01-23 23:14:38 +05:30
parent fb536c9931
commit a43aa5f68c
3 changed files with 12 additions and 5 deletions
@@ -44,11 +44,6 @@ class Controller(htmlPy.Object):
# self.app_gui.window.minimumWidth, self.app_gui.window.minimumHeight = (0, 0)
self.app_gui.width, self.app_gui.height = self.dict_tmpl_size.get(self.app_gui.tmpl_name)
screen_geo = QApplication.desktop().availableGeometry()
screen_topright = screen_geo.topRight()
self.app_gui.x_pos = (screen_topright.x() - 20) - self.app_gui.width
self.app_gui.y_pos = (screen_topright.y() + 20)
@htmlPy.Slot()
def redraw(self):
redis_db = redis.StrictRedis(host='localhost', port=REDIS_PORT, db=0)
@@ -2,6 +2,7 @@ import htmlPy
import os
import PyQt4.QtCore as QtCore
from PyQt4.QtGui import QApplication
import argparse
# Import back-end functionalities
@@ -32,6 +33,11 @@ def main():
# app.window.setWindowFlags(app.window.windowFlags() & ~QtCore.Qt.WindowMaximizeButtonHint)
app.window.setWindowFlags(app.window.windowFlags() | QtCore.Qt.WindowStaysOnTopHint)
screen_geo = QApplication.desktop().availableGeometry()
screen_topright = screen_geo.topRight()
app.x_pos = (screen_topright.x() - 20) - app.width
app.y_pos = (screen_topright.y() + 20)
# GUI configarg
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
app.static_path = os.path.join(BASE_DIR, "static/")