# HG changeset patch # User Goffi # Date 1561717817 -7200 # Node ID efd3fbc85aafe9c2e70faeb5ec59f4a6e7fe75ff # Parent 86b1cd8121ddcd1370eb22076c9a98acacb55894 core (widgets_handler): use explicit floor division to avoid warnings. diff -r 86b1cd8121dd -r efd3fbc85aaf cagou/core/widgets_handler.py --- 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