widgets/wrapper: default resizeChild to true
Better reflects how wrapper types are used 99% of the time.
This commit is contained in:
parent
c5b7c11c10
commit
88aea35087
6 changed files with 7 additions and 6 deletions
|
@ -118,6 +118,7 @@ PanelWindow {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: palette.active.window
|
color: palette.active.window
|
||||||
border.color: root.failed ? "#b53030" : palette.active.accent
|
border.color: root.failed ? "#b53030" : palette.active.accent
|
||||||
|
border.width: 1
|
||||||
|
|
||||||
radius: 10
|
radius: 10
|
||||||
margin: 10
|
margin: 10
|
||||||
|
|
|
@ -39,7 +39,7 @@ ClippingRectangle {
|
||||||
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
||||||
property /*real*/alias rightMargin: manager.rightMargin
|
property /*real*/alias rightMargin: manager.rightMargin
|
||||||
/// Determines if child item should be resized larger than its implicit size if
|
/// 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
|
property /*bool*/alias resizeChild: manager.resizeChild
|
||||||
/// Overrides the implicit width of the wrapper.
|
/// Overrides the implicit width of the wrapper.
|
||||||
///
|
///
|
||||||
|
|
|
@ -53,7 +53,7 @@ Item {
|
||||||
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
||||||
property /*real*/alias rightMargin: manager.rightMargin
|
property /*real*/alias rightMargin: manager.rightMargin
|
||||||
/// Determines if child item should be resized larger than its implicit size if
|
/// 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
|
property /*bool*/alias resizeChild: manager.resizeChild
|
||||||
/// Overrides the implicit width of the wrapper.
|
/// Overrides the implicit width of the wrapper.
|
||||||
///
|
///
|
||||||
|
|
|
@ -41,7 +41,7 @@ MouseArea {
|
||||||
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
||||||
property /*real*/alias rightMargin: manager.rightMargin
|
property /*real*/alias rightMargin: manager.rightMargin
|
||||||
/// Determines if child item should be resized larger than its implicit size if
|
/// 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
|
property /*bool*/alias resizeChild: manager.resizeChild
|
||||||
/// Overrides the implicit width of the wrapper.
|
/// Overrides the implicit width of the wrapper.
|
||||||
///
|
///
|
||||||
|
|
|
@ -43,7 +43,7 @@ Rectangle {
|
||||||
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
||||||
property /*real*/alias rightMargin: manager.rightMargin
|
property /*real*/alias rightMargin: manager.rightMargin
|
||||||
/// Determines if child item should be resized larger than its implicit size if
|
/// 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
|
property /*bool*/alias resizeChild: manager.resizeChild
|
||||||
/// Overrides the implicit width of the wrapper.
|
/// Overrides the implicit width of the wrapper.
|
||||||
///
|
///
|
||||||
|
|
|
@ -68,7 +68,7 @@ class MarginWrapperManager: public WrapperManager {
|
||||||
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
/// Defaults to @@margin, and may be reset by assigning `undefined`.
|
||||||
Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin RESET resetRightMargin NOTIFY rightMarginChanged FINAL);
|
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
|
/// 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);
|
Q_PROPERTY(bool resizeChild READ default WRITE default BINDABLE bindableResizeChild NOTIFY resizeChildChanged FINAL);
|
||||||
/// Overrides the implicit width of the wrapper.
|
/// Overrides the implicit width of the wrapper.
|
||||||
///
|
///
|
||||||
|
@ -170,7 +170,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// clang-format off
|
// 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, bMargin, &MarginWrapperManager::marginChanged);
|
||||||
Q_OBJECT_BINDABLE_PROPERTY(MarginWrapperManager, qreal, bExtraMargin, &MarginWrapperManager::baseMarginChanged);
|
Q_OBJECT_BINDABLE_PROPERTY(MarginWrapperManager, qreal, bExtraMargin, &MarginWrapperManager::baseMarginChanged);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue