diff --git a/src/kstruct/ui/main_window.py b/src/kstruct/ui/main_window.py index 5094f72..3761cb5 100644 --- a/src/kstruct/ui/main_window.py +++ b/src/kstruct/ui/main_window.py @@ -461,8 +461,6 @@ def action(text, slot, key=None, shortcut=None, icon=None, icon_only=False): self.recent_menu.aboutToShow.connect(self._fill_recent_menu) self.recent_button.setMenu(self.recent_menu) bar.addWidget(self.recent_button) - bar.addSeparator() - action(tr("화면 맞춤"), self.viewer.fit, "view.fit", "F", "fit") spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred) diff --git a/src/kstruct/ui/viewer.py b/src/kstruct/ui/viewer.py index cdab498..1e3cf97 100644 --- a/src/kstruct/ui/viewer.py +++ b/src/kstruct/ui/viewer.py @@ -183,6 +183,9 @@ def act(text, slot, key, shortcut=None, checkable=False) -> QAction: button.setMenu(views) button.setPopupMode(QToolButton.ToolButtonPopupMode.InstantPopup) strip.addWidget(button) + # (here rather than in the window's tool bar, which overflowed at 1280 px on Windows) + self.fit_action = act(tr("화면 맞춤"), self.fit, "view.fit", "F") + strip.addAction(self.fit_action) self.see_through_action = act( tr("반투명"), self.set_see_through, "view.see_through", checkable=True ) diff --git a/tests/test_layout.py b/tests/test_layout.py index bc4a467..e17b1b3 100644 --- a/tests/test_layout.py +++ b/tests/test_layout.py @@ -76,6 +76,9 @@ def _clipped(panel) -> list[str]: def test_nothing_is_cut_off_at_1280x720(qtbot, language): window = _solved_window(qtbot) + if window.width() < WIDTH: # e.g. a CI desktop of 1024x768: the window cannot be 1280 + window.viewer.shutdown() + pytest.skip(f"screen narrower than {WIDTH} px (window is {window.width()} px)") problems = [] for step, panel in enumerate(window.panels): window._go(step)