enh(ui): don't apply Qt::WindowStaysOnTopHint by default
Description
Current application configuration seems to apply Qt::WindowStaysOnTopHint
on ALL windows.
It means you cannot reduce any application or any tool window opened by one (SightViewer itself, its transfer function editor, etc.). That's not really something a behaviour I would expect for "built-in" apps.
Proposal
I suggest to NOT specify STAY_ON_TOP
in any of the base configurations.
Occurrences of the flag (according to grep
are the following):
sight$ grep -r "STAY"
activities/io/dicom/rc/configurations/PacsConfigurationManager.xml: <style mode="STAY_ON_TOP" />
libs/ui/qt/layoutManager/FrameLayoutManager.cpp: if(frameInfo.m_style == ui::base::layoutManager::IFrameLayoutManager::STAY_ON_TOP)
libs/ui/base/layoutManager/IFrameLayoutManager.cpp: else if(style == "STAY_ON_TOP")
libs/ui/base/layoutManager/IFrameLayoutManager.cpp: m_frameInfo.m_style = STAY_ON_TOP;
libs/ui/base/layoutManager/IFrameLayoutManager.cpp: SIGHT_FATAL("The style " << style << " is unknown, it should be DEFAULT, STAY_ON_TOP or MODAL.");
libs/ui/base/layoutManager/IFrameLayoutManager.hpp: STAY_ON_TOP,
libs/ui/base/IFrame.hpp: * Allowed values are MODAL, STAY_ON_TOP and DEFAULT (default value).
configs/ui/dataManager/rc/configurations/ModelSeriesManagerWindow.xml: <style mode="STAY_ON_TOP" />
configs/viz/scene3d/rc/configurations/TransferFunctionManagerWindow.xml: <style mode="STAY_ON_TOP" />
What's strange is that nothing but the XML
and libs/ui/base/layoutManager/IFrameLayoutManager.cpp
seem to be meant to affect that. Which means it's probably not intentional SightViewer cannot be reduced. That should be investigated.
Functional specifications
- Allow Sight-based applications to have a meaningful
Minimise
button. - Allow application-specific windows to also have the same behaviour.
Technical specifications
- Remove
<style mode="STAY_ON_TOP" />
in the XML. - Investigate why "main" windows are affected to.
Test plan
First manual tests, then check if recent API dedicated to UI testing manages that properly.