Container::button_press(x, y, btn);
if(!click_focus)
{
- dropped=false;
- state&=~ACTIVE;
+ dropped = false;
+ state &= ~ACTIVE;
signal_ungrab_pointer.emit();
}
}
else if(btn==1)
{
- dropped=true;
- state|=ACTIVE;
+ dropped = true;
+ state |= ACTIVE;
signal_grab_pointer.emit();
}
}
void Dropdown::resize_list()
{
// XXX This is a hack.
- unsigned n_items=list.get_n_items();
- const Style &stl=list.get_style();
- const GL::Font &font=*stl.get_font();
- unsigned h=min(max(n_items, 1U), 10U)*static_cast<unsigned>((font.get_ascent()-font.get_descent())*font.get_default_size());
+ unsigned n_items = list.get_n_items();
+ const Style &stl = list.get_style();
+ const GL::Font &font = *stl.get_font();
+ unsigned h = min(max(n_items, 1U), 10U)*static_cast<unsigned>((font.get_ascent()-font.get_descent())*font.get_default_size());
for(std::list<Part>::const_iterator i=stl.get_parts().begin(); i!=stl.get_parts().end(); ++i)
if(i->get_name()=="items")
{
- const Sides &margin=i->get_margin();
- h+=margin.top+margin.bottom;
+ const Sides &margin = i->get_margin();
+ h += margin.top+margin.bottom;
}
list.set_geometry(Geometry(0, -h, geom.w, h));
}
{
if(dropped)
{
- dropped=false;
- state&=~ACTIVE;
+ dropped = false;
+ state &= ~ACTIVE;
signal_ungrab_pointer.emit();
}