void DCButton::SetValue(bool val) { ASSERT(type == DC_BTN_TOGGLE); bool oldval = val; state = val; if(state == oldval) { // Cheap to change value to the old one (which is done ALOT) if(GetValue() && g_settings.getInteger(Config::USE_GUI_SELECTION_SHADOW)) { SetOverlay(g_gui.gfx.getSprite(EDITOR_SPRITE_SELECTION_MARKER)); } else { SetOverlay(nullptr); } Refresh(); } }
void VideoWidget::showEvent(QShowEvent *showEvent) { // Override showEvent so we can set QWidget attributes and set overlay qDebug() << name_ << " >> QWidget::showEvent() override called"; QWidget::showEvent(showEvent); SetOverlay(); }