~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/PlacesGroup.cpp

  • Committer: Gord Allott
  • Date: 2011-02-28 16:27:57 UTC
  • mto: This revision was merged to the branch mainline in revision 902.
  • Revision ID: gord.allott@canonical.com-20110228162757-zk8otqin3bir0sml
erm, bunch of stuff. support for keynav, woo

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
static const nux::Color kExpandDefaultTextColor (1.0f, 1.0f, 1.0f, 0.6f);
46
46
static const nux::Color kExpandHoverTextColor (1.0f, 1.0f, 1.0f, 1.0f);
47
 
  
48
 
  
 
47
 
 
48
 
49
49
PlacesGroup::PlacesGroup (NUX_FILE_LINE_DECL)
50
50
: View (NUX_FILE_LINE_PARAM),
51
51
  _content_layout (NULL),
59
59
 
60
60
  _header_layout = new nux::HLayout (NUX_TRACKER_LOCATION);
61
61
  _group_layout->AddLayout (_header_layout, 0, nux::MINOR_POSITION_TOP, nux::MINOR_SIZE_FULL);
62
 
  
 
62
 
63
63
  _icon = new IconTexture ("", 24);
64
64
  _icon->SetMinimumSize (24, 24);
65
65
  _header_layout->AddView (_icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
68
68
  _name->SetTextEllipsize (nux::StaticCairoText::NUX_ELLIPSIZE_END);
69
69
  _name->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_LEFT);
70
70
  _header_layout->AddView (_name, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
71
 
  
 
71
 
72
72
  _expand_label = new nux::StaticCairoText ("Expand", NUX_TRACKER_LOCATION);
73
73
  _expand_label->SetTextEllipsize (nux::StaticCairoText::NUX_ELLIPSIZE_END);
74
74
  _expand_label->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_LEFT);
100
100
  // Bear with me, I'm trying something different :)
101
101
  const gchar *temp = "    <big>%s</big>    ";
102
102
  gchar *tmp, *final;
103
 
  
 
103
 
104
104
  tmp = g_markup_escape_text (name, -1);
105
105
 
106
106
  final = g_strdup_printf (temp, tmp);
166
166
 
167
167
  ComputeChildLayout ();
168
168
  QueueDraw ();
169
 
  
 
169
 
170
170
  g_free ((result_string));
171
171
  g_free (final);
172
172
}
195
195
PlacesGroup::ProcessEvent (nux::IEvent &ievent, long TraverseInfo, long ProcessEventInfo)
196
196
{
197
197
  long ret = TraverseInfo;
198
 
 
199
198
  if (GetGeometry ().IsPointInside (ievent.e_x, ievent.e_y))
200
199
    ret = _group_layout->ProcessEvent (ievent, TraverseInfo, ProcessEventInfo);
201
 
 
202
200
  return ret;
203
201
}
204
202