~stolowski/unity/expand-2nd-home-category

« back to all changes in this revision

Viewing changes to launcher/QuicklistView.cpp

  • Committer: Pawel Stolowski
  • Date: 2012-11-05 08:58:52 UTC
  • mfrom: (2754.1.123 trunk)
  • Revision ID: pawel.stolowski@canonical.com-20121105085852-hf92usctne6kv5om
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#include "QuicklistMenuItemRadio.h"
41
41
 
42
42
#include "unity-shared/Introspectable.h"
 
43
#include "unity-shared/UnitySettings.h"
43
44
 
44
 
#include "unity-shared/ubus-server.h"
 
45
#include "unity-shared/UBusWrapper.h"
45
46
#include "unity-shared/UBusMessages.h"
 
47
#include "unity-shared/DashStyle.h"
46
48
 
47
49
namespace unity
48
50
{
71
73
{
72
74
  SetGeometry(nux::Geometry(0, 0, 1, 1));
73
75
 
74
 
  _use_blurred_background = true;
75
 
  _compute_blur_bkg = true;
76
 
 
77
76
  _left_space = new nux::SpaceLayout(_padding +
78
77
                                     _anchor_width +
79
78
                                     _corner_radius +
280
279
      // left (close quicklist, go back to laucher key-nav)
281
280
    case NUX_VK_LEFT:
282
281
    case NUX_KP_LEFT:
283
 
      Hide();
284
 
      // inform Launcher we switch back to Launcher key-nav
285
 
      ubus_server_send_message(ubus_server_get_default(),
286
 
                               UBUS_QUICKLIST_END_KEY_NAV,
287
 
                               NULL);
 
282
      HideAndEndQuicklistNav();
288
283
      break;
289
284
 
290
285
      // esc (close quicklist, exit key-nav)
291
286
    case NUX_VK_ESCAPE:
292
287
      Hide();
293
288
      // inform UnityScreen we leave key-nav completely
294
 
      ubus_server_send_message(ubus_server_get_default(),
295
 
                               UBUS_LAUNCHER_END_KEY_NAV,
296
 
                               NULL);
 
289
      UBusManager::SendMessage(UBUS_LAUNCHER_END_KEY_NAV);
297
290
      break;
298
291
 
299
292
      // <SPACE>, <RETURN> (activate selected menu-item)
408
401
  }
409
402
}
410
403
 
 
404
void QuicklistView::HideAndEndQuicklistNav()
 
405
{
 
406
  Hide();
 
407
  // inform Launcher we switch back to Launcher key-nav
 
408
  UBusManager::SendMessage(UBUS_QUICKLIST_END_KEY_NAV);
 
409
}
 
410
 
411
411
void QuicklistView::Draw(nux::GraphicsEngine& gfxContext, bool forceDraw)
412
412
{
413
413
  CairoBaseWindow::Draw(gfxContext, forceDraw);
1222
1222
  float   shadow_color[4]  = {0.0f, 0.0f, 0.0f, 1.00f};
1223
1223
  float   outline_color[4] = {1.0f, 1.0f, 1.0f, 0.40f};
1224
1224
  float   mask_color[4]    = {1.0f, 1.0f, 1.0f, 1.00f};
1225
 
//   float   anchor_width      = 10;
1226
 
//   float   anchor_height     = 18;
 
1225
  
 
1226
  if (Settings::Instance().GetLowGfxMode())
 
1227
  {
 
1228
    float alpha_value = 1.0f;
 
1229
    
 
1230
    tint_color[3] = alpha_value;
 
1231
    hl_color[3] = 0.2f;
 
1232
    dot_color[3] = 0.0f;
 
1233
    shadow_color[3] = alpha_value;
 
1234
    outline_color[3] = alpha_value;
 
1235
    mask_color[3] = alpha_value;
 
1236
  }
1227
1237
 
1228
1238
  ql_tint_dot_hl(cr_bg,
1229
1239
                 width,