mirror of
https://github.com/elementary/gala.git
synced 2024-12-25 18:24:05 +03:00
windowsclone: Transform some lambdas to override-methods
This commit is contained in:
parent
24bd250891
commit
8ddf5cf111
@ -122,14 +122,6 @@ namespace Gala
|
||||
close_window ();
|
||||
return true;
|
||||
});
|
||||
enter_event.connect (() => {
|
||||
close_button.opacity = 255;
|
||||
return false;
|
||||
});
|
||||
leave_event.connect (() => {
|
||||
close_button.opacity = 0;
|
||||
return false;
|
||||
});
|
||||
|
||||
window_icon = new WindowIcon (window, WINDOW_ICON_SIZE);
|
||||
window_icon.opacity = 0;
|
||||
@ -146,11 +138,6 @@ namespace Gala
|
||||
load_clone ();
|
||||
}
|
||||
|
||||
public override bool button_press_event (Clutter.ButtonEvent event)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
~WindowClone ()
|
||||
{
|
||||
window.unmanaged.disconnect (unmanaged);
|
||||
@ -390,6 +377,25 @@ namespace Gala
|
||||
clone.allocate (alloc, flags);
|
||||
}
|
||||
|
||||
public override bool button_press_event (Clutter.ButtonEvent event)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool enter_event (Clutter.CrossingEvent event)
|
||||
{
|
||||
close_button.opacity = 255;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool leave_event (Clutter.CrossingEvent event)
|
||||
{
|
||||
close_button.opacity = 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Place the widgets, that is the close button and the WindowIcon of the window,
|
||||
* at their positions inside the actor for a given width and height.
|
||||
|
Loading…
Reference in New Issue
Block a user