Cleanup: UI: Follow Using this-> code style in recent uiLayout refactors
This changes removes `this->` when accessing data member with trailing underscore and adds `this->` to member methods. Pull Request: https://projects.blender.org/blender/blender/pulls/138564
This commit is contained in:
committed by
Hans Goudey
parent
3a2d4d151f
commit
60fdcb2d20
@@ -4955,9 +4955,9 @@ uiLayout &uiLayout::row(bool align)
|
||||
ui_litem_init_from_parent(litem, this, align);
|
||||
|
||||
litem->type_ = uiItemType::LayoutRow;
|
||||
litem->space_ = (align) ? 0 : this->root_->style->buttonspacex;
|
||||
litem->space_ = (align) ? 0 : root_->style->buttonspacex;
|
||||
|
||||
UI_block_layout_set_current(this->root_->block, litem);
|
||||
UI_block_layout_set_current(root_->block, litem);
|
||||
|
||||
return *litem;
|
||||
}
|
||||
@@ -5014,7 +5014,7 @@ PanelLayout uiLayout::panel_prop_with_bool_header(const bContext *C,
|
||||
const StringRefNull bool_prop_name,
|
||||
const std::optional<StringRefNull> label)
|
||||
{
|
||||
PanelLayout panel_layout = panel_prop(C, open_prop_owner, open_prop_name);
|
||||
PanelLayout panel_layout = this->panel_prop(C, open_prop_owner, open_prop_name);
|
||||
|
||||
uiLayout *panel_header = panel_layout.header;
|
||||
panel_header->flag_ &= ~(uiItemInternalFlag::PropSep | uiItemInternalFlag::PropDecorate |
|
||||
@@ -5029,7 +5029,7 @@ uiLayout *uiLayout::panel_prop(const bContext *C,
|
||||
const StringRefNull open_prop_name,
|
||||
const StringRef label)
|
||||
{
|
||||
PanelLayout panel_layout = panel_prop(C, open_prop_owner, open_prop_name);
|
||||
PanelLayout panel_layout = this->panel_prop(C, open_prop_owner, open_prop_name);
|
||||
uiItemL(panel_layout.header, label, ICON_NONE);
|
||||
|
||||
return panel_layout.body;
|
||||
@@ -5044,7 +5044,7 @@ PanelLayout uiLayout::panel(const bContext *C, const StringRef idname, const boo
|
||||
root_panel, idname, default_closed);
|
||||
PointerRNA state_ptr = RNA_pointer_create_discrete(nullptr, &RNA_LayoutPanelState, state);
|
||||
|
||||
return panel_prop(C, &state_ptr, "is_open");
|
||||
return this->panel_prop(C, &state_ptr, "is_open");
|
||||
}
|
||||
|
||||
uiLayout *uiLayout::panel(const bContext *C,
|
||||
@@ -5052,7 +5052,7 @@ uiLayout *uiLayout::panel(const bContext *C,
|
||||
const bool default_closed,
|
||||
const StringRef label)
|
||||
{
|
||||
PanelLayout panel_layout = panel(C, idname, default_closed);
|
||||
PanelLayout panel_layout = this->panel(C, idname, default_closed);
|
||||
uiItemL(panel_layout.header, label, ICON_NONE);
|
||||
|
||||
return panel_layout.body;
|
||||
@@ -5069,7 +5069,7 @@ bool uiLayoutEndsWithPanelHeader(const uiLayout &layout)
|
||||
|
||||
uiLayout &uiLayout::row(bool align, const StringRef heading)
|
||||
{
|
||||
uiLayout &litem = row(align);
|
||||
uiLayout &litem = this->row(align);
|
||||
ui_layout_heading_set(&litem, heading);
|
||||
return litem;
|
||||
}
|
||||
@@ -5080,16 +5080,16 @@ uiLayout &uiLayout::column(bool align)
|
||||
ui_litem_init_from_parent(litem, this, align);
|
||||
|
||||
litem->type_ = uiItemType::LayoutColumn;
|
||||
litem->space_ = (align) ? 0 : this->root_->style->buttonspacey;
|
||||
litem->space_ = (align) ? 0 : root_->style->buttonspacey;
|
||||
|
||||
UI_block_layout_set_current(this->root_->block, litem);
|
||||
UI_block_layout_set_current(root_->block, litem);
|
||||
|
||||
return *litem;
|
||||
}
|
||||
|
||||
uiLayout &uiLayout::column(bool align, const StringRef heading)
|
||||
{
|
||||
uiLayout &litem = column(align);
|
||||
uiLayout &litem = this->column(align);
|
||||
ui_layout_heading_set(&litem, heading);
|
||||
return litem;
|
||||
}
|
||||
@@ -5100,10 +5100,10 @@ uiLayout &uiLayout::column_flow(int number, bool align)
|
||||
ui_litem_init_from_parent(flow, this, align);
|
||||
|
||||
flow->type_ = uiItemType::LayoutColumnFlow;
|
||||
flow->space_ = (flow->align_) ? 0 : this->root_->style->columnspace;
|
||||
flow->space_ = (flow->align_) ? 0 : root_->style->columnspace;
|
||||
flow->number = number;
|
||||
|
||||
UI_block_layout_set_current(this->root_->block, flow);
|
||||
UI_block_layout_set_current(root_->block, flow);
|
||||
|
||||
return *flow;
|
||||
}
|
||||
@@ -5115,13 +5115,13 @@ uiLayout &uiLayout::grid_flow(
|
||||
flow->type_ = uiItemType::LayoutGridFlow;
|
||||
ui_litem_init_from_parent(flow, this, align);
|
||||
|
||||
flow->space_ = (flow->align_) ? 0 : this->root_->style->columnspace;
|
||||
flow->space_ = (flow->align_) ? 0 : root_->style->columnspace;
|
||||
flow->row_major = row_major;
|
||||
flow->columns_len = columns_len;
|
||||
flow->even_columns = even_columns;
|
||||
flow->even_rows = even_rows;
|
||||
|
||||
UI_block_layout_set_current(this->root_->block, flow);
|
||||
UI_block_layout_set_current(root_->block, flow);
|
||||
|
||||
return *flow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user