Skip to content

Commit

Permalink
Remove about button from help panel
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Jan 3, 2024
1 parent d520ab2 commit 4dfc6e0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
17 changes: 0 additions & 17 deletions src/ert/gui/suggestor/suggestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
QWidget,
)

from ert.gui.about_dialog import AboutDialog

from ._colors import BLUE_TEXT
from ._suggestor_message import SuggestorMessage

Expand All @@ -30,12 +28,6 @@ def _clicked_help_button(menu_label: str, link: str):
webbrowser.open(link)


def _clicked_about_button(about_dialog):
logger = logging.getLogger(__name__)
logger.info("Pressed help button About")
about_dialog.show()


LIGHT_GREY = "#f7f7f7"
MEDIUM_GREY = "#eaeaea"
HEAVY_GREY = "#dcdcdc"
Expand Down Expand Up @@ -175,15 +167,6 @@ def _help_panel(self, help_links: Dict[str, str]):
)
help_buttons_layout.addWidget(button)

about_button = QPushButton("About", parent=self)
about_button.setStyleSheet(LINK_STYLE)
about_button.setCursor(QCursor(Qt.CursorShape.PointingHandCursor))
about_button.setObjectName("about_button")
help_buttons_layout.addWidget(about_button)
help_buttons_layout.addStretch(-1)

diag = AboutDialog(self)
about_button.clicked.connect(lambda: _clicked_about_button(diag))
return help_button_frame

def _problem_area(self, errors, warnings, deprecations):
Expand Down
10 changes: 0 additions & 10 deletions tests/unit_tests/gui/test_main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ def test_help_buttons_in_suggester_dialog(tmp_path, qtbot):
"""
WHEN I am shown an error in the gui
THEN the suggester gui comes up
AND I can find the version of ert by opening the about panel
AND go to github to submit an issue by clicking a button.
"""
config_file = tmp_path / "config.ert"
Expand All @@ -308,15 +307,6 @@ def test_help_buttons_in_suggester_dialog(tmp_path, qtbot):
)
assert isinstance(gui, Suggestor)

about_button = get_child(gui, QWidget, name="about_button")
qtbot.mouseClick(about_button, Qt.LeftButton)

help_dialog = get_child(gui, AboutDialog)
assert help_dialog.windowTitle() == "About"

about_close_button = get_child(help_dialog, QWidget, name="close_button")
qtbot.mouseClick(about_close_button, Qt.LeftButton)

with patch("webbrowser.open", MagicMock(return_value=True)) as browser_open:
github_button = get_child(gui, QWidget, name="GitHub page")
qtbot.mouseClick(github_button, Qt.LeftButton)
Expand Down

0 comments on commit 4dfc6e0

Please sign in to comment.