diff --git a/rare/components/tabs/games/game_info/game_settings.py b/rare/components/tabs/games/game_info/game_settings.py index 3461c764..38413b6d 100644 --- a/rare/components/tabs/games/game_info/game_settings.py +++ b/rare/components/tabs/games/game_info/game_settings.py @@ -85,10 +85,10 @@ class GameLaunchSettings(LaunchSettingsBase): if self.igame: self.offline_combo.setEnabled(self.igame.can_run_offline) - self.override_exe_edit.set_root(self.igame.install_path) + self.override_exe_edit.setRootPath(self.igame.install_path) else: self.offline_combo.setEnabled(False) - self.override_exe_edit.set_root("") + self.override_exe_edit.setRootPath(os.path.expanduser("~/")) launch_params = config.get_option(self.app_name, "start_params", "") self.launch_params_edit.setText(launch_params) diff --git a/rare/resources/stylesheets/ChildOfMetropolis/__init__.py b/rare/resources/stylesheets/ChildOfMetropolis/__init__.py index 592d3dda..7f9596ba 100644 Binary files a/rare/resources/stylesheets/ChildOfMetropolis/__init__.py and b/rare/resources/stylesheets/ChildOfMetropolis/__init__.py differ diff --git a/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss b/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss index d9ea0f3a..9f22f1d4 100644 --- a/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss +++ b/rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss @@ -271,6 +271,12 @@ QTableView { alternate-background-color: #BCBEBF; } +QListView QLineEdit, +QTreeView QLineEdit, +QTableView QLineEdit { + padding: 0px; +} + QListView::item, QTreeView::item { margin-right: 1px; diff --git a/rare/resources/stylesheets/RareStyle/__init__.py b/rare/resources/stylesheets/RareStyle/__init__.py index cf9bfd6e..0b909452 100644 Binary files a/rare/resources/stylesheets/RareStyle/__init__.py and b/rare/resources/stylesheets/RareStyle/__init__.py differ diff --git a/rare/resources/stylesheets/RareStyle/stylesheet.qss b/rare/resources/stylesheets/RareStyle/stylesheet.qss index ea905143..62bbb553 100644 --- a/rare/resources/stylesheets/RareStyle/stylesheet.qss +++ b/rare/resources/stylesheets/RareStyle/stylesheet.qss @@ -105,7 +105,8 @@ QSpinBox, QDoubleSpinBox, QProgressBar, QPushButton { - min-height: 1.30em; + /* min-height: 1.30em; */ + min-height: 18px; } QLineEdit, QTextEdit @@ -115,10 +116,12 @@ QDateTimeEdit, QSpinBox, QDoubleSpinBox, QProgressBar { - max-height: 1.30em; + /* max-height: 1.30em; */ + max-height: 18px; } QToolButton { - min-height: 1.10em; + /* min-height: 1.10em; */ + min-height: 15px; } QFrame[frameShape="0"] { @@ -271,6 +274,12 @@ QTableView { alternate-background-color: rgb( 40, 42, 46); } +QListView QLineEdit, +QTreeView QLineEdit, +QTableView QLineEdit { + padding: 0px; +} + QListView::item, QTreeView::item { margin-right: 1px; diff --git a/rare/utils/compat/steam.py b/rare/utils/compat/steam.py index 624d5539..ec4428c4 100644 --- a/rare/utils/compat/steam.py +++ b/rare/utils/compat/steam.py @@ -16,11 +16,12 @@ logger = getLogger("Proton") steam_compat_client_install_paths = [os.path.expanduser("~/.local/share/Steam")] -def find_steam() -> str: +def find_steam() -> Optional[str]: # return the first valid path for path in steam_compat_client_install_paths: if os.path.isdir(path) and os.path.isfile(os.path.join(path, "steam.sh")): return path + return None def find_libraries(steam_path: str) -> Set[str]: @@ -306,7 +307,11 @@ def get_steam_environment( def find_tools() -> List[Union[ProtonTool, CompatibilityTool]]: steam_path = find_steam() - logger.debug("Using Steam install in %s", steam_path) + if steam_path is None: + logger.info("Steam could not be found") + return [] + logger.info("Found Steam in %s", steam_path) + steam_libraries = find_libraries(steam_path) logger.debug("Searching for tools in libraries:") logger.debug("%s", steam_libraries) diff --git a/rare/widgets/indicator_edit.py b/rare/widgets/indicator_edit.py index 0255069a..6b0e7338 100644 --- a/rare/widgets/indicator_edit.py +++ b/rare/widgets/indicator_edit.py @@ -317,13 +317,13 @@ class PathEdit(IndicatorLineEdit): self.path_select.clicked.connect(self.__set_path) - def set_root(self, path: str): + def setRootPath(self, path: str): self.__root_path = path self.__completer_model.setRootPath(path) def __set_path(self): dlg_path = self.line_edit.text() - if not dlg_path: + if not dlg_path or not os.path.isabs(dlg_path): dlg_path = self.__root_path dlg = QFileDialog(self, self.tr("Choose path"), dlg_path) dlg.setOption(QFileDialog.DontUseCustomDirectoryIcons)