From 2e1c5c070915a36a74519dfc5b95534970355d2a Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Wed, 5 Jan 2022 13:34:33 -0500 Subject: [PATCH 1/2] Clean up appearance of toggle buttons for template position Signed-off-by: Brianna Major --- hexrd/ui/resources/ui/llnl_import_tool_dialog.ui | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hexrd/ui/resources/ui/llnl_import_tool_dialog.ui b/hexrd/ui/resources/ui/llnl_import_tool_dialog.ui index 1c39e7c5d..9f2b79496 100644 --- a/hexrd/ui/resources/ui/llnl_import_tool_dialog.ui +++ b/hexrd/ui/resources/ui/llnl_import_tool_dialog.ui @@ -387,9 +387,9 @@ true - - true - + + positionOutlineButtons + @@ -403,6 +403,9 @@ true + + positionOutlineButtons + @@ -735,4 +738,7 @@ + + + From 11f4bf55b4a468287fd35358a41870b93e0504c6 Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Wed, 5 Jan 2022 15:28:55 -0500 Subject: [PATCH 2/2] Set window flags for dialogs Forces dialogs to remain in front of the main window on Mac. Signed-off-by: Brianna Major --- hexrd/ui/image_stack_dialog.py | 4 +++- hexrd/ui/llnl_import_tool_dialog.py | 5 ++++- hexrd/ui/simple_image_series_dialog.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hexrd/ui/image_stack_dialog.py b/hexrd/ui/image_stack_dialog.py index 965a9eb71..024d20c0d 100644 --- a/hexrd/ui/image_stack_dialog.py +++ b/hexrd/ui/image_stack_dialog.py @@ -2,7 +2,7 @@ import numpy as np from pathlib import Path -from PySide2.QtCore import QObject, Signal +from PySide2.QtCore import QObject, Signal, Qt from PySide2.QtWidgets import QFileDialog, QMessageBox, QTableWidgetItem from hexrd.ui.constants import MAXIMUM_OMEGA_RANGE @@ -20,6 +20,8 @@ def __init__(self, parent=None, simple_image_series_dialog=None): super(ImageStackDialog, self).__init__(parent) loader = UiLoader() self.ui = loader.load_file('image_stack_dialog.ui', parent) + flags = self.ui.windowFlags() + self.ui.setWindowFlags(flags | Qt.Tool) self.simple_image_series_dialog = simple_image_series_dialog self.detectors = HexrdConfig().detector_names diff --git a/hexrd/ui/llnl_import_tool_dialog.py b/hexrd/ui/llnl_import_tool_dialog.py index 87b0c73d8..3c217f181 100644 --- a/hexrd/ui/llnl_import_tool_dialog.py +++ b/hexrd/ui/llnl_import_tool_dialog.py @@ -4,7 +4,7 @@ import h5py from pathlib import Path -from PySide2.QtCore import QObject, Signal +from PySide2.QtCore import QObject, Signal, Qt from PySide2.QtWidgets import QColorDialog, QFileDialog, QMessageBox from PySide2.QtGui import QColor @@ -41,6 +41,9 @@ def __init__(self, cmap=None, parent=None): loader = UiLoader() self.ui = loader.load_file('llnl_import_tool_dialog.ui', parent) + flags = self.ui.windowFlags() + self.ui.setWindowFlags(flags | Qt.Tool) + self.it = None self.instrument = None self.edited_images = {} diff --git a/hexrd/ui/simple_image_series_dialog.py b/hexrd/ui/simple_image_series_dialog.py index d20ab8d0c..cc6c9e07e 100644 --- a/hexrd/ui/simple_image_series_dialog.py +++ b/hexrd/ui/simple_image_series_dialog.py @@ -34,6 +34,8 @@ def __init__(self, parent=None): loader = UiLoader() self.ui = loader.load_file('simple_image_series_dialog.ui', parent) + flags = self.ui.windowFlags() + self.ui.setWindowFlags(flags | Qt.Tool) self.update_config_variables()