-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imgui Docking #598
Imgui Docking #598
Conversation
…from it. This makes it easier to modify common behaviour. The base class implements the function show() while the derived classes implement show_content(). This makes it possible to easily render the content into e.g a collapsing header or a free window.
- show(): Moved show_content() behind isHovered check
Removed superfluous ImGui::End in parameters widget. transform_to_system_frame(), now respects reduced size of spin widget if sidebar is present.
…ut it in WidgetBase
Codecov Report
@@ Coverage Diff @@
## develop #598 +/- ##
===========================================
- Coverage 48.00% 47.99% -0.01%
===========================================
Files 72 72
Lines 11249 11251 +2
===========================================
Hits 5400 5400
- Misses 5849 5851 +2 |
In order to determine whether any windows are docked into the right-side dock-space, one could use the imgui-internal APIs: for( const auto * w : spirit_widgets )
{
if( w->imgui_window_ptr )
{
if( w->imgui_window_ptr->DockNode )
{
ImGuiDockNode * node = w->imgui_window_ptr->DockNode;
ImGuiDockNode * parent = node->ParentNode;
while( parent )
{
node = parent;
parent = node->ParentNode;
}
if( node->ID == id_dockspace_right )
fmt::print( "{} is docked in the sidebar\n", w->title );
}
}
} for which the For some reason, it also seems that the evaluation of |
Now, the root docking node id is compared to the id of the sidebar to correctly detect if a window is docked somewhere inside. Also applied formatting fixes.
…form_to_system_frame`.
…indows metafile clang on windows complained about version delimited with ".", now they are delimited with "-", i.e. 2.1.1 -> 2-1-1.
The docking now works as one would expect. Made the dock background transparent when nothing is docked, instead of the empty docking bar moving around the rendering contents. Also applied some minor fixes around the place. Co-authored-by: MSallermann <[email protected]>
e0675ac
to
de6a56b
Compare
- sidebar height was too large - rendering layout was too large when docking on the left
Also added F12 keyboard shortcut for screenshot.
This applies the last used configuration again. This sometimes comes in handy, for example when using the same starting point for several images when generating a chain.
Implemented a few of the feature-parity points from issue #600. |
Also some other minor fixes.
When de-activating and re-activating renderers, all renderers' colormaps were reset to HSV. This was apparently due to the view being assigned this colormap. Also made the colormap cardinal axis gizmo smaller.
The default is now 3 and the maximum is 5. This seems a reasonable range where a value of 3 is already visually fine in most cases.
Uses the imgui docking branch to enhance the imgui version of spirit.