Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/bigocrpdf/ui/image_ocr_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __init__(
default_height=height,
)

self.add_css_class("bigocrimage")
self.set_title("Big Image OCR")
self.set_icon_name("bigocrimage")

Expand Down
1 change: 1 addition & 0 deletions src/bigocrpdf/ui/pdf_editor/editor_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def __init__(
standalone: If True, show Save As button instead of Apply
"""
super().__init__(application=application)
self.add_css_class("bigocrpdf-editor")

self._help = EditorHelpController(self)
self._tools = EditorToolsController(self)
Expand Down
2 changes: 1 addition & 1 deletion src/bigocrpdf/utils/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
DEFAULT_CONFIG: Final[dict[str, Any]] = {
"version": 1,
"window": {
"width": 820,
"width": 960, # Keep the sidebar expanded at the default text scale.
"height": 600,
},
"ocr": {
Expand Down
4 changes: 3 additions & 1 deletion src/bigocrpdf/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def __init__(
default_height=height,
)

# The sidebar overlays the content below the 700 sp breakpoint, so the
self.add_css_class("bigocrpdf")

# The sidebar overlays the content in compact mode, so the
# minimum must describe the collapsed content instead of both panes.
self.set_size_request(640, 400)

Expand Down
8 changes: 8 additions & 0 deletions tests/test_config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@


class TestConfigManager:
def test_default_window_width_and_saved_override(self, tmp_path):
manager = ConfigManager(str(tmp_path / "config.json"))
assert manager.get("window.width") == 960

Check warning on line 18 in tests/test_config_manager.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

tests/test_config_manager.py#L18

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

manager.set("window.width", 820)
restored = ConfigManager(str(tmp_path / "config.json"))
assert restored.get("window.width") == 820

Check warning on line 22 in tests/test_config_manager.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

tests/test_config_manager.py#L22

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.

def _make_manager(self, tmp_dir, initial=None):
path = os.path.join(tmp_dir, "config.json")
if initial:
Expand Down
Loading