Code review comment for lp:~gordallott/unity/newbg

Revision history for this message
Andrea Azzarone (azzar1) wrote :

+ group->SetMinimumWidth(GetGeometry().width+20);

Use GetBaseWidth. Plase remove magic number too :)

+ scroll_layout_->GetGeometry().height > scroll_view_->GetGeometry().height

Use GetBaseGeometryHeight here too.

+ SetMinimumWidth(2000);

Remove this magic number too.

+ else if (g_strcmp0(renderer_name, "tile-vertical"))

Maybe I'm wrong, but are you sure that you don't need to check that g_strcmp(...) is == 0?

nux::TexCoordXForm texxform;
226 + if (_n_visible_items_in_unexpand_mode < 6 && _using_nofilters_background)
227 + {

Move 6 in a variable or something like that. Also rename _n_visible_items_in_unexpand_mode and _using_nofilters_background using the new style for the private members (variable_).

228 + _background_layer.reset(new nux::TextureLayer(_background->GetDeviceTexture(),
229 + texxform,
230 + nux::color::White,
231 + false,
232 + rop));

Also fix the indentation.

+ bg_geo.width = std::min(bg_width, bg_geo.GetWidth()) + 10;

Remove magic number.

+ //_queued_draw = false;

Remove this line if we no longer need it.

+ for (auto window: windows_)

I think you can use auto const& window : windows_ here.

review: Needs Fixing

« Back to merge proposal