widgets/wrapper: default resizeChild to true

Better reflects how wrapper types are used 99% of the time.
This commit is contained in:
outfoxxed 2025-05-16 00:11:09 -07:00
parent c5b7c11c10
commit 88aea35087
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
6 changed files with 7 additions and 6 deletions

View file

@ -118,6 +118,7 @@ PanelWindow {
anchors.fill: parent
color: palette.active.window
border.color: root.failed ? "#b53030" : palette.active.accent
border.width: 1
radius: 10
margin: 10

View file

@ -39,7 +39,7 @@ ClippingRectangle {
/// Defaults to @@margin, and may be reset by assigning `undefined`.
property /*real*/alias rightMargin: manager.rightMargin
/// Determines if child item should be resized larger than its implicit size if
/// the parent is resized larger than its implicit size. Defaults to false.
/// the parent is resized larger than its implicit size. Defaults to true.
property /*bool*/alias resizeChild: manager.resizeChild
/// Overrides the implicit width of the wrapper.
///

View file

@ -53,7 +53,7 @@ Item {
/// Defaults to @@margin, and may be reset by assigning `undefined`.
property /*real*/alias rightMargin: manager.rightMargin
/// Determines if child item should be resized larger than its implicit size if
/// the parent is resized larger than its implicit size. Defaults to false.
/// the parent is resized larger than its implicit size. Defaults to true.
property /*bool*/alias resizeChild: manager.resizeChild
/// Overrides the implicit width of the wrapper.
///

View file

@ -41,7 +41,7 @@ MouseArea {
/// Defaults to @@margin, and may be reset by assigning `undefined`.
property /*real*/alias rightMargin: manager.rightMargin
/// Determines if child item should be resized larger than its implicit size if
/// the parent is resized larger than its implicit size. Defaults to false.
/// the parent is resized larger than its implicit size. Defaults to true.
property /*bool*/alias resizeChild: manager.resizeChild
/// Overrides the implicit width of the wrapper.
///

View file

@ -43,7 +43,7 @@ Rectangle {
/// Defaults to @@margin, and may be reset by assigning `undefined`.
property /*real*/alias rightMargin: manager.rightMargin
/// Determines if child item should be resized larger than its implicit size if
/// the parent is resized larger than its implicit size. Defaults to false.
/// the parent is resized larger than its implicit size. Defaults to true.
property /*bool*/alias resizeChild: manager.resizeChild
/// Overrides the implicit width of the wrapper.
///

View file

@ -68,7 +68,7 @@ class MarginWrapperManager: public WrapperManager {
/// Defaults to @@margin, and may be reset by assigning `undefined`.
Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin RESET resetRightMargin NOTIFY rightMarginChanged FINAL);
/// Determines if child item should be resized larger than its implicit size if
/// the parent is resized larger than its implicit size. Defaults to false.
/// the parent is resized larger than its implicit size. Defaults to true.
Q_PROPERTY(bool resizeChild READ default WRITE default BINDABLE bindableResizeChild NOTIFY resizeChildChanged FINAL);
/// Overrides the implicit width of the wrapper.
///
@ -170,7 +170,7 @@ protected:
private:
// clang-format off
Q_OBJECT_BINDABLE_PROPERTY(MarginWrapperManager, bool, bResizeChild);
Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(MarginWrapperManager, bool, bResizeChild, true);
Q_OBJECT_BINDABLE_PROPERTY(MarginWrapperManager, qreal, bMargin, &MarginWrapperManager::marginChanged);
Q_OBJECT_BINDABLE_PROPERTY(MarginWrapperManager, qreal, bExtraMargin, &MarginWrapperManager::baseMarginChanged);