MCPcopy Create free account
hub / github.com/MyGUI/mygui / notifyChangeWidth

Method notifyChangeWidth

Tools/LayoutEditor/PanelUserData.cpp:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 }
74
75 void PanelUserData::notifyChangeWidth(int _width)
76 {
77 int width = mMainWidget->getClientCoord().width;
78
79 int half_width = (width - (mEditLeft + mEditRight + mEditSpace)) / 2;
80 mEditKey->setSize(half_width, mEditKey->getHeight());
81 mEditValue->setCoord(
82 mEditKey->getRight() + mEditSpace,
83 mEditValue->getTop(),
84 width - (mEditKey->getRight() + mEditSpace + mEditRight),
85 mEditValue->getHeight());
86
87 half_width = (width - (mButtonLeft + mButtonRight + mButtonSpace)) / 2;
88 mButtonAdd->setSize(half_width, mButtonAdd->getHeight());
89 mButtonDelete->setCoord(
90 mButtonAdd->getRight() + mButtonSpace,
91 mButtonDelete->getTop(),
92 width - (mButtonAdd->getRight() + mButtonSpace + mButtonRight),
93 mButtonDelete->getHeight());
94 }
95
96 void PanelUserData::notifyAddUserData(MyGUI::Widget* _sender)
97 {

Callers

nothing calls this directly

Calls 5

getClientCoordMethod · 0.80
getTopMethod · 0.80
setSizeMethod · 0.45
getHeightMethod · 0.45
setCoordMethod · 0.45

Tested by

no test coverage detected