1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibGUI: Allow widgets to clip their child widgets

This patch adds Widget::children_clip_rect() which can be overridden
to tighten clipping of a widget's children. The default implementation
simply returns Widget::rect().
This commit is contained in:
Andreas Kling 2020-08-25 21:24:45 +02:00
parent 965ccf5242
commit a265d40d6e
2 changed files with 9 additions and 1 deletions

View file

@ -274,6 +274,8 @@ public:
void set_accepts_emoji_input(bool b) { m_accepts_emoji_input = b; }
bool accepts_emoji_input() const { return m_accepts_emoji_input; }
virtual Gfx::IntRect children_clip_rect() const;
protected:
Widget();