From 9c120d63889fb8e52f108656eeeb66d1e6dbc507 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Mon, 22 Oct 2012 15:26:25 -0300
Subject: [PATCH browse] Make the autocomplete list touch-friendly - SL #4049
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
- limit the number of matches so the list doesn't interfere with the OSK
- enlarge the rows height to the size of an icon of standard size, so
the rows are as touchable as Sugar icons
- make the list of alternate colors to distinguish the
clickable/touchable area
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
---
places.py | 2 +-
webtoolbar.py | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/places.py b/places.py
index 5001b43..36da8b7 100644
a
|
b
|
class Place(object): |
34 | 34 | |
35 | 35 | |
36 | 36 | class SqliteStore(object): |
37 | | MAX_SEARCH_MATCHES = 20 |
| 37 | MAX_SEARCH_MATCHES = 7 |
38 | 38 | EXPIRE_DAYS = 30 |
39 | 39 | |
40 | 40 | def __init__(self): |
diff --git a/webtoolbar.py b/webtoolbar.py
index 29c036b..d99919d 100644
a
|
b
|
from gi.repository import WebKit |
27 | 27 | from sugar3.graphics.toolbutton import ToolButton |
28 | 28 | from sugar3.graphics import iconentry |
29 | 29 | from sugar3.graphics.toolbarbox import ToolbarBox as ToolbarBase |
| 30 | from sugar3.graphics.style import STANDARD_ICON_SIZE |
30 | 31 | from sugar3.activity.widgets import ActivityToolbarButton |
31 | 32 | from sugar3.activity.widgets import StopButton |
32 | 33 | |
… |
… |
class WebEntry(iconentry.IconEntry): |
84 | 85 | def _search_create_view(self): |
85 | 86 | view = Gtk.TreeView() |
86 | 87 | view.props.headers_visible = False |
| 88 | view.props.rules_hint = True |
87 | 89 | |
88 | 90 | view.connect('button-press-event', self.__view_button_press_event_cb) |
89 | 91 | |
… |
… |
class WebEntry(iconentry.IconEntry): |
93 | 95 | cell = Gtk.CellRendererText() |
94 | 96 | cell.props.ellipsize = Pango.EllipsizeMode.END |
95 | 97 | cell.props.ellipsize_set = True |
| 98 | cell.props.height = STANDARD_ICON_SIZE |
96 | 99 | cell.props.font = 'Bold' |
97 | 100 | column.pack_start(cell, True) |
98 | 101 | |