              "iconphoto",
              self._w, get_images().icons["favicon"])  # pylint:disable=protected-access
          logger.debug("Initialized tkinter")
  
      def _get_scaling(self):
          """ Get dpi and update scaling for the display.
  
          Returns
          -------
          float: The scaling factor for display
          """
          dpi = self.winfo_fpixels("1i")
          scaling = dpi / 72.0
          logger.debug("dpi: %s, scaling: %s'", dpi, scaling)
          return scaling
  
      def _set_geometry(self):
          """ Set the GUI window geometry. """
          self.tk.call("tk", "scaling", self._scaling)
          width = int(940 * self._scaling)
          height = int(600 * self._scaling)
          logger.debug("Geometry: %sx%s", width, height)
          self.geometry("{}x{}+80+80".format(str(width), str(height)))
  
      def process(self):
          """ The entry point for the Preview tool from :file:`lib.tools.cli`.
  
          Launch the tkinter preview Window and run main loop.
          """
 
</s> remove     def set_geometry(self):
        """ Set GUI geometry """
        fullscreen = self._config.user_config_dict["fullscreen"]
        scaling_factor = self._config.scaling_factor

        if fullscreen:
            initial_dimensions = (self.winfo_screenwidth(), self.winfo_screenheight())
        else:
            initial_dimensions = (round(1200 * scaling_factor), round(640 * scaling_factor))

        if fullscreen and sys.platform == "win32":
            self.state('zoomed')
        elif fullscreen:
            self.attributes('-zoomed', True)
        else:
            self.geometry("{}x{}+80+80".format(str(initial_dimensions[0]),
                                               str(initial_dimensions[1])))
        logger.debug("Geometry: %sx%s", *initial_dimensions)

 </s> add  </s> remove         """ list: The mask names that are available for every face in the alignmnets file """
 </s> add         """ list: The mask names that are available for every face in the alignments file """ </s> remove     def __init__(self, parent, config_tools, patch_callback, scaling):
        logger.debug("Initializing %s: (parent: %s, config: %s, scaling: %s)",
                     self.__class__.__name__, parent, config_tools, scaling)
 </s> add     def __init__(self, parent, config_tools, patch_callback):
        logger.debug("Initializing %s: (parent: %s, config: %s)",
                     self.__class__.__name__, parent, config_tools) </s> remove         self._set_geometry()
 </s> add         get_config().set_geometry(940, 600, fullscreen=False) </s> remove                                       self._refresh,
                                      self._scaling)
 </s> add                                       self._refresh)
              "iconphoto",
              self._w, get_images().icons["favicon"])  # pylint:disable=protected-access
          logger.debug("Initialized tkinter")
  




















      def process(self):
          """ The entry point for the Preview tool from :file:`lib.tools.cli`.
  
          Launch the tkinter preview Window and run main loop.
          """
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 lib.gui
Centralize get_scaling and set_geometry to utils.config
Suppress Error when rebuilding GUI for TreeView 
tools/preview.py