diff options
| author | Neil Jagdish Patel <neil.patel@canonical.com> | 2010-10-01 11:20:30 +0100 |
|---|---|---|
| committer | Neil Jagdish Patel <neil.patel@canonical.com> | 2010-10-01 11:20:30 +0100 |
| commit | 58d72133e40963ebf28158d0153b3e9b6ad8d3b6 (patch) | |
| tree | 33df8b2ae82a29644f6d14da425dddee75eb1c06 /unity-private | |
| parent | 6f7cae9e057652543909b8d520adad25308ba708 (diff) | |
make sizing a bit more normal
(bzr r559.2.2)
Diffstat (limited to 'unity-private')
| -rw-r--r-- | unity-private/places/places-place-search-sections-bar.vala | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/unity-private/places/places-place-search-sections-bar.vala b/unity-private/places/places-place-search-sections-bar.vala index f8b4c2a00..a7cafdc79 100644 --- a/unity-private/places/places-place-search-sections-bar.vala +++ b/unity-private/places/places-place-search-sections-bar.vala @@ -60,6 +60,7 @@ namespace Unity.Places var secs = get_children (); foreach (Clutter.Actor s in secs) { + (s as Section).full_alloc_size = s.width; (s as Section).text.ellipsize = Pango.EllipsizeMode.END; } } @@ -451,6 +452,8 @@ namespace Unity.Places private float _last_width = 0.0f; private float _resize_width = 0.0f; + public float full_alloc_size = 0.0f; + public Section (Dee.Model model, Dee.ModelIter iter) { Object (reactive:true, @@ -504,11 +507,16 @@ namespace Unity.Places if (text.ellipsize != Pango.EllipsizeMode.NONE) { - debug ("%d", text.ellipsize); - if (mw < 10.0f || nw < 10.0f) + if (full_alloc_size < 10.0f || full_alloc_size > 75.0f) + { + min_width = 75.0f; + nat_width = 75.0f; + } + else { - min_width = 100.0f; - nat_width = 100.0f; + text.ellipsize = Pango.EllipsizeMode.NONE; + min_width = full_alloc_size; + nat_width = full_alloc_size; } return; } |
