From c52a39c3099126e2190e25c3f71513544614a2da Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Sun, 31 Mar 2013 12:30:47 +0200 Subject: [PATCH] uix: fix switch and checkbox for dpi --- kivy/data/style.kv | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kivy/data/style.kv b/kivy/data/style.kv index f1f7b11a3..7d28a9272 100644 --- a/kivy/data/style.kv +++ b/kivy/data/style.kv @@ -407,18 +407,18 @@ # Switch widget : - active_norm_pos: max(0., min(1., (int(self.active) + self.touch_distance / 41))) + active_norm_pos: max(0., min(1., (int(self.active) + self.touch_distance / sp(41)))) canvas: Color: rgb: 1, 1, 1 Rectangle: source: 'atlas://data/images/defaulttheme/switch-background' - size: 83, 32 - pos: int(self.center_x - 41), int(self.center_y - 16) + size: sp(83), sp(32) + pos: int(self.center_x - sp(41)), int(self.center_y - sp(16)) Rectangle: source: 'atlas://data/images/defaulttheme/switch-button' - size: 43, 32 - pos: int(self.center_x - 41 + self.active_norm_pos * 41), int(self.center_y - 16) + size: sp(43), sp(32) + pos: int(self.center_x - sp(41) + self.active_norm_pos * sp(41)), int(self.center_y - sp(16)) # ModalView widget @@ -786,8 +786,8 @@ rgb: 1, 1, 1 Rectangle: source: 'atlas://data/images/defaulttheme/checkbox%s_%s' % (('_radio' if self.group else ''), ('on' if self.active else 'off')) - size: 32, 32 - pos: int(self.center_x - 16), int(self.center_y - 16) + size: sp(32), sp(32) + pos: int(self.center_x - sp(16)), int(self.center_y - sp(16)) # ============================================================================= # Relative Layout