Attachments you submit will be routed for moderation. If you have an account, please
log in first.
Ticket #2143: 0001-scale-icons-continously-when-layout-Ring.patch
|
File 0001-scale-icons-continously-when-layout-Ring.patch, 1.5 KB
(added by walter, 3 years ago)
|
|
scale icons continuously when layout is not Ring
|
-
From 88c34ef2b036118fc39908e042ca08725bf619e7 Mon Sep 17 00:00:00 2001
From: Walter Bender <walter@sugarlabs.org>
Date: Tue, 24 Aug 2010 10:46:22 -0400
Subject: [PATCH] scale icons continously when layout != Ring
---
src/jarabe/desktop/favoriteslayout.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/jarabe/desktop/favoriteslayout.py b/src/jarabe/desktop/favoriteslayout.py
index 4c7444d..f4d1494 100644
|
a
|
b
|
|
| 266 | 266 | children_count, icon_size) |
| 267 | 267 | else: |
| 268 | 268 | break |
| 269 | | return radius, icon_size |
| 270 | 269 | else: |
| 271 | | distance = style.STANDARD_ICON_SIZE + style.DEFAULT_SPACING * \ |
| 272 | | _ICON_SPACING_FACTORS[_ICON_SIZES.index(style.SMALL_ICON_SIZE)] |
| 273 | | radius = max(children_count * distance / (2 * math.pi), |
| 274 | | _MINIMUM_RADIUS) |
| 275 | | return radius, style.SMALL_ICON_SIZE |
| | 270 | # Continue by shrinking the icon size. |
| | 271 | icon_size = max(int(distance - style.DEFAULT_SPACING * \ |
| | 272 | _ICON_SPACING_FACTORS[_ICON_SIZES.index( |
| | 273 | style.SMALL_ICON_SIZE)]), style.SMALL_ICON_SIZE) |
| | 274 | return radius, icon_size |
| 276 | 275 | |
| 277 | 276 | def _calculate_position(self, radius, icon_size, icon_index, children_count, |
| 278 | 277 | sin=math.sin, cos=math.cos): |
Download in other formats: