| 145 | } |
| 146 | |
| 147 | void Widget::SetFrameGeometry(const Rect& geometry) |
| 148 | { |
| 149 | if (Type == WidgetType::Child) |
| 150 | { |
| 151 | FrameGeometry = geometry; |
| 152 | double left = FrameGeometry.left() + Noncontent.Left; |
| 153 | double top = FrameGeometry.top() + Noncontent.Top; |
| 154 | double right = FrameGeometry.right() - Noncontent.Right; |
| 155 | double bottom = FrameGeometry.bottom() - Noncontent.Bottom; |
| 156 | left = std::min(left, FrameGeometry.right()); |
| 157 | top = std::min(top, FrameGeometry.bottom()); |
| 158 | right = std::max(right, FrameGeometry.left()); |
| 159 | bottom = std::max(bottom, FrameGeometry.top()); |
| 160 | ContentGeometry = Rect::ltrb(left, top, right, bottom); |
| 161 | OnGeometryChanged(); |
| 162 | } |
| 163 | else |
| 164 | { |
| 165 | DispWindow->SetWindowFrame(geometry); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | void Widget::Show() |
| 170 | { |
no test coverage detected