SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
uiscrollhelpers.h File Reference

Shared helper for the "content scrolls, dialog shrinks" pattern. More...

#include <QFrame>
#include <QScrollArea>
#include <QWidget>
Include dependency graph for uiscrollhelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Ui
 

Functions

QScrollArea * OpenSWMM::Ui::wrapInScrollArea (QWidget *content, QWidget *parent=nullptr)
 Wrap content in a frameless, resizable QScrollArea.
 

Variables

constexpr int OpenSWMM::Ui::kSpinMinWidthPx = 110
 
constexpr int OpenSWMM::Ui::kComboMinWidthPx = 140
 

Detailed Description

Shared helper for the "content scrolls, dialog shrinks" pattern.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later
    Properties / styling panels build their controls into a plain
    QVBoxLayout, so when the dock or dialog is dragged below the content's
    natural size Qt squeezes the children (zero-width combos, clipped
    labels). Wrapping the content in a frameless, resizable QScrollArea
    lets the content hold its minimum size and scroll instead — matching
    layerstylingdock.cpp and swmm2dresultsstylepanel.cpp, which already
    do this. One helper, reused, rather than re-deriving the lambda.