def __init__(self, parent): super().__init__(parent) icon = fsui.Icon("fs-uae-launcher", "pkg:launcher") self.add_header(icon, "{} Launcher".format(fsgs.product)) if fsboot.get("fws") == "1": # We omit the appearance settings, since they have no effect # when running under the workspace environment. pass else: self.add_option(Option.LAUNCHER_THEME) self.add_option(Option.LAUNCHER_FONT_SIZE) self.add_option(Option.LAUNCHER_CLOSE_BUTTONS) self.add_section(gettext("Experimental Features")) # Netplay feature is now enabled by default # self.add_option(Option.NETPLAY_FEATURE) if not openretro: self.add_option(Option.PLATFORMS_FEATURE) # self.add_option(Option.LAUNCHER_CONFIG_FEATURE) # self.add_option(Option.LAUNCHER_SETUP_WIZARD_FEATURE) self.add_section(gettext("Maintenance")) label = fsui.MultiLineLabel( self, gettext( "Defragmenting the databases will improve performance " "by ensuring that tables and indices are stored contiguously " "on disk. It will also reclaim some storage space."), 640) self.layout.add(label, fill=True, margin_top=20) button = fsui.Button(self, gettext("Defragment Databases")) button.activated.connect(self.on_defragment_button) self.layout.add(button, margin_top=20)
def fws(cls): if cls._fws is None: if fsboot.get("fws") == "1": cls._fws = True else: cls._fws = LauncherSettings.get(Option.LAUNCHER_THEME) == "fws" if workspace is None: cls._fws = None return cls._fws
def __init__(self, parent): super().__init__(parent) icon = fsui.Icon("settings", "pkg:workspace") self.add_header(icon, "FS-UAE Launcher") if fsboot.get("fws") == "1": # We omit the appearance settings, since they have no effect # when running under the workspace environment. pass else: self.add_option("launcher_theme") self.add_option("launcher_font_size") self.add_section(gettext("Experimental Features")) # self.add_option(Option.NETPLAY_FEATURE) self.add_option(Option.LAUNCHER_CONFIG_FEATURE)
def __init__( self, parent, title="", border=True, minimizable=True, maximizable=True, separator=True, menu=False, native=None, header=True, below=False, closable=True, color=None, **_ ): init_qt() super().__init__() # if parent is None and len(default_window_parent) > 0: # parent = default_window_parent[-1] # print("using default parent", parent) # FIXME self._window = weakref.ref(self) if native is None: if fsboot.get("fws") == "1": native = False else: native = not _use_fws if native: self._real_window = RealWindow( QParent(parent, True), self, minimizable=minimizable, maximizable=maximizable, below=below, border=border, ) else: self._real_window = FwsWindow( QParent(parent, True), self, below=below ) self._real_widget = RealWidget(self._real_window, self) # Widget.__init__(self, parent) # self.init_widget(parent) # MixinBase.__init__(self) self.set_title(title) self.layout = None self._size_specified = False self.close_listeners = [] # _windows.add(self) self.destroyed.connect(self.__destroyed) self._real_window.setAttribute(Qt.WA_DeleteOnClose, True) # if not border: # self.setWindowFlags(Qt.FramelessWindowHint | # Qt.NoDropShadowWindowHint) # # self.setWindowFlags(Qt.FramelessWindowHint) self.center_on_show = True self._centered_on_initial_show = False if hasattr(self, "accepted"): self.accepted.connect(self.__accepted) if hasattr(self, "rejected"): self.rejected.connect(self.__rejected) # Add a keep-alive reference print("Adding window reference", self) windows.add(self) self.closed.connect(self.__closed) self.title_panel = None self.title_panel_visible = False if not native: self.real_window()._window = weakref.ref(self) from workspace.ui.theme import WorkspaceTheme from workspace.ui.window import WindowHeader if header: self.title_panel = WindowHeader( self.real_window(), menu=menu, minimizable=minimizable, maximizable=maximizable, separator=separator, closable=closable, background=color, ) self.title_panel_visible = True self.set_background_color( WorkspaceTheme.instance().window_background )
def __init__(self, parent, title="", border=True, minimizable=True, maximizable=True, separator=True, menu=False, native=None, header=True, below=False, closable=True, color=None, **_): init_qt() super().__init__() # if parent is None and len(default_window_parent) > 0: # parent = default_window_parent[-1] # print("using default parent", parent) # FIXME self._window = weakref.ref(self) if native is None: if fsboot.get("fws") == "1": native = False else: native = not _use_fws if native: self._real_window = RealWindow(QParent(parent, True), self, minimizable=minimizable, maximizable=maximizable, below=below, border=border) else: self._real_window = FwsWindow(QParent(parent, True), self, below=below) self._real_widget = RealWidget(self._real_window, self) # Widget.__init__(self, parent) # self.init_widget(parent) # MixinBase.__init__(self) self.set_title(title) self.layout = None self._size_specified = False self.close_listeners = [] # _windows.add(self) self.destroyed.connect(self.__destroyed) self._real_window.setAttribute(Qt.WA_DeleteOnClose, True) # if not border: # self.setWindowFlags(Qt.FramelessWindowHint | # Qt.NoDropShadowWindowHint) # # self.setWindowFlags(Qt.FramelessWindowHint) self.center_on_show = True self._centered_on_initial_show = False if hasattr(self, "accepted"): self.accepted.connect(self.__accepted) if hasattr(self, "rejected"): self.rejected.connect(self.__rejected) # Add a keep-alive reference print("Adding window reference", self) windows.add(self) self.closed.connect(self.__closed) self.title_panel = None self.title_panel_visible = False if not native: self.real_window()._window = weakref.ref(self) from workspace.ui.theme import WorkspaceTheme from workspace.ui.window import WindowHeader if header: self.title_panel = WindowHeader(self.real_window(), menu=menu, minimizable=minimizable, maximizable=maximizable, separator=separator, closable=closable, background=color) self.title_panel_visible = True self.set_background_color( WorkspaceTheme.instance().window_background)