Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions faststack/faststack/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ def load(self):
self.prefetcher.update_prefetch(self.current_index)
self.sync_ui_state()

theme = config.get('core', 'theme')
self.main_window.setProperty('isDarkTheme', theme == 'dark')

def refresh_image_list(self):
"""Rescans the directory for images."""
Expand Down Expand Up @@ -359,11 +357,12 @@ def main(image_dir: Optional[Path] = typer.Argument(None, help="Directory of ima
setup_logging()
log.info("Starting FastStack")

app = QApplication(sys.argv) # Moved here

if image_dir is None:
image_dir_str = config.get('core', 'default_directory')
if not image_dir_str:
log.warning("No image directory provided and no default directory set. Opening directory selection dialog.")
from PySide6.QtWidgets import QFileDialog
selected_dir = QFileDialog.getExistingDirectory(None, "Select Image Directory")
if not selected_dir:
log.error("No image directory selected. Exiting.")
Expand All @@ -374,8 +373,6 @@ def main(image_dir: Optional[Path] = typer.Argument(None, help="Directory of ima
if not image_dir.is_dir():
log.error(f"Image directory not found: {image_dir}")
sys.exit(1)

app = QApplication(sys.argv)
app.setOrganizationName("FastStack")
app.setOrganizationDomain("faststack.dev")
app.setApplicationName("FastStack")
Expand Down