Skip to content

Commit 0c0f562

Browse files
committed
Fix Toolbutton stylesheets and menu
1 parent 25d6044 commit 0c0f562

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/ert/gui/main_window.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@
3636

3737
BUTTON_STYLE_SHEET: str = """
3838
QToolButton {
39-
border-radius: 10px;
40-
background-color: rgba(255, 255, 255, 0);
41-
padding-top: 5px;
42-
padding-bottom: 10px;
39+
border-radius: 10px;
40+
background-color: rgba(255, 255, 255, 0);
41+
padding-top: 5px;
42+
padding-bottom: 10px;
4343
}
4444
QToolButton:hover {
45-
background-color: rgba(50, 50, 50, 90);
45+
background-color: rgba(50, 50, 50, 90);
46+
}
47+
QToolButton::menu-indicator {
48+
right: 10px; bottom: 5px;
4649
}
4750
"""
4851

@@ -167,6 +170,7 @@ def add_sim_run_option(datetime: str) -> None:
167170
# swap from button to menu selection
168171
self.results_button.clicked.disconnect(self.select_central_widget)
169172
self.results_button.setMenu(QMenu())
173+
self.results_button.setPopupMode(QToolButton.InstantPopup)
170174

171175
for prev_date_time, widget in self.central_panels_map.items():
172176
if isinstance(widget, RunDialog):

0 commit comments

Comments
 (0)