summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Frame.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-24 18:55:29 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-24 19:05:02 +0200
commit42f0b2522b6e24e0269265597cebfda9f0b7b329 (patch)
treeccdabd18cf6bee50fde21912d2204cfff4394728 /Libraries/LibGUI/Frame.h
parent9badcff1bab051e0dfb50d6dd9c7775a4f1d3af3 (diff)
downloadserenity-42f0b2522b6e24e0269265597cebfda9f0b7b329.zip
LibGUI: Introduce widget content margins + improve splitters
A GUI::Widget can now set an optional content margin (4x0 by default.) Pixels in the content margin will be ignored for hit testing purposes. Use this to allow frame-like widgets (like GUI::Frame!) to ignore any mouse events in the frame area, and instead let those go to parent. This allows GUI::Splitter to react "sooner" to mouse events that were previously swallowed by the child widgets instead of ending up in the splitter. The net effect is that 2 more pixels on each side of a splitter handle are now interactive and usable for splitting! :^)
Diffstat (limited to 'Libraries/LibGUI/Frame.h')
-rw-r--r--Libraries/LibGUI/Frame.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/Frame.h b/Libraries/LibGUI/Frame.h
index e31bf13052..10b48e1cae 100644
--- a/Libraries/LibGUI/Frame.h
+++ b/Libraries/LibGUI/Frame.h
@@ -37,7 +37,7 @@ public:
virtual ~Frame() override;
int frame_thickness() const { return m_thickness; }
- void set_frame_thickness(int thickness) { m_thickness = thickness; }
+ void set_frame_thickness(int thickness);
Gfx::FrameShadow frame_shadow() const { return m_shadow; }
void set_frame_shadow(Gfx::FrameShadow shadow) { m_shadow = shadow; }