223
227
nux::ColorLayer layer (nux::Color (0x00000000), true, rop);
224
228
gPainter.PushDrawLayer (GfxContext, GetGeometry (), &layer);
234
else if (_is_maximized)
228
236
if (!_is_inside && !_last_active_view)
229
237
gPainter.PushDrawLayer (GfxContext, GetGeometry (), _title_layer);
233
if (_is_inside || _last_active_view)
241
if ((_is_inside || _last_active_view) && _entries.size ())
235
243
if (_gradient_texture == NULL)
274
282
_gradient_texture->UnlockRect (0);
284
guint alpha = 0, src = 0, dest = 0;
277
GfxContext.GetRenderStates ().SetBlend (true);
278
GfxContext.GetRenderStates ().SetPremultipliedBlend (nux::SRC_OVER);
286
GfxContext.GetRenderStates ().GetBlend (alpha, src, dest);
287
GfxContext.GetRenderStates ().SetBlend (true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
280
289
nux::TexCoordXForm texxform0;
281
290
nux::TexCoordXForm texxform1;
318
326
GfxContext.PushClippingRectangle (geo);
320
if (_is_inside || _last_active_view)
322
_layout->ProcessDraw (GfxContext, force_draw);
330
if (_is_inside || _last_active_view)
332
_layout->ProcessDraw (GfxContext, force_draw);
327
_window_buttons->ProcessDraw (GfxContext, true);
337
_window_buttons->ProcessDraw (GfxContext, true);
330
341
GfxContext.PopClippingRectangle();
334
345
PanelMenuView::GetActiveViewName ()
350
// There's probably a better way to do this, but we really only want to ignore our own windows
351
// as there could be cases where windows like ours have menus and we don't want them to fall
352
// into this statement. Still, will investigate better ways to do this.
353
window = bamf_matcher_get_active_window (_matcher);
354
if (BAMF_IS_WINDOW (window)
355
&& g_str_has_prefix (bamf_view_get_name (BAMF_VIEW (window)), "nux input"))
357
_is_own_window = true;
360
_is_own_window = false;
338
362
if (_is_maximized)
488
nux::Color col = PanelStyle::GetDefault ()->GetTextColor ();
489
float red = col.GetRed (), blue = col.GetBlue (), green = col.GetGreen ();
459
491
pango_cairo_update_layout (cr, layout);
461
493
y += (height - text_height)/2;
462
494
double startalpha = 1.0 - ((double)text_margin/(double)width);
464
// Once for the homies that couldn't be here
465
if (x+text_width >= width-1)
467
linpat = cairo_pattern_create_linear (x, y-1, width-1, y-1+text_height);
468
cairo_pattern_add_color_stop_rgb (linpat, 0, 50/255.0f, 50/255.0f, 45/255.0f);
469
cairo_pattern_add_color_stop_rgb (linpat, startalpha, 50/255.0f, 50/255.0f, 45/255.0f);
470
cairo_pattern_add_color_stop_rgba (linpat, startalpha, 0, 0.0, 0.0, 0);
471
cairo_pattern_add_color_stop_rgba (linpat, 1, 0, 0.0, 0.0, 0);
472
cairo_set_source(cr, linpat);
473
cairo_pattern_destroy(linpat);
477
cairo_set_source_rgb (cr, 50/255.0f, 50/255.0f, 45/255.0f);
479
cairo_move_to (cr, x, y-1);
480
pango_cairo_show_layout (cr, layout);
483
496
// Once again for the homies that could
484
497
if (x+text_width >= width-1)
486
499
linpat = cairo_pattern_create_linear (x, y, width-1, y+text_height);
487
cairo_pattern_add_color_stop_rgb (linpat, 0, 223/255.0f, 219/255.0f, 210/255.0f);
488
cairo_pattern_add_color_stop_rgb (linpat, startalpha, 223/255.0f, 219/255.0f, 210/255.0f);
500
cairo_pattern_add_color_stop_rgb (linpat, 0, red, green, blue);
501
cairo_pattern_add_color_stop_rgb (linpat, startalpha, red, green, blue);
489
502
cairo_pattern_add_color_stop_rgba (linpat, 1, 0, 0.0, 0.0, 0);
490
503
cairo_set_source(cr, linpat);
491
504
cairo_pattern_destroy(linpat);
495
cairo_set_source_rgb (cr, 223/255.0f, 219/255.0f, 210/255.0f);
508
cairo_set_source_rgb (cr, red, green, blue);
497
510
cairo_move_to (cr, x, y);
498
511
pango_cairo_show_layout (cr, layout);