{
switch (decoration()) {
case Classic:
- if (status_ == Open || autoOpen_) {
+ if (status() == Open) {
if (openinlined_)
return LeftButton;
else
autoOpen_ = mi.base.bv->cursor().isInside(this);
mi.base.textwidth -= (int) (1.5 * TEXT_TO_INSET_OFFSET);
- switch (decoration()) {
- case Minimalistic:
+ switch (geometry()) {
+ case NoButton:
InsetText::metrics(mi, dim);
break;
- case Conglomerate:
+ case SubLabel:
+ case Corners:
InsetText::metrics(mi, dim);
if (status() == Open) {
// consider width of the inset label
dim.asc -= 3;
}
break;
- case Classic:
+ case TopButton:
+ case LeftButton:
+ case ButtonOnly:
dim = dimensionCollapsed();
if (geometry() == TopButton
|| geometry() == LeftButton) {
case LFUN_MOUSE_PRESS:
if (cmd.button() == mouse_button::button1
&& hitButton(cmd)
- && decoration() != Minimalistic) {
+ && geometry() != NoButton) {
// reset selection if necessary (see bug 3060)
if (cur.selection())
cur.bv().cursor().clearSelection();
cur.dispatched();
break;
}
- if (decoration() == Minimalistic)
+ if (geometry() == NoButton)
InsetText::doDispatch(cur, cmd);
else if (geometry() != ButtonOnly
&& !hitButton(cmd))
}
}
- if (decoration() == Minimalistic) {
+ if (geometry() == NoButton) {
// The mouse click has to be within the inset!
InsetText::doDispatch(cur, cmd);
break;
///
bool isOpen() const { return geometry() != ButtonOnly; }
///
- bool inlined() const { return decoration() == Minimalistic|| decoration() == Conglomerate; }
- ///
CollapseStatus status() const;
/** Of the old CollapseStatus we only keep the values
* Open and Collapsed.