Split into one KCM for Desktop Effects and one for Compositing

Let's try getting the KCM a little bit less scary by properly
hiding everything the user doesn't have to care about. The prominent
desktop effects KCM only contains the list of all the effects which
can be configured and nothing else. Only exception is the disabled
check after failed GL to make this easier for the user.

All the "advanced" settings are moved into a new KCM called
"Compositing" which is put under the hardware component in
systemsettings. This contains all advanced settings including
* whether compositing is enabled at all
* backend
* animation speeed
* scale filter
* unredirect fullscreen
* color correction

REVIEW: 116648
This commit is contained in:
Martin Gräßlin 2014-03-07 10:09:47 +01:00
parent 02d4d039ce
commit 74d9185f49
11 changed files with 452 additions and 362 deletions

View file

@ -117,7 +117,7 @@ target_link_libraries(effectModelTest
INSTALL(DIRECTORY qml DESTINATION ${DATA_INSTALL_DIR}/kwincompositing)
INSTALL(TARGETS kwincompositing DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kwincompositing.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES kwincompositing.desktop kcmkwineffects.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES kwineffect.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
################# list the subdirectories #################

View file

@ -0,0 +1,18 @@
[Desktop Entry]
Exec=kcmshell5 kwineffects
Icon=preferences-desktop
Type=Service
X-KDE-ServiceTypes=KCModule
X-DocPath=kcontrol/kwincompositing/index.html
X-KDE-Library=kwincompositing
X-KDE-PluginKeyword=effects
X-KDE-ParentApp=kcontrol
X-KDE-System-Settings-Parent-Category=workspace-appearance-and-behavior
X-KDE-Weight=50
Name=Desktop Effects
Comment=Configure desktop effects
X-KDE-Keywords=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effect

View file

@ -6,49 +6,13 @@ X-KDE-ServiceTypes=KCModule
X-DocPath=kcontrol/kwincompositing/index.html
X-KDE-Library=kwincompositing
X-KDE-PluginKeyword=compositing
X-KDE-ParentApp=kcontrol
X-KDE-System-Settings-Parent-Category=workspace-appearance-and-behavior
X-KDE-System-Settings-Parent-Category=hardware
X-KDE-Weight=50
Name=Desktop Effects
Name[cs]=Efekty na ploše
Name[de]=Arbeitsflächen-Effekte
Name[es]=Efectos de escritorio
Name[fi]=Työpöytätehosteet
Name[hu]=Asztali hatások
Name[ko]=
Name[nl]=Bureaubladeffecten
Name[pt]=Efeitos do Ecrã
Name[pt_BR]=Efeitos da área de trabalho
Name[sk]=Efekty plochy
Name[sv]=Skrivbordseffekter
Name[uk]=Ефекти стільниці
Name[x-test]=xxDesktop Effectsxx
Comment=Configure desktop effects
Comment[cs]=Nastavení efektů pracovní plochy
Comment[de]=Arbeitsflächen-Effekte einrichten
Comment[es]=Configurar los efectos del escritorio
Comment[fi]=Työpöytätehosteiden asetukset
Comment[hu]=Asztali hatások beállítása
Comment[ko]=
Comment[nl]=Desktopeffecten instellen
Comment[pt]=Configurar os efeitos do ecrã
Comment[pt_BR]=Configurar os efeitos da área de trabalho
Comment[sk]=Nastavenie efektov plochy
Comment[sv]=Anpassa skrivbordseffekter
Comment[uk]=Налаштувати ефекти стільниці
Comment[x-test]=xxConfigure desktop effectsxx
Name=Compositor
Comment=Configure compositor settings for the Desktop effects
X-KDE-Keywords=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effect
X-KDE-Keywords[de]=KWin,Fenster,Verwaltung,Compositing,Effekt,2D-Effekte,3D-Effekte,OpenGL,XRender,Videoeinstellungen,Gradische Effekte,Desktopeffekte,Arbeitsflächeneffekte,Animation,Fensterverwaltungs-Effekte,Fensterwechsel-Effekte,Decktopwechsel,Arbeitsflächenwechsel,Animationsgeschwindigkeit,Deskto-Animation,Arbeitsflächen-Animation,Treiber,Treibereinstellung,Rendering,Rendern,Invertierungseffekt,Bildschirmlupeneffekt,Vergrößerungseffekt,Einrasteffekt,Maus folgen,Zooneffekt,Dashboard.Effekt,Explosionseffekt,Überblendungseffekt,Gleiteneffekt,Fensterhervorhebungs-Effekt,Anmeldungseffekt,Abmeldungseffekt,Animierter Minimierungseffekt,Mausmarkierungseffekt,Skalierungseffekt,Bildschirmeffekt,Blatteffekt,Folieneffekt,Vorschaueffekt der Kontrollleiste,Vorschaueffekt,Durchsichtigkeit,Durchsichtigkeitseffekt,Fenstergeometrieffekt,Effekt Wabernde Fenster,Programmstartanzeigeneffekt,Inaktiveffekt,Bildschirmabdunkelungseffekt,FPS-Effekt,Zeichnungsbereicheffekt,Kasten mit Minibilderneffekt,3D-Fenstergalerieeffekt,Desktopgittereffekt,3D-Fensterstapelumschalteffekt,Umrisseffekt,Fensteranzeigeeffekt,Fenstergrößenänderungseffekt
X-KDE-Keywords[fi]=kwin,ikkuna,ohjelma,ikkunointi,ikkunointiohjelma,ikkunanhallinta,koostaminen,tehoste,3D-tehosteet,2D-tehosteet,3U-tehosteet,2U-tehosteet,OpenGL,XRender,videoasetukset,kuva-asetukset,graafiset tehosteet,työpöytätehosteet,animaatiot,animoinnit,useita animaatioita,eri animaatiot,ikkunanhallintatehosteet,ikkunan vaihtotehoste,työpöydän vaihtotehoste,animaatiot,animoinnit,animointinopeus,työpöytäanimaatiot,ajurit,ajuriasetukset,piirtojärjestelmä,renderöijä,renderoija,piirtäminen,renderöinti,renderointi,käänteisten värien tehoste,suurennuslasitehoste,pikaopastajatehoste,hiiren jäljitystehoste,zoomaustehoste,sumennustehoste,kojelautatehoste,räjähdystehoste,häivtytystehoste,työpöydän häivytystehoste,hajoamistehoste,ikkunaliukutehoste,ikkunan korostustehoste,sisäänkirjautumistehosteuloskirjautumistehoste,taikalampputehoste,pienennysanimaatiotehoste,hiiren jäljet -tehoste,skaalaustehoste,kuvankaappaustehoste,arkkitehoste,liuutustehoste,liukuvat ponnahdusikkunat -tehoste,tehtäväpalkin esikatselukuvat -tehoste,esikatselukuva vieressä -tehoste,läpikuultavuus,läpinäkyvyys,läpikuultavuustehoste,läpinäkyvyystehoste,ikkunan mitat -tehoste,heiluvat ikkunat -tehoste,käynnistymisen ilmaisemisen tehoste,isäikkunatehoste,passiivisen himmennystehoste,näytön himmennystehoste,taakse liuutus -tehoste,silmäkarkki,karkki,FPS-näyttötehoste,näytä FPS -tehoste,piirtämisen näyttämistehoste,laatikkovaihtajatehoste,levykansivaihtajatehoste,työpöytäkuutiotehoste,työpöytäkuutioanimaatiotehoste,työpöydän ruudukko -tehoste,kääntövaihtajatehoste,ääriviivatehoste,ikkunoiden esittämistehoste,ikkunan koon muuttamistehoste,window,manager,compositing,effect,3D effects,2D effects,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effect
X-KDE-Keywords[hu]=kwin,ablak,kezelő,kompozitálás,hatás,3D hatás,2D hatás,OpenGL,XRender,videobeállítások,grafikai hatások,asztali hatások,animációk,különféle animációk,ablakkezelő hatások,ablakváltó hatások,asztalváltó hatások,animációk,animáció sebesség,asztali animációk,meghajtók,meghajtó beállítások,leképezés,renderelés,fordított hatás,tükörhatás,nagyító hatás,elkapás segítő hatás,egérkövetés hatás,nagyítás hatás,elmosás hatás,áttekintő hatás,robbanás hatás,elhalványulás hatás,asztal elhalványulása hatás,széteső hatás,csúszás hatás,ablak kiemelése hatás,belépés hatás,kilépés hatás,varázslámpa hatás,minimalizálás animáció hatás,egérjelölés hatás,méretezés hatás,képernyőkép hatás,munkalap hatás,dia hatás,csúszó felugrók hatás,feladatsáv bélyegképek hatás,bélyegképek félre hatás,áttetszőség,áttetszőség hatás,átlátszóság,ablak geometria hatás,ingó ablak hatás,indulási visszajelzés hatás,párbeszédablak szülő hatás,dim inaktív hatás,dim kijelző hatás,dia vissza hatás,látványelem,édesség,FPS megjelenítése hatás,festék megjelenése hatás,dobozváltás hatás,eltakarás váltás hatás,asztal kocka hatás,asztal kockaanimáció hatás,asztal rács hatás,tükrözésváltás hatás,körvonal hatás,jelenlegi ablakok hatás,ablak átméretezése hatás
X-KDE-Keywords[ko]=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effect,,,,,3D ,2D , , , ,, , , , ,, ,, , , , , , , , , , , , , , , , ,
X-KDE-Keywords[nl]=kwin,venster,beheerder,compositing,effect,3D effecten,2D effecten,OpenGL,XRender,video-instellingen,grafische effecten,bureaubladeffecten,animaties,verrschillende animaties,vensterbeheereffecten,vensteromschakeleffect, bureaublad-omschakeleffect,animaties,animatiesnelheid,bureaubladanimaties,stuurprogramma's,stuurprogramma-instellingen,rendering,render,inversieeffect,vergrootglaseffect,vergrotingseffect,snaphelpereffect,trackmuiseffect,zoomeffect,vervagingseffect,dashboardeffect,explosie-effect,uitvaageffect,uitvaagbureaubladeffect,uiteenvaleffect,glijeffect,vebsteraccentueringseffect,aanmeldeffect,afmeldeffect,magische lampeffect,animatie-effect minimaliseren,muismarkeringseffect,inschaaleffect,schermafdrukeffect,bladeneffect,diaeffect,glijdende pop-upseffect,taakbalkminiatuureffect,miniatuur-opzijeffect,doorzichtigheid,doorzichtigheidseffect,transparantie,vensterafmetingeneffect,wiebelende vensterseffect,opstartterugkoppeleffect,dialoogoudereffect,dim bij inactiviteitseffect,dim het schermeffect,schuif terugeffect,oogstrelend,snoepgoed,FPS toneneffect,verf toneneffect,vak omschakeleffect,deksel schakelaareffect,bureaublad kubuseffect,bureaublad kubus animatie-effect,bureaubladrastereffect,omschakeleffect,omrandingeffect,huidig venstereffect, wijzig grootte van venstereffect
X-KDE-Keywords[pt]=kwin,janela,gestor,composição,efeito,efeitos 3D,efeitos 2D,OpenGL,XRender,configuração do vídeo,efeitos gráficos,efeitos do ecrã,animações,animações diversas,efeitos de gestão das janelas,efeito de mudança de janelas,efeito de mudança de ecrãs,animações,velocidade da animação,animações do ecrã,controladores,configuração dos controladores,desenho,efeito de inversão,efeito de lupa,efeito de lente,efeito de ajuda no ajuste, efeito de seguimento do rato,efeito de ampliação,efeito de borrão,efeito de quadro,efeito de explosão,efeito de desvanecimento,efeito de desvanecimento do ecrã,efeito de destruição,efeito de deslizamento,efeito de realce da janela,efeito na autenticação,efeito do encerramento,efeito de lâmpada mágica,efeito de animação na minimização,efeito de marcação com rato,efeito de escala,efeito de captura do ecrã,efeito de folha,efeito de mensagens deslizantes,efeito de miniaturas na barra de tarefas,efeito de miniaturas laterais,efeito de janelas a tremer,efeito do arranque inicial,efeito da janela-mãe,efeito de escurecimento de janelas inactivas,efeito de deslize para trás,efeitos visuais,beleza,efeito de apresentação das IPS,efeito de pintura,efeito de mudança em caixa,efeito de mudança de capas, efeito de animação do cubo do ecrã,efeito de grelha do ecrã,efeito de mudança por viragem,efeito de destaque,efeito de apresentação das janelas,efeito de dimensionamento das janelas
X-KDE-Keywords[pt_BR]=kwin,janela,gerenciador,composição,efeito,efeitos 3D,efeitos 2D,OpenGL,XRender,configuração do vídeo,efeitos gráficos,efeitos da área de trabalho,animações,animações diversas,efeitos do gerenciamento de janelas,efeito de mudança de janelas,efeito de mudança de área de trabalho,velocidade da animação,animações da área de trabalho,drivers,configuração dos drivers,desenho,renderização,efeito de inversão,efeito de lupa,efeito de lente,efeito de ajuda no ajuste,efeito de rastreamento do mouse,efeito de ampliação,efeito de borrão,efeito de quadro,efeito de explosão,efeito de escurecimento,efeito de escurecimento da área de trabalho,efeito de destruição,efeito de deslizamento,efeito de realce da janela,efeito na autenticação,efeito de encerramento de sessão,efeito de lâmpada mágica,efeito de animação na minimização,efeito de marcação com mouse,efeito em escala,efeito de captura de tela,efeito de folha,efeito de slide,efeito de mensagens deslizantes,efeito de miniaturas na barra de tarefas,efeito de miniaturas laterais,transparência,efeito de transparência,efeito de geometria de janelas,efeito de janelas trêmulas,efeito do inicialização,efeito da janela-mãe,efeito de escurecimento de janelas inativas,efeito de deslize para trás,efeitos visuais,beleza,efeito de apresentação de FPS,efeito de pintura,efeito de mudança em caixa,efeito de mudança de capas,efeito de animação do cubo da área de trabalho,efeito de grade da área de trabalho,efeito de mudança em pilha,efeito de destaque,efeito de apresentação das janelas,efeito de dimensionamento das janelas
X-KDE-Keywords[sk]=kwin, okno, manažér, kompozícia, efekt, 3D efekty, 2D efekty, OpenGL, XRender,nastavenia obrazu, grafické efekty, desktop efekty, animácie, rôzneanimácie, efekty správa okien, okno prepínanie efektov, stolnýspínacie efekt, animácie, animácie rýchlosť, stolný animácie, ovládače,nastavenie ovládača, renderovanie, poskytnúť, invertný skutočnosti zrkadlá účinok,lupa efekt, snap pomocník efekt, trať myš efekt, zoom efekt, rozmazaniuúčinok, prístrojová doska efekt, výbuch efekt, fade efekt, fade stolný efekt,rozpadnúť účinok, zostupovej efekt, zvýraznenie okno efekt, efekt prihlásenie, odhlásenieúčinok, čarovnú lampu účinok, minimálny efekt animácie, myši značky efekt, mierkav skutočnosti, screenshot efekt, list efekt, snímka efekt, posuvné vyskakovacie okná účinok,miniatúry na hlavnom paneli efekt, náhľad stranou efekt, priesvitnosť, translucencieúčinok, transparentnosť, okno geometrie efekt, vratkú okná efekt, uvedenie do prevádzkyspätná väzba, dialóg rodič efekt, matný efekt neaktívny, stlmiť obrazovku efekt,posunutím zadnej efekt, pastva pre oči, cukrík zobraziť FPS efekt, zobrazovať farby efekt, boxprepínač efekt, kryt prepínače účinok, desktop, desktop cube efekt kocky animácieúčinok, Desktop Grid efekt, flip switch efekt, obrys účinok, súčasné oknáúčinok, zmena veľkosti okna efekt
X-KDE-Keywords[sv]=kwin,fönster,hanterare,sammansättning,effekt,3D-effekter,OpenGL,Xrender,videoinställningar,grafiska effekter,skrivbordseffekter,animeringar,diverse animeringar,fönsterhanteringseffekter,fönsterbyteseffekt,skrivbordsbyteseffekt,animeringshastighet,skrivbordsanimeringar,drivrutiner,drivrutininställningar,återgivning,återge,inverteringseffekt,förstoringsglaseffekt,förstoringseffekt,låshjälpeffekt,musföljningseffekt,zoomeffekt,suddighetseffekt,instrumentpaneleffekt,explosionseffekt,borttoningseffekt,skrivbordsborttoningseffekt,sönderfallseffekt,glidningseffekt,fönstermarkeringseffekt,inloggningseffekt,utloggningseffekt,magisk lampeffekt,minimeringsanimeringseffekt,musmarkeringseffekt,inskalningseffekt,skärmbildseffekt,arkeffekt,glideffekt,glidande ruteffekt,miniatyrbilder i aktivitetsfältet,miniatyrbild vid sidan om,genomskinlighet,genomskinlighetseffekt,fönstergeometrieffekt,ostadiga fönster,startgensvarseffekt,dialogrutors ägare,dämpa inaktiva,dämpa skärmen,glid tillbaka,ögongodis,visa ramar/s,visa uppritning,byte med ruta,omslagsbyte,skrivbordskub,animeringseffekt för skrivbordskub,skrivbordsrutnät,blädderbyteseffekt,kontureffekt,befintliga fönster,ändra fönsterstorlek
X-KDE-Keywords[uk]=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effect,вікно,керування вікнами,менеджер вікон,композитне відтворення,ефект,просторовий,плоский,параметри відео,графічні ефекти,анімації,анімація,перемикання вікон,швидкість анімації,драйвери,параметри драйверів,показ,відтворення,інвертування,інверсія,збільшувальне скло,збільшення,прилипання,шлейф за вказівником,шлейф,масштабування,масштаб,зміна розмірів,розмивання,панель приладів,панель,вибух,ефекти вибуху,згасання,поява,ковзання,підсвічування,підсвічування вікон,вихід,магічна лампа,чарівна лампа,джин,аркуші,стос,знімок екрана,мініатюри панелі задач,мініатюри,прозорість,ефект прозорості,желе,желейні вікна,супровід запуску,стрибунець,притлумлення,сірість,прикраси,показ частоти,малювання,обкладинки,стрибання,контур,поточні вікна,зміна розмірів
X-KDE-Keywords[x-test]=xxkwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,animations,various animations,window management effects,window switching effect,desktop switching effect,animations,animation speed,desktop animations,drivers,driver settings,rendering,render,invert effect,looking glass effect,magnifier effect,snap helper effect,track mouse effect,zoom effect,blur effect,dashboard effect,explosion effect,fade effect,fade desktop effect,fall apart effect,glide effect,highlight window effect,login effect,logout effect,magic lamp effect,minimize animation effect,mouse mark effect,scale in effect,screenshot effect,sheet effect,slide effect,sliding popups effect,taskbar thumbnails effect,thumbnail aside effect,translucency,translucency effect,transparency,window geometry effect,wobbly windows effect,startup feedback effect,dialog parent effect,dim inactive effect,dim screen effect,slide back effect,eye candy,candy,show FPS effect,show paint effect,box switch effect,cover switch effect,desktop cube effect,desktop cube animation effect,desktop grid effect,flip switch effect,outline effect,present windows effect,resize window effectxx
X-KDE-Keywords=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects

View file

@ -33,7 +33,6 @@ class KWinCompositingKCM : public KCModule
{
Q_OBJECT
public:
explicit KWinCompositingKCM(QWidget* parent = 0, const QVariantList& args = QVariantList());
virtual ~KWinCompositingKCM();
public Q_SLOTS:
@ -41,13 +40,33 @@ public Q_SLOTS:
void load() override;
void defaults() override;
protected:
explicit KWinCompositingKCM(QWidget* parent, const QVariantList& args,
KWin::Compositing::EffectView::ViewType viewType);
private:
QScopedPointer<KWin::Compositing::EffectView> m_view;
};
KWinCompositingKCM::KWinCompositingKCM(QWidget* parent, const QVariantList& args)
class KWinDesktopEffects : public KWinCompositingKCM
{
Q_OBJECT
public:
explicit KWinDesktopEffects(QWidget* parent = 0, const QVariantList& args = QVariantList())
: KWinCompositingKCM(parent, args, KWin::Compositing::EffectView::DesktopEffectsView) {}
};
class KWinCompositingSettings : public KWinCompositingKCM
{
Q_OBJECT
public:
explicit KWinCompositingSettings(QWidget* parent = 0, const QVariantList& args = QVariantList())
: KWinCompositingKCM(parent, args, KWin::Compositing::EffectView::CompositingSettingsView) {}
};
KWinCompositingKCM::KWinCompositingKCM(QWidget* parent, const QVariantList& args, KWin::Compositing::EffectView::ViewType viewType)
: KCModule(parent, args)
, m_view(new KWin::Compositing::EffectView)
, m_view(new KWin::Compositing::EffectView(viewType))
{
KDeclarative::KDeclarative kdeclarative;
kdeclarative.setDeclarativeEngine(m_view->engine());
@ -88,7 +107,8 @@ void KWinCompositingKCM::defaults()
}
K_PLUGIN_FACTORY(KWinCompositingConfigFactory,
registerPlugin<KWinCompositingKCM>();
registerPlugin<KWinDesktopEffects>("effects");
registerPlugin<KWinCompositingSettings>("compositing");
)
#include "main.moc"

View file

@ -383,19 +383,28 @@ void EffectFilterModel::defaults()
m_effectModel->defaults();
}
EffectView::EffectView(QWindow *parent)
EffectView::EffectView(ViewType type, QWindow *parent)
: QQuickView(parent)
{
qmlRegisterType<EffectConfig>("org.kde.kwin.kwincompositing", 1, 0, "EffectConfig");
qmlRegisterType<EffectFilterModel>("org.kde.kwin.kwincompositing", 1, 0, "EffectFilterModel");
qmlRegisterType<Compositing>("org.kde.kwin.kwincompositing", 1, 0, "Compositing");
qmlRegisterType<CompositingType>("org.kde.kwin.kwincompositing", 1, 0, "CompositingType");
init();
init(type);
}
void EffectView::init()
void EffectView::init(ViewType type)
{
QString mainFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kwincompositing/qml/main.qml", QStandardPaths::LocateFile);
QString path;
switch (type) {
case CompositingSettingsView:
path = QStringLiteral("kwincompositing/qml/main-compositing.qml");
break;
case DesktopEffectsView:
path = QStringLiteral("kwincompositing/qml/main.qml");
break;
}
QString mainFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, path, QStandardPaths::LocateFile);
setResizeMode(QQuickView::SizeRootObjectToView);
rootContext()->setContextProperty("engine", this);
setSource(QUrl(mainFile));

View file

@ -102,7 +102,11 @@ class EffectView : public QQuickView
Q_OBJECT
public:
EffectView(QWindow *parent = 0);
enum ViewType {
DesktopEffectsView,
CompositingSettingsView
};
EffectView(ViewType type, QWindow *parent = 0);
Q_INVOKABLE QColor backgroundViewColor() { return KColorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)).background(KColorScheme::NormalBackground).color(); };
@ -113,7 +117,7 @@ public:
Q_SIGNALS:
void changed();
private:
void init();
void init(ViewType type);
};

View file

@ -0,0 +1,202 @@
/**************************************************************************
* KWin - the KDE window manager *
* This file is part of the KDE project. *
* *
* Copyright (C) 2013 Antonis Tsiapaliokas <kok3rs@gmail.com> *
* Copyright (C) 2014 Martin Gräßlin <mgraesslin@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import org.kde.kwin.kwincompositing 1.0
import org.kde.plasma.core 2.0
Item {
signal changed
property alias animationSpeedValue: animationSpeed.value
property alias windowThumbnailIndex: windowThumbnail.currentIndex
property alias glScaleFilterIndex: glScaleFilter.currentIndex
property bool xrScaleFilterChecked: xrScaleFilter.currentIndex > 0
property alias unredirectFullScreenChecked: unredirectFullScreen.checked
property alias glSwapStrategyIndex: glSwapStrategy.currentIndex
property alias glColorCorrectionChecked: glColorCorrection.checked
property alias compositingTypeIndex: openGLType.type
property bool compositingEnabledChecked: useCompositing.checked
CompositingType {
id: compositingType
}
GridLayout {
columns: 2
anchors.fill: parent
CheckBox {
id: useCompositing
checked: compositing.compositingEnabled
text: i18n("Enable compositor on startup")
Connections {
target: compositing
onCompositingEnabledChanged: {
useCompositing.checked = compositing.compositingEnabled
}
}
Layout.columnSpan: 2
}
Label {
id: animationText
text: i18n("Animation Speed:")
Layout.alignment: Qt.AlignRight
}
Slider {
id: animationSpeed
maximumValue: 6.0
stepSize: 1.0
tickmarksEnabled: true
value: compositing.animationSpeed
Layout.fillWidth: true
}
Label {
text: i18n("Rendering backend:")
Layout.alignment: Qt.AlignRight
}
ComboBox {
id: openGLType
property int type: 0
model: compositingType
textRole: "NameRole"
onCurrentIndexChanged: {
glScaleFilter.visible = currentIndex != 3;
xrScaleFilter.visible = currentIndex == 3;
glColorCorrection.enabled = currentIndex !=3 && glColorCorrection !=4;
type = compositingType.compositingTypeForIndex(currentIndex);
}
Component.onCompleted: {
type = compositingType.compositingTypeForIndex(currentIndex);
}
Connections {
target: compositing
onCompositingTypeChanged: {
openGLType.currentIndex = compositingType.indexForCompositingType(compositing.compositingType)
}
}
Layout.fillWidth: true
}
Label {
id: scaleFilterText
text: i18n("Scale Method:")
visible: glScaleFilter.visible
Layout.alignment: Qt.AlignRight
}
ComboBox {
id: glScaleFilter
model: [i18n("Crisp"), i18n("Smooth"), i18n("Accurate")]
visible: openGLType.currentIndex != 3
currentIndex: compositing.glScaleFilter
Layout.fillWidth: true
}
Label {
text: i18n("Scale Method:")
visible: xrScaleFilter.visible
Layout.alignment: Qt.AlignRight
}
ComboBox {
id: xrScaleFilter
model: [i18n("Crisp"), i18n("Smooth (slower)")]
visible: openGLType.currentIndex == 3
currentIndex: compositing.xrScaleFilter ? 1 : 0
Layout.fillWidth: true
}
Label {
id: glSwapStrategyText
text: i18n("Tearing Prevention (VSync):")
Layout.alignment: Qt.AlignRight
}
ComboBox {
id: glSwapStrategy
model: [i18n("Never"), i18n("Automatic"), i18n("Only when cheap"), i18n("Full screen repaints"), i18n("Re-use screen content")]
currentIndex: compositing.glSwapStrategy
Layout.fillWidth: true
}
Label {
id: windowThumbnailText
text: i18n("Keep Window Thumbnails:")
Layout.alignment: Qt.AlignRight
}
ComboBox {
id: windowThumbnail
model: [i18n("Always (Breaks Animations)"), i18n("Only for Shown Windows"), i18n("Never")]
currentIndex: compositing.windowThumbnail
Layout.fillWidth: true
}
Label {
text: i18n("Expert:")
Layout.alignment: Qt.AlignRight
}
CheckBox {
id: unredirectFullScreen
checked: compositing.unredirectFullscreen
text: i18n("Suspend compositor for full screen windows")
Connections {
target: compositing
onUnredirectFullscreenChanged: {
unredirectFullScreen.checked = compositing.unredirectFullscreen
}
}
}
Label {
text: i18n("Experimental:")
Layout.alignment: Qt.AlignRight
}
CheckBox {
id: glColorCorrection
checked: compositing.glColorCorrection
enabled: openGLType.currentIndex != 3 && openGLType.currentIndex != 4
text: i18n("Enable color correction")
Connections {
target: compositing
onGlColorCorrectionChanged: {
glColorCorrection.checked = compositing.glColorCorrection
}
}
}
Item {
// spacer
Layout.fillHeight: true
}
}
Connections {
target: openGLType
onCurrentIndexChanged: changed()
}
}//End item

View file

@ -26,15 +26,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
Item {
signal changed
property alias animationSpeedValue: animationSpeed.value
property alias windowThumbnailIndex: windowThumbnail.currentIndex
property alias glScaleFilterIndex: glScaleFilter.currentIndex
property bool xrScaleFilterChecked: xrScaleFilter.currentIndex > 0
property alias unredirectFullScreenChecked: unredirectFullScreen.checked
property alias glSwapStrategyIndex: glSwapStrategy.currentIndex
property alias glColorCorrectionChecked: glColorCorrection.checked
property alias compositingTypeIndex: openGLType.type
property bool compositingEnabledChecked: useCompositing.checked
Component {
id: sectionHeading
@ -52,10 +43,6 @@ Item {
}
}
CompositingType {
id: compositingType
}
EffectConfig {
id: effectConfig
onEffectListChanged: {
@ -63,220 +50,20 @@ Item {
}
}
RowLayout {
id: row
width: parent.width
height: parent.height
Button {
id: ghnsButton
text: i18n("Get New Effects ...")
iconName: "get-hot-new-stuff"
anchors {
left: col.right
top: parent.top
topMargin: col.height/8
}
onClicked: effectConfig.openGHNS()
}
CheckBox {
id: useCompositing
text: i18n("Enable desktop effects on startup")
checked: compositing.compositingEnabled
anchors {
top: ghnsButton.bottom
left: col.right
}
Connections {
target: compositing
onCompositingEnabledChanged: {
useCompositing.checked = compositing.compositingEnabled
}
}
}
CheckBox {
id: windowManagement
text: i18n("Improved Window Management")
checked: false
anchors.left: col.right
anchors.top: useCompositing.bottom
onClicked: searchModel.enableWidnowManagement(windowManagement.checked)
}
ComboBox {
id: openGLType
property int type: 0
model: compositingType
textRole: "NameRole"
anchors.top: windowManagement.bottom
anchors.left: col.right
onCurrentIndexChanged: {
glScaleFilter.visible = currentIndex != 3;
xrScaleFilter.visible = currentIndex == 3;
glColorCorrection.enabled = currentIndex !=3 && glColorCorrection !=4;
type = compositingType.compositingTypeForIndex(currentIndex);
}
Component.onCompleted: {
type = compositingType.compositingTypeForIndex(currentIndex);
}
Connections {
target: compositing
onCompositingTypeChanged: {
openGLType.currentIndex = compositingType.indexForCompositingType(compositing.compositingType)
}
}
}
ColumnLayout {
id: col
anchors.fill: parent
Label {
id: animationText
text: i18n("Animation Speed:")
anchors {
top: openGLType.bottom
horizontalCenter: windowManagement.horizontalCenter
topMargin: 20
}
}
Slider {
id: animationSpeed
maximumValue: 6.0
stepSize: 1.0
tickmarksEnabled: true
value: compositing.animationSpeed
anchors {
top: animationText.bottom
left: col.right
}
}
Label {
id: windowThumbnailText
text: i18n("Keep Window Thumbnails:")
anchors {
top: animationSpeed.bottom
horizontalCenter: windowManagement.horizontalCenter
topMargin: 20
}
}
ComboBox {
id: windowThumbnail
model: [i18n("Always (Breaks Animations)"), i18n("Only for Shown Windows"), i18n("Never")]
currentIndex: compositing.windowThumbnail
Layout.fillWidth: true
anchors {
top: windowThumbnailText.bottom
left: col.right
right: parent.right
}
}
Label {
id: scaleFilterText
text: i18n("Scale Method:")
anchors {
top: windowThumbnail.bottom
horizontalCenter: windowManagement.horizontalCenter
topMargin: 20
}
}
ComboBox {
id: glScaleFilter
model: [i18n("Crisp"), i18n("Smooth"), i18n("Accurate")]
visible: openGLType.currentIndex != 3
currentIndex: compositing.glScaleFilter
anchors {
top: scaleFilterText.bottom
left: col.right
}
}
ComboBox {
id: xrScaleFilter
model: [i18n("Crisp"), i18n("Smooth (slower)")]
visible: openGLType.currentIndex == 3
currentIndex: compositing.xrScaleFilter ? 1 : 0
anchors {
top: scaleFilterText.bottom
left: glScaleFilter.visible ? glScaleFilter.right : col.right
right: parent.right
}
}
CheckBox {
id: unredirectFullScreen
text: i18n("Suspend desktop effects for \nfull screen windows")
checked: compositing.unredirectFullscreen
anchors.left: col.right
anchors.top: xrScaleFilter.bottom
Connections {
target: compositing
onUnredirectFullscreenChanged: {
unredirectFullScreen.checked = compositing.unredirectFullscreen
}
}
}
Label {
id: glSwapStrategyText
text: i18n("Tearing Prevention (VSync):")
anchors {
top: unredirectFullScreen.bottom
horizontalCenter: windowManagement.horizontalCenter
topMargin: 20
}
}
ComboBox {
id: glSwapStrategy
model: [i18n("Never"), i18n("Automatic"), i18n("Only when cheap"), i18n("Full screen repaints"), i18n("Re-use screen content")]
currentIndex: compositing.glSwapStrategy
anchors {
top: glSwapStrategyText.bottom
left: col.right
right: parent.right
}
}
CheckBox {
id: glColorCorrection
text: i18n("Enable color correction \n(experimental)")
checked: compositing.glColorCorrection
enabled: openGLType.currentIndex != 3 && openGLType.currentIndex != 4
anchors {
top: glSwapStrategy.bottom
left: col.right
}
Connections {
target: compositing
onGlColorCorrectionChanged: {
glColorCorrection.checked = compositing.glColorCorrection
}
}
}
ColumnLayout {
id: col
height: parent.height
Layout.minimumWidth: parent.width - windowManagement.width
id: hint
text: i18n("Hint: To find out or configure how to activate an effect, look at the effect's settings.")
anchors {
top: parent.top
left: parent.left
}
}
Label {
id: hint
text: i18n("Hint: To find out or configure how to activate an effect, look at the effect's settings.")
anchors {
top: parent.top
left: parent.left
}
}
RowLayout {
PlasmaComponents.TextField {
id: searchField
clearButtonShown: true
@ -288,66 +75,69 @@ Item {
focus: true
}
EffectFilterModel {
id: searchModel
objectName: "filterModel"
filter: searchField.text
signal effectState(int rowIndex, bool enabled)
onEffectState: {
searchModel.updateEffectStatus(rowIndex, enabled);
}
Button {
id: ghnsButton
text: i18n("Get New Effects ...")
iconName: "get-hot-new-stuff"
onClicked: effectConfig.openGHNS()
}
}
ScrollView {
id: scroll
highlightOnFocus: true
EffectFilterModel {
id: searchModel
objectName: "filterModel"
filter: searchField.text
signal effectState(int rowIndex, bool enabled)
onEffectState: {
searchModel.updateEffectStatus(rowIndex, enabled);
}
}
ScrollView {
id: scroll
highlightOnFocus: true
Layout.fillWidth: true
Layout.fillHeight: true
anchors {
top: searchField.bottom
left: parent.left
bottom: parent.bottom
}
ListView {
id: effectView
property color backgroundActiveColor: searchModel.backgroundActiveColor
property color backgroundNormalColor: searchModel.backgroundNormalColor
property color backgroundAlternateColor: searchModel.backgroundAlternateColor
Layout.fillWidth: true
Layout.fillHeight: true
anchors {
top: searchField.bottom
left: parent.left
bottom: parent.bottom
}
ListView {
id: effectView
property color backgroundActiveColor: searchModel.backgroundActiveColor
property color backgroundNormalColor: searchModel.backgroundNormalColor
property color backgroundAlternateColor: searchModel.backgroundAlternateColor
Layout.fillWidth: true
anchors.fill: parent
model: searchModel
delegate: Effect{
id: effectDelegate
Connections {
id: effectStateConnection
target: null
onChanged: searchModel.effectState(index, checked)
}
Component.onCompleted: {
effectStateConnection.target = effectDelegate
}
anchors.fill: parent
model: searchModel
delegate: Effect{
id: effectDelegate
Connections {
id: effectStateConnection
target: null
onChanged: searchModel.effectState(index, checked)
}
Component.onCompleted: {
effectStateConnection.target = effectDelegate
}
section.property: "CategoryRole"
section.delegate: sectionHeading
}
}
ExclusiveGroup {
id: desktopSwitching
//Our ExclusiveGroup must me outside of the
//ListView, otherwise it will not work
section.property: "CategoryRole"
section.delegate: sectionHeading
}
}
}//End ColumnLayout
}//End RowLayout
ExclusiveGroup {
id: desktopSwitching
//Our ExclusiveGroup must me outside of the
//ListView, otherwise it will not work
}
}//End ColumnLayout
Connections {
target: searchModel
onEffectState: changed()
}
Connections {
target: openGLType
onCurrentIndexChanged: changed()
}
}//End item

View file

@ -0,0 +1,46 @@
/**************************************************************************
* KWin - the KDE window manager *
* This file is part of the KDE project. *
* *
* Copyright (C) 2013 Antonis Tsiapaliokas <kok3rs@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
// for i18n
import org.kde.plasma.core 2.0
Item {
id: openGLErrorView
signal activated
ColumnLayout {
Text {
id: openGLErrorText
text: i18n("OpenGL compositing (the default) has crashed KWin in the past.\n" +
"This was most likely due to a driver bug.\n" +
"If you think that you have meanwhile upgraded to a stable driver,\n" +
"you can reset this protection but be aware that this might result in an immediate crash!\n" +
"Alternatively, you might want to use the XRender backend instead.")
}
Button {
id: openGLButton
text: i18n("Re-enable OpenGL detection")
onClicked: openGLErrorView.activated()
}
}
}

View file

@ -0,0 +1,72 @@
/**************************************************************************
* KWin - the KDE window manager *
* This file is part of the KDE project. *
* *
* Copyright (C) 2013 Antonis Tsiapaliokas <kok3rs@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import org.kde.kwin.kwincompositing 1.0
Rectangle {
id: window
width: 780
height: 480
color: engine.backgroundViewColor()
property bool openGLBrokeState: true
signal changed
OpenGLErrorView {
visible: window.openGLBrokeState
anchors.fill: parent
onActivated: window.openGLBrokeState = compositing.OpenGLIsBroken();
}
CompositingView {
id: view
anchors.fill: parent
visible: !window.openGLBrokeState
onChanged: {
window.changed()
}
}
Compositing {
id: compositing
objectName: "compositing"
animationSpeed: view.animationSpeedValue
windowThumbnail: view.windowThumbnailIndex
glScaleFilter: view.glScaleFilterIndex
xrScaleFilter: view.xrScaleFilterChecked
unredirectFullscreen: view.unredirectFullScreenChecked
glSwapStrategy: view.glSwapStrategyIndex
glColorCorrection: view.glColorCorrectionChecked
compositingType: view.compositingTypeIndex
compositingEnabled: view.compositingEnabledChecked
}
Connections {
target: compositing
onChanged: window.changed()
}
Component.onCompleted: {
openGLBrokeState = compositing.OpenGLIsUnsafe()
compositing.reset();
}
}

View file

@ -32,36 +32,16 @@ Rectangle {
property bool openGLBrokeState: true
signal changed
Item {
id: openGLError
visible: false
OpenGLErrorView {
visible: window.openGLBrokeState
anchors.fill: parent
anchors.leftMargin: parent.width/2 - 100
Text {
id: openGLErrorText
text: i18n("OpenGL compositing (the default) has crashed KWin in the past.\n" +
"This was most likely due to a driver bug.\n" +
"If you think that you have meanwhile upgraded to a stable driver,\n" +
"you can reset this protection but be aware that this might result in an immediate crash!\n" +
"Alternatively, you might want to use the XRender backend instead.")
}
Button {
id: openGLButton
text: i18n("Re-enable OpenGL detection")
anchors.top: openGLErrorText.bottom
onClicked: {
openGLBrokeState = compositing.OpenGLIsBroken();
view.visible = !openGLBrokeState;
openGLError.visible = openGLBrokeState;
}
}
onActivated: window.openGLBrokeState = compositing.OpenGLIsBroken();
}
EffectView{
id: view
anchors.fill: parent
visible: false
visible: !window.openGLBrokeState
onChanged: {
window.changed()
}
@ -69,16 +49,6 @@ Rectangle {
Compositing {
id: compositing
objectName: "compositing"
animationSpeed: view.animationSpeedValue
windowThumbnail: view.windowThumbnailIndex
glScaleFilter: view.glScaleFilterIndex
xrScaleFilter: view.xrScaleFilterChecked
unredirectFullscreen: view.unredirectFullScreenChecked
glSwapStrategy: view.glSwapStrategyIndex
glColorCorrection: view.glColorCorrectionChecked
compositingType: view.compositingTypeIndex
compositingEnabled: view.compositingEnabledChecked
}
Connections {
target: compositing
@ -86,12 +56,7 @@ Rectangle {
}
Component.onCompleted: {
if (compositing.OpenGLIsUnsafe()) {
openGLError.visible = true;
} else {
openGLError.visible = false;
view.visible = true;
}
openGLBrokeState = compositing.OpenGLIsUnsafe()
compositing.reset();
}
}