mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
LibWeb: Convert ButtonBox to be a LabelableNode
This also adds an API to Label to determine if the Label itself or its child TextNode is hovered. This allows ButtonBox to render in a hovered state when the label is hovered.
This commit is contained in:
parent
d40f3aa0d0
commit
1b2123af80
4 changed files with 65 additions and 11 deletions
|
@ -37,6 +37,7 @@ public:
|
|||
virtual ~Label() override;
|
||||
|
||||
static bool is_inside_associated_label(LabelableNode&, const Gfx::IntPoint&);
|
||||
static bool is_associated_label_hovered(LabelableNode&);
|
||||
|
||||
const HTML::HTMLLabelElement& dom_node() const { return static_cast<const HTML::HTMLLabelElement&>(*BlockBox::dom_node()); }
|
||||
HTML::HTMLLabelElement& dom_node() { return static_cast<HTML::HTMLLabelElement&>(*BlockBox::dom_node()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue