void MButtonViewPrivate::updateItemsAfterModeChange()
{
    updateLabelStyle();
    updateIcon();
    updateToggledIcon();

    calcIconTextRects();
}
void MButtonViewPrivate::setText(const QString &text)
{
    Q_Q(MButtonView);

    if (q->model()->textVisible() && !text.isEmpty()) {
        if (!label) {
            label = new MLabel(controller);
            label->setTextElide(true);
            label->setObjectName("ButtonLabel");
            label->setMinimumSize(0,0);
            updateLabelStyle();
        }
        if (!label->isVisible())
            label->setVisible(true);
        label->setText(text);
    } else {
        if (label)
            label->setVisible(false);
    }
}
void MApplicationMenuButtonViewPrivate::updateItemsAfterModeChange()
{
    updateLabelStyle();
    refreshIconImage();
}