예제 #1
0
    def position_window(self):
        window_width = self.get_size()[0]
        current_screen = get_current_screen_geometry()

        # The topmost pixel of the window should be at 1/5 of the current screen's height
        # Window should be positioned in the center horizontally
        # Also, add offset x and y, in order to move window to the current screen
        self.move(current_screen['width'] / 2 - window_width / 2 + current_screen['x'],
                  current_screen['height'] / 5 + current_screen['y'])
예제 #2
0
    def position_window(self):
        window_width = self.get_size()[0]
        screen = get_current_screen_geometry()

        if self.settings.get_property('render-on-screen') == "default-monitor":
            screen = get_primary_screen_geometry()

        # The topmost pixel of the window should be at 1/5 of the current screen's height
        # Window should be positioned in the center horizontally
        # Also, add offset x and y, in order to move window to the current screen
        self.move(screen['width'] / 2 - window_width / 2 + screen['x'],
                  screen['height'] / 5 + screen['y'])