This commit is contained in:
hippoz 2022-06-10 20:28:03 +03:00
parent 94c0be051b
commit bfe126ab3c
Signed by: hippoz
GPG key ID: 7C52899193467641
3 changed files with 3 additions and 3 deletions

View file

@ -121,7 +121,7 @@ void Widget::handle_repaint_rect(RepaintRectEvent &event) {
cr->save();
// clip this widget. this ensuers that the background fill or children won't overflow the bounds of it
// clip this widget. this ensures that the background fill or children won't overflow the bounds of it
painter.rounded_rectangle(m_current_geometry, m_background_border_radius);
cr->clip();

View file

@ -82,7 +82,6 @@ void Window::repaint(Box geometry) {
}
void Window::repaint(Widget *target) {
std::cout << target->window_relative().x() << ", " << target->window_relative().y() << std::endl;
repaint(target->current_geometry().offset(target->window_relative().x(), target->window_relative().y()));
}

View file

@ -17,9 +17,10 @@ int main() {
window.spawn_window();
auto main_widget = window.set_main_widget<Raven::Widget>();
main_widget->set_layout<Raven::DocumentLayout>(10.0);
auto second_widget = main_widget->add<Raven::Widget>();
second_widget->set_layout<Raven::DocumentLayout>(16.0);
second_widget->set_layout<Raven::DocumentLayout>(20.0);
second_widget->resize(800, 800);
auto inner_widget = second_widget->add<Raven::Widget>();