D27988: KCM/Compositing: Use KConfig XT in UI

Anthony Fieroni noreply at phabricator.kde.org
Tue Mar 31 08:47:03 BST 2020


anthonyfieroni added inline comments.

INLINE COMMENTS

> main.cpp:175
>      // compositing type
> -    CompositingType *type = new CompositingType(this);
> -    m_form.type->setModel(type);
> -    auto updateCompositingType = [this, type]() {
> -        m_form.type->setCurrentIndex(type->indexForCompositingType(m_compositing->compositingType()));
> -    };
> -    updateCompositingType();
> -    connect(m_compositing, &Compositing::compositingTypeChanged,
> -        [updateCompositingType]() {
> -            updateCompositingType();
> -        }
> -    );
> -    auto showHideBasedOnType = [this, type]() {
> -        const int currentType = type->compositingTypeForIndex(m_form.type->currentIndex());
> -        m_form.glScaleFilter->setVisible(currentType != CompositingType::XRENDER_INDEX);
> -        m_form.glScaleFilterLabel->setVisible(currentType != CompositingType::XRENDER_INDEX);
> -        m_form.xrScaleFilter->setVisible(currentType == CompositingType::XRENDER_INDEX);
> -        m_form.xrScaleFilterLabel->setVisible(currentType == CompositingType::XRENDER_INDEX);
> -    };
> -    showHideBasedOnType();
> -    connect(m_form.type, currentIndexChangedSignal,
> -        [this, type, showHideBasedOnType]() {
> -            m_compositing->setCompositingType(type->compositingTypeForIndex(m_form.type->currentIndex()));
> -            showHideBasedOnType();
> -        }
> -    );
> +    m_form.backend->addItem(i18n("OpenGL 3.1"), CompositingTypeIndex::OPENGL31_INDEX);
> +    m_form.backend->addItem(i18n("OpenGL 2.0"), CompositingTypeIndex::OPENGL20_INDEX);

It's translatable ?

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D27988

To: meven, #kwin, ervin, crossi, bport, hchain, zzag
Cc: anthonyfieroni, zzag, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200331/7baa29f2/attachment-0001.html>


More information about the kwin mailing list