Add on_scale_change event to View (#1146)

* core view: emit on_scale_change event
* core titleview: reconfigure hit_test on rescale fixes #1144
This commit is contained in:
Jefferson González
2022-10-11 14:44:32 -04:00
committed by GitHub
parent 214c9d6287
commit 0fc793d1ae
2 changed files with 17 additions and 0 deletions
+4
View File
@@ -51,6 +51,10 @@ function TitleView:configure_hit_test(borderless)
end
end
function TitleView:on_scale_change()
self:configure_hit_test(self.visible)
end
function TitleView:update()
self.size.y = self.visible and title_view_height() or 0
title_commands[2] = core.window_mode == "maximized" and restore_command or maximize_command