Mercurial > libervia-desktop-kivy
changeset 300:efd3fbc85aaf
core (widgets_handler): use explicit floor division to avoid warnings.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 28 Jun 2019 12:30:17 +0200 |
parents | 86b1cd8121dd |
children | 86292cc41e81 |
files | cagou/core/widgets_handler.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/cagou/core/widgets_handler.py Fri Jun 28 12:30:16 2019 +0200 +++ b/cagou/core/widgets_handler.py Fri Jun 28 12:30:17 2019 +0200 @@ -142,8 +142,8 @@ touch_ry >= self.height - self.split_size - self.split_margin or touch_ry <= self.height and touch_ry >= self.height - self.sp_zone and - touch_rx >= self.width/2 - self.sp_zone/2 and - touch_rx <= self.width/2 + self.sp_zone/2): + touch_rx >= self.width//2 - self.sp_zone//2 and + touch_rx <= self.width//2 + self.sp_zone//2): # split area is touched, we activate top split mode self._split = "top" self._draw_ellipse() @@ -151,8 +151,8 @@ touch_rx <= self.split_size + self.split_margin or touch_rx >= 0 and touch_rx <= self.sp_zone and - touch_ry >= self.height/2 - self.sp_zone/2 and - touch_ry <= self.height/2 + self.sp_zone/2): + touch_ry >= self.height//2 - self.sp_zone//2 and + touch_ry <= self.height//2 + self.sp_zone//2): # split area is touched, we activate left split mode self._split = "left" touch.ud['ori_width'] = self.width