mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:27:45 +00:00
LibGUI: Highlight the GSplitter when hovering over it.
This commit is contained in:
parent
74786f2d5a
commit
9ac5909394
2 changed files with 14 additions and 0 deletions
|
@ -15,6 +15,18 @@ GSplitter::~GSplitter()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GSplitter::enter_event(GEvent&)
|
||||||
|
{
|
||||||
|
set_background_color(Color::from_rgb(0xd6d2ce));
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GSplitter::leave_event(GEvent&)
|
||||||
|
{
|
||||||
|
set_background_color(Color::LightGray);
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
void GSplitter::mousedown_event(GMouseEvent& event)
|
void GSplitter::mousedown_event(GMouseEvent& event)
|
||||||
{
|
{
|
||||||
if (event.button() != GMouseButton::Left)
|
if (event.button() != GMouseButton::Left)
|
||||||
|
|
|
@ -11,6 +11,8 @@ protected:
|
||||||
virtual void mousedown_event(GMouseEvent&) override;
|
virtual void mousedown_event(GMouseEvent&) override;
|
||||||
virtual void mousemove_event(GMouseEvent&) override;
|
virtual void mousemove_event(GMouseEvent&) override;
|
||||||
virtual void mouseup_event(GMouseEvent&) override;
|
virtual void mouseup_event(GMouseEvent&) override;
|
||||||
|
virtual void enter_event(GEvent&) override;
|
||||||
|
virtual void leave_event(GEvent&) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Orientation m_orientation;
|
Orientation m_orientation;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue