mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2024-08-15 00:43:43 +00:00
Very early KDE 6 release.
This commit is contained in:
parent
7cc4ccabbc
commit
686046d4f7
6272 changed files with 140920 additions and 529657 deletions
152
kwin/effects/fadingpopups/contents/code/main.js
Normal file
152
kwin/effects/fadingpopups/contents/code/main.js
Normal file
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var blacklist = [
|
||||
// ignore black background behind lockscreen
|
||||
"ksmserver ksmserver",
|
||||
// The logout screen has to be animated only by the logout effect.
|
||||
"ksmserver-logout-greeter ksmserver-logout-greeter",
|
||||
// The lockscreen isn't a popup window
|
||||
"kscreenlocker_greet kscreenlocker_greet",
|
||||
// KDE Plasma splash screen has to be animated only by the login effect.
|
||||
"ksplashqml ksplashqml"
|
||||
];
|
||||
|
||||
var blacklistNames = [
|
||||
"seventasks-floatingavatar",
|
||||
"aerothemeplasma-windowframe-special"
|
||||
];
|
||||
|
||||
function isPopupWindow(window) {
|
||||
|
||||
// If the window is blacklisted, don't animate it.
|
||||
if (blacklist.indexOf(window.windowClass) != -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(blacklistNames.indexOf(window.caption) != -1) {
|
||||
return false;
|
||||
}
|
||||
// Animate combo box popups, tooltips, popup menus, etc.
|
||||
if (window.popupWindow) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Maybe the outline deserves its own effect.
|
||||
if (window.outline) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Override-redirect windows are usually used for user interface
|
||||
// concepts that are expected to be animated by this effect, e.g.
|
||||
// popups that contain window thumbnails on X11, etc.
|
||||
if (!window.managed) {
|
||||
// Some utility windows can look like popup windows (e.g. the
|
||||
// address bar dropdown in Firefox), but we don't want to fade
|
||||
// them because the fade effect didn't do that.
|
||||
if (window.utility) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Previously, there was a "monolithic" fade effect, which tried to
|
||||
// animate almost every window that was shown or hidden. Then it was
|
||||
// split into two effects: one that animates toplevel windows and
|
||||
// this one. In addition to popups, this effect also animates some
|
||||
// special windows(e.g. notifications) because the monolithic version
|
||||
// was doing that.
|
||||
if (window.dock || window.splash || window.toolbar
|
||||
|| window.notification || window.onScreenDisplay
|
||||
|| window.criticalNotification
|
||||
|| window.appletPopup) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var fadingPopupsEffect = {
|
||||
loadConfig: function () {
|
||||
fadingPopupsEffect.fadeInDuration = animationTime(150);
|
||||
fadingPopupsEffect.fadeOutDuration = animationTime(150) * 4;
|
||||
},
|
||||
slotWindowAdded: function (window) {
|
||||
if (effects.hasActiveFullScreenEffect) {
|
||||
return;
|
||||
}
|
||||
if (!isPopupWindow(window)) {
|
||||
return;
|
||||
}
|
||||
if (!window.visible) {
|
||||
return;
|
||||
}
|
||||
if (!effect.grab(window, Effect.WindowAddedGrabRole)) {
|
||||
return;
|
||||
}
|
||||
window.fadeInAnimation = animate({
|
||||
window: window,
|
||||
curve: QEasingCurve.Linear,
|
||||
duration: fadingPopupsEffect.fadeInDuration,
|
||||
type: Effect.Opacity,
|
||||
from: 0.0,
|
||||
to: 1.0
|
||||
});
|
||||
},
|
||||
slotWindowClosed: function (window) {
|
||||
if (effects.hasActiveFullScreenEffect) {
|
||||
return;
|
||||
}
|
||||
if (!isPopupWindow(window)) {
|
||||
return;
|
||||
}
|
||||
if (!window.visible || window.skipsCloseAnimation) {
|
||||
return;
|
||||
}
|
||||
if (!effect.grab(window, Effect.WindowClosedGrabRole)) {
|
||||
return;
|
||||
}
|
||||
window.fadeOutAnimation = animate({
|
||||
window: window,
|
||||
curve: QEasingCurve.OutQuart,
|
||||
duration: fadingPopupsEffect.fadeOutDuration,
|
||||
type: Effect.Opacity,
|
||||
from: 1.0,
|
||||
to: 0.0
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
slotWindowDataChanged: function (window, role) {
|
||||
if (role == Effect.WindowAddedGrabRole) {
|
||||
if (window.fadeInAnimation && effect.isGrabbed(window, role)) {
|
||||
cancel(window.fadeInAnimation);
|
||||
delete window.fadeInAnimation;
|
||||
}
|
||||
} else if (role == Effect.WindowClosedGrabRole) {
|
||||
if (window.fadeOutAnimation && effect.isGrabbed(window, role)) {
|
||||
cancel(window.fadeOutAnimation);
|
||||
delete window.fadeOutAnimation;
|
||||
}
|
||||
}
|
||||
},
|
||||
init: function () {
|
||||
fadingPopupsEffect.loadConfig();
|
||||
|
||||
effect.configChanged.connect(fadingPopupsEffect.loadConfig);
|
||||
effects.windowAdded.connect(fadingPopupsEffect.slotWindowAdded);
|
||||
effects.windowClosed.connect(fadingPopupsEffect.slotWindowClosed);
|
||||
effects.windowDataChanged.connect(fadingPopupsEffect.slotWindowDataChanged);
|
||||
}
|
||||
};
|
||||
|
||||
fadingPopupsEffect.init();
|
142
kwin/effects/fadingpopups/metadata.json
Normal file
142
kwin/effects/fadingpopups/metadata.json
Normal file
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
"KPackageStructure": "KWin/Effect",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "vlad.zahorodnii@kde.org",
|
||||
"Name": "Vlad Zahorodnii",
|
||||
"Name[ar]": "فلاد زاهورودني",
|
||||
"Name[az]": "Vlad Zahorodnii",
|
||||
"Name[be]": "Vlad Zahorodnii",
|
||||
"Name[bg]": "Vlad Zahorodnii",
|
||||
"Name[ca@valencia]": "Vlad Zahorodnii",
|
||||
"Name[ca]": "Vlad Zahorodnii",
|
||||
"Name[cs]": "Vlad Zahorodnii",
|
||||
"Name[de]": "Vlad Zahorodnii",
|
||||
"Name[en_GB]": "Vlad Zahorodnii",
|
||||
"Name[eo]": "Vlad Zahorodnii",
|
||||
"Name[es]": "Vlad Zahorodnii",
|
||||
"Name[et]": "Vlad Zahorodnii",
|
||||
"Name[eu]": "Vlad Zahorodnii",
|
||||
"Name[fi]": "Vlad Zahorodnii",
|
||||
"Name[fr]": "Vlad Zahorodnii",
|
||||
"Name[gl]": "Vlad Zahorodnii.",
|
||||
"Name[he]": "ולאד זהורודני",
|
||||
"Name[hu]": "Vlad Zahorodnii",
|
||||
"Name[ia]": "Vlad Zahorodnii",
|
||||
"Name[id]": "Vlad Zahorodnii",
|
||||
"Name[is]": "Vlad Zahorodnii",
|
||||
"Name[it]": "Vlad Zahorodnii",
|
||||
"Name[ja]": "Vlad Zahorodnii",
|
||||
"Name[ka]": "Vlad Zahorodnii",
|
||||
"Name[ko]": "Vlad Zahorodnii",
|
||||
"Name[lt]": "Vlad Zahorodnii",
|
||||
"Name[nl]": "Vlad Zahorodnii",
|
||||
"Name[nn]": "Vlad Zahorodnii",
|
||||
"Name[pl]": "Vlad Zahorodnii",
|
||||
"Name[pt]": "Vlad Zahorodnii",
|
||||
"Name[pt_BR]": "Vlad Zahorodnii",
|
||||
"Name[ro]": "Vlad Zahorodnii",
|
||||
"Name[ru]": "Влад Загородний",
|
||||
"Name[sk]": "Vlad Zahorodnii",
|
||||
"Name[sl]": "Vlad Zahorodnii",
|
||||
"Name[sv]": "Vlad Zahorodnii",
|
||||
"Name[ta]": "விலாட் ஜாஹொரிடுனி",
|
||||
"Name[tr]": "Vlad Zahorodnii",
|
||||
"Name[uk]": "Влад Загородній",
|
||||
"Name[vi]": "Vlad Zahorodnii",
|
||||
"Name[x-test]": "xxVlad Zahorodniixx",
|
||||
"Name[zh_CN]": "Vlad Zahorodnii",
|
||||
"Name[zh_TW]": "Vlad Zahorodnii"
|
||||
}
|
||||
],
|
||||
"Category": "Appearance",
|
||||
"Description": "Make popups smoothly fade in and out when they are shown or hidden",
|
||||
"Description[ar]": "اجعل النوافذ المنبثقة تظهر وتتلاشى بنعومة عند إظهاراها وإخفائها",
|
||||
"Description[be]": "Плаўнае згасанне або з'яўленне выплыўных акон",
|
||||
"Description[bg]": "Постепенно избледняване при показване и скриване на изскачащите прозорци",
|
||||
"Description[ca@valencia]": "Fa que els missatges emergents s'encengen o s'apaguen de manera gradual quan es mostren o s'oculten",
|
||||
"Description[ca]": "Fa que els missatges emergents s'encenguin o s'apaguin de manera gradual quan es mostren o s'oculten",
|
||||
"Description[cs]": "Nechá vyskakovací okna plynule zmizet/objevit se, pokud jsou zobrazeny resp. skryty",
|
||||
"Description[de]": "Blendet Aufklappfenster beim Öffnen/Schließen langsam ein bzw. aus",
|
||||
"Description[en_GB]": "Make popups smoothly fade in and out when they are shown or hidden",
|
||||
"Description[eo]": "Fari ŝprucfenestrojn glate mal- kaj fordissolvi kiam ili estas montritaj aŭ kaŝitaj",
|
||||
"Description[es]": "Hacer que las ventanas emergentes se desvanezcan y reaparezcan suavemente al mostrarlas y al ocultarlas",
|
||||
"Description[et]": "Paneb hüpikaknad sujuvalt hääbuma või tugevnema, kui need peidetakse või nähtavale tuuakse",
|
||||
"Description[eu]": "Gainerakorrak emeki koloregabetu/koloretu haiek erakustean edo ezkutatzean",
|
||||
"Description[fi]": "Häivyttää ponnahdusikkunat pehmeästi näytölle tai näytöltä",
|
||||
"Description[fr]": "Faire un fondu enchaîné avant ou arrière des infobulles lorsqu'elles sont affichées ou masquées",
|
||||
"Description[gl]": "Esvae e fai opacas as xanelas emerxentes con suavidade ao mostralas ou agochadas.",
|
||||
"Description[he]": "לגרום לחלוניות צצות להתעמעם פנימה או החוצה בצורה חלקה כשהם מופיעים או מוסתרים",
|
||||
"Description[hu]": "A felugrók folyamatosan áttűnő módon lesznek elrejtve és megjelenítve",
|
||||
"Description[ia]": "Face que fenestras pote dulcemente pallidir intra e foras quando illos es monstrate o celate",
|
||||
"Description[is]": "Láta sprettiglugga birtast og hverfa mjúklega þegar þeir eru opnaðir eða faldir",
|
||||
"Description[it]": "Fai dissolvere e comparire gradualmente le finestre a comparsa quando vengono mostrate o nascoste",
|
||||
"Description[ja]": "ポップアップが表示/非表示時にフェードします",
|
||||
"Description[ka]": "მხტუნარების რბილი მინავლება და გამოჩენა, როცა ისინი იმალება ან გამოჩნდებიან",
|
||||
"Description[ko]": "팝업이 보여지거나 감춰질 때 부드러운 페이드 인/아웃을 사용합니다",
|
||||
"Description[lt]": "Padaryti, kad iškylantieji langai glotniai laipsniškai atsirastų ir išnyktų, kai yra rodomi ar slepiami",
|
||||
"Description[nl]": "Laat pop-ups vloeiend opkomen/vervagen als ze worden weergegeven of verborgen",
|
||||
"Description[nn]": "Ton sprettoppvindauge gradvis inn og ut når dei vert viste eller gøymde",
|
||||
"Description[pl]": "Okna wysuwne gładko wyłaniają się przy otwieraniu i zanikają przy zamykaniu",
|
||||
"Description[pt]": "Faz com que as janelas modais apareçam e desapareçam suavemente quando são apresentadas ou escondidas",
|
||||
"Description[ro]": "Face indiciile să se (de)coloreze când sunt arătate sau ascunse",
|
||||
"Description[ru]": "Всплывающие окна при закрытии будут становиться всё более прозрачными, а потом совсем исчезать",
|
||||
"Description[sk]": "Plynulé objavovanie a miznutie vyskakovacích okien pri ich zobrazení alebo skrytí",
|
||||
"Description[sl]": "Modalna okna naj se gladko odtemnijo oz. zatemnijo, kadar se prikažejo ali skrijejo",
|
||||
"Description[ta]": "தெரித்தெழும் சாளரங்கள் காட்டப்படும்போது படிப்படியாக ஒளிகூடி மறைக்கப்படும்போது மங்கி செல்லும்",
|
||||
"Description[tr]": "Açılır pencereler gösterilirken veya gizlenirken pürüzsüzce geçiş yapmalarını sağlar",
|
||||
"Description[uk]": "Поступова поява або зникнення контекстних вікон вікон при відкритті чи закритті",
|
||||
"Description[vi]": "Làm ô bật lên hiện dần và mờ dần một cách êm dịu khi chúng hiện ra và biến mất",
|
||||
"Description[x-test]": "xxMake popups smoothly fade in and out when they are shown or hiddenxx",
|
||||
"Description[zh_CN]": "气泡信息显示/隐藏时呈现渐入渐出过渡动画",
|
||||
"Description[zh_TW]": "讓彈出視窗在顯示或隱藏的時候平滑地淡入或淡出",
|
||||
"EnabledByDefault": true,
|
||||
"Icon": "preferences-system-windows-effect-fadingpopups",
|
||||
"Id": "fadingpopups",
|
||||
"License": "GPL",
|
||||
"Name": "Fading Popups",
|
||||
"Name[ar]": "تتلاشى النوافذ المنبثقة",
|
||||
"Name[be]": "Згасанне выплыўных акон",
|
||||
"Name[bg]": "Избледняващи изскачащи прозорци",
|
||||
"Name[ca@valencia]": "Missatges emergents esvaïts",
|
||||
"Name[ca]": "Missatges emergents esvaïts",
|
||||
"Name[cs]": "Mizející vyskakovací okna",
|
||||
"Name[de]": "Überblendete Aufklappfenster",
|
||||
"Name[en_GB]": "Fading Popups",
|
||||
"Name[eo]": "Fading Popups",
|
||||
"Name[es]": "Desvanecer ventanas emergentes",
|
||||
"Name[et]": "Hääbuvad hüpikdialoogid",
|
||||
"Name[eu]": "Itzaleztatzen diren gainerakorrak",
|
||||
"Name[fi]": "Ponnahdusikkunoiden häivytys",
|
||||
"Name[fr]": "Atténuation des infobulles",
|
||||
"Name[gl]": "Xanelas emerxentes que esvaen",
|
||||
"Name[he]": "חלונית צצות דועכות",
|
||||
"Name[hu]": "Áttűnő felugrók",
|
||||
"Name[ia]": "Popups dissolvente",
|
||||
"Name[is]": "Dofnandi sprettigluggar",
|
||||
"Name[it]": "Finestre a comparsa che si dissolvono",
|
||||
"Name[ja]": "フェードするポップアップ",
|
||||
"Name[ka]": "მინავლებადი მხტუნარები",
|
||||
"Name[ko]": "페이드 팝업",
|
||||
"Name[lt]": "Laipsniškai išnykstantys ir atsirandantys iškylantieji langai",
|
||||
"Name[nl]": "Vervagende pop-ups",
|
||||
"Name[nn]": "Inn- og uttoning av sprettoppvindauge",
|
||||
"Name[pl]": "Zanikanie okien wysuwnych",
|
||||
"Name[pt]": "Janelas a Desvanecer",
|
||||
"Name[pt_BR]": "Desvanecer mensagens",
|
||||
"Name[ro]": "Indicii estompate",
|
||||
"Name[ru]": "Растворяющиеся всплывающие окна",
|
||||
"Name[sk]": "Miznúce vyskakovacie okná",
|
||||
"Name[sl]": "Prelivni pojavni gradniki",
|
||||
"Name[ta]": "தெரித்தெழும் சாளரங்கள் மங்கும்",
|
||||
"Name[tr]": "Solan Açılır Pencereler",
|
||||
"Name[uk]": "Інтерактивні контекстні панелі",
|
||||
"Name[vi]": "Ô bật lên ngả màu",
|
||||
"Name[x-test]": "xxFading Popupsxx",
|
||||
"Name[zh_CN]": "气泡显隐渐变动画",
|
||||
"Name[zh_TW]": "淡化彈出視窗"
|
||||
},
|
||||
"X-KDE-Ordering": 60,
|
||||
"X-Plasma-API": "javascript"
|
||||
}
|
72
kwin/effects/login/contents/code/main.js
Normal file
72
kwin/effects/login/contents/code/main.js
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2007 Lubos Lunak <l.lunak@kde.org>
|
||||
SPDX-FileCopyrightText: 2013 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var loginEffect = {
|
||||
duration: animationTime(300),
|
||||
isFadeToBlack: false,
|
||||
loadConfig: function () {
|
||||
loginEffect.isFadeToBlack = effect.readConfig("FadeToBlack", false);
|
||||
},
|
||||
isLoginSplash: function (window) {
|
||||
return window.windowClass === "ksplashqml ksplashqml";
|
||||
},
|
||||
isLockScreen: function (window) {
|
||||
return window.windowClass === "kscreenlocker_greet kscreenlocker_greet";
|
||||
},
|
||||
fadeOut: function (window) {
|
||||
animate({
|
||||
window: window,
|
||||
duration: loginEffect.duration,
|
||||
type: Effect.Opacity,
|
||||
from: 1.0,
|
||||
to: 0.0
|
||||
});
|
||||
},
|
||||
fadeToBlack: function (window) {
|
||||
animate({
|
||||
window: window,
|
||||
duration: loginEffect.duration / 2,
|
||||
animations: [{
|
||||
type: Effect.Brightness,
|
||||
from: 1.0,
|
||||
to: 0.0
|
||||
}, {
|
||||
type: Effect.Opacity,
|
||||
from: 1.0,
|
||||
to: 0.0,
|
||||
delay: loginEffect.duration / 2
|
||||
}, {
|
||||
// TODO: is there a better way to keep brightness constant?
|
||||
type: Effect.Brightness,
|
||||
from: 0.0,
|
||||
to: 0.0,
|
||||
delay: loginEffect.duration / 2
|
||||
}]
|
||||
});
|
||||
},
|
||||
closed: function (window) {
|
||||
if (!(loginEffect.isLoginSplash(window) || loginEffect.isLockScreen(window))) {
|
||||
return;
|
||||
}
|
||||
if (loginEffect.isFadeToBlack === true && !loginEffect.isLockScreen(window)) {
|
||||
loginEffect.fadeToBlack(window);
|
||||
} else {
|
||||
loginEffect.fadeOut(window);
|
||||
}
|
||||
},
|
||||
init: function () {
|
||||
effect.configChanged.connect(loginEffect.loadConfig);
|
||||
effects.windowClosed.connect(loginEffect.closed);
|
||||
loginEffect.loadConfig();
|
||||
}
|
||||
};
|
||||
loginEffect.init();
|
12
kwin/effects/login/contents/config/main.xml
Normal file
12
kwin/effects/login/contents/config/main.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name=""/>
|
||||
<group name="">
|
||||
<entry name="FadeToBlack" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
38
kwin/effects/login/contents/ui/config.ui
Normal file
38
kwin/effects/login/contents/ui/config.ui
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>KWin::LoginEffectConfigForm</class>
|
||||
<widget class="QWidget" name="KWin::LoginEffectConfigForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>160</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="kcfg_FadeToBlack">
|
||||
<property name="text">
|
||||
<string>Fade to black (fullscreen splash screens only)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
146
kwin/effects/login/metadata.json
Normal file
146
kwin/effects/login/metadata.json
Normal file
|
@ -0,0 +1,146 @@
|
|||
{
|
||||
"KPackageStructure": "KWin/Effect",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "l.lunak@kde.org, kde@privat.broulik.de, mgraesslin@kde.org",
|
||||
"Name": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ar]": "لوبوس لوناك، كاي أووي بروتيك، مارتن جراجلين",
|
||||
"Name[be]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[bg]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ca@valencia]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ca]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[cs]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[de]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[en_GB]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[eo]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[es]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[et]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[eu]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[fi]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[fr]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[gl]": "Lubos Lunak, Kai Uwe Broulik e Martin Gräßlin.",
|
||||
"Name[he]": "לובוש לוניאק, קאי אווה ברוליקה, מרטין גרייסלין",
|
||||
"Name[hu]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ia]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[is]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[it]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ja]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ka]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ko]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[lt]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[lv]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[nl]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[nn]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[pl]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[pt]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ro]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ru]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[sk]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[sl]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[sv]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[ta]": "லூபோசு லுனாக்கு, காய் ஊவே புரோலிக்கு, மார்ட்டின் கிராஸ்லின்",
|
||||
"Name[tr]": "Luboš Luňák, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[uk]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[vi]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[x-test]": "xxLubos Lunak, Kai Uwe Broulik, Martin Gräßlinxx",
|
||||
"Name[zh_CN]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin",
|
||||
"Name[zh_TW]": "Lubos Lunak, Kai Uwe Broulik, Martin Gräßlin"
|
||||
}
|
||||
],
|
||||
"Category": "Appearance",
|
||||
"Description": "Smoothly fade to the desktop when logging in",
|
||||
"Description[ar]": "اظهار سطح المكتب بنعومة عند الولوج",
|
||||
"Description[be]": "Плаўнае зацямненне працоўнага стала падчас уваходу",
|
||||
"Description[bg]": "Плавен преход към работния плот при влизане",
|
||||
"Description[ca@valencia]": "Transició suau a l'escriptori en connectar-se",
|
||||
"Description[ca]": "Transició suau a l'escriptori en connectar-se",
|
||||
"Description[cs]": "Plynule zobrazit plochu po přihlášení",
|
||||
"Description[de]": "Blendet die Arbeitsfläche nach der Anmeldung langsam ein",
|
||||
"Description[en_GB]": "Smoothly fade to the desktop when logging in",
|
||||
"Description[eo]": "Glate dissolvi al la labortablo dum ensaluto",
|
||||
"Description[es]": "Desvanecimiento suave para mostrar el escritorio al iniciar sesión",
|
||||
"Description[et]": "Töölaua sujuv ilmumine sisselogimisel",
|
||||
"Description[eu]": "Emeki desagertu mahaigainerantz saio-hastean",
|
||||
"Description[fi]": "Häivytä kirjauduttaessa pehmeästi työpöydälle",
|
||||
"Description[fr]": "Effectuer un dégradé progressif vers le bureau lors de la connexion",
|
||||
"Description[gl]": "Suaviza a entrada no escritorio cun efecto de esvaecemento.",
|
||||
"Description[he]": "עמעום חלק לתוך שולחן העבודה עם הכניסה למערכת",
|
||||
"Description[hu]": "Finom elhalványodás az asztalra bejelentkezéskor",
|
||||
"Description[ia]": "Dulcemente pallidi le scriptorio quando tu accede in identification",
|
||||
"Description[is]": "Láta skjáborð birtast mjúklega við innskráningu",
|
||||
"Description[it]": "Dissolvenza graduale del desktop all'accesso",
|
||||
"Description[ja]": "ログイン時にデスクトップを滑らかに表示します",
|
||||
"Description[ka]": "შესვლისას სამუშაო მაგიდაზე რბილი გადასვლა",
|
||||
"Description[ko]": "로그인할 때 부드럽게 바탕 화면을 보여 줍니다",
|
||||
"Description[lt]": "Prisijungiant laipsniškai pereiti į darbalaukį",
|
||||
"Description[lv]": "Ierakstīšanās laikā vienmērīgi izgaist līdz darbvirsmai",
|
||||
"Description[nl]": "Laat het opstartscherm vervagen naar het opkomende bureaublad tijdens het aanmelden",
|
||||
"Description[nn]": "Ton inn skrivebordet ved innlogging",
|
||||
"Description[pl]": "Płynne rozjaśnianie do pulpitu podczas logowania",
|
||||
"Description[pt]": "Desvanecer suavemente para o ecrã após a autenticação",
|
||||
"Description[ro]": "Estompează lin biroul la autentificare",
|
||||
"Description[ru]": "Плавное проявление рабочего стола при входе в систему",
|
||||
"Description[sk]": "Plynulé prelínanie na plochu pri prihlasovaní",
|
||||
"Description[sl]": "Ob prijavi gladko prelije na namizje",
|
||||
"Description[sv]": "Tona mjukt till skrivbordet vid inloggning",
|
||||
"Description[ta]": "அமர்வில் நுழையும்போது பணிமேடையின் ஒளிபுகாமையை படிப்படியாக உயர்த்தி அதைக் காட்டும்",
|
||||
"Description[tr]": "Oturum açarken masaüstüne pürüzsüzce geçiş yap",
|
||||
"Description[uk]": "Плавна поява стільниці під час входу",
|
||||
"Description[vi]": "Làm mờ dần sang bàn làm việc một cách êm dịu khi đăng nhập",
|
||||
"Description[x-test]": "xxSmoothly fade to the desktop when logging inxx",
|
||||
"Description[zh_CN]": "登录时平滑地过渡到桌面",
|
||||
"Description[zh_TW]": "登入時平順地淡入桌面",
|
||||
"EnabledByDefault": true,
|
||||
"Icon": "preferences-system-windows-effect-login",
|
||||
"Id": "login",
|
||||
"License": "GPL",
|
||||
"Name": "Login",
|
||||
"Name[ar]": "ولوج",
|
||||
"Name[be]": "Увайсці",
|
||||
"Name[bg]": "Вход",
|
||||
"Name[ca@valencia]": "Inici de sessió",
|
||||
"Name[ca]": "Inici de sessió",
|
||||
"Name[cs]": "Přihlášení",
|
||||
"Name[de]": "Anmeldung",
|
||||
"Name[en_GB]": "Login",
|
||||
"Name[eo]": "Ensaluti",
|
||||
"Name[es]": "Inicio de sesión",
|
||||
"Name[et]": "Sisselogimine",
|
||||
"Name[eu]": "Saio-hastea",
|
||||
"Name[fi]": "Kirjaudu",
|
||||
"Name[fr]": "Se connecter",
|
||||
"Name[gl]": "Acceso",
|
||||
"Name[he]": "כניסה",
|
||||
"Name[hu]": "Bejelentkezés",
|
||||
"Name[ia]": "Accesso de identification",
|
||||
"Name[is]": "Innskráning",
|
||||
"Name[it]": "Accedi",
|
||||
"Name[ja]": "ログイン",
|
||||
"Name[ka]": "შესვლა",
|
||||
"Name[ko]": "로그인",
|
||||
"Name[lt]": "Prisijungimas",
|
||||
"Name[lv]": "Ierakstīšanās",
|
||||
"Name[nl]": "Aanmelden",
|
||||
"Name[nn]": "Innlogging",
|
||||
"Name[pl]": "Logowanie",
|
||||
"Name[pt]": "Arranque",
|
||||
"Name[pt_BR]": "Início de sessão",
|
||||
"Name[ro]": "Autentificare",
|
||||
"Name[ru]": "Вход в систему",
|
||||
"Name[sk]": "Prihlásenie",
|
||||
"Name[sl]": "Prijava",
|
||||
"Name[sv]": "Inloggning",
|
||||
"Name[ta]": "நுழைவு",
|
||||
"Name[tr]": "Oturumu Aç",
|
||||
"Name[uk]": "Вхід",
|
||||
"Name[vi]": "Đăng nhập",
|
||||
"Name[x-test]": "xxLoginxx",
|
||||
"Name[zh_CN]": "登录渐变动画",
|
||||
"Name[zh_TW]": "登入"
|
||||
},
|
||||
"X-KDE-ConfigModule": "kcm_kwin4_genericscripted",
|
||||
"X-KDE-Ordering": 40,
|
||||
"X-KWin-Config-TranslationDomain": "kwin",
|
||||
"X-Plasma-API": "javascript"
|
||||
}
|
137
kwin/effects/morphingpopups/contents/code/main.js
Normal file
137
kwin/effects/morphingpopups/contents/code/main.js
Normal file
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
|
||||
SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var morphingEffect = {
|
||||
duration: animationTime(200),
|
||||
loadConfig: function () {
|
||||
morphingEffect.duration = animationTime(200);
|
||||
},
|
||||
|
||||
handleFrameGeometryAboutToChange: function (window) {
|
||||
var couldRetarget = false;
|
||||
if (window.fadeAnimation) {
|
||||
couldRetarget = retarget(window.fadeAnimation[0], 1.0, morphingEffect.duration);
|
||||
}
|
||||
|
||||
if (!couldRetarget) {
|
||||
window.fadeAnimation = animate({
|
||||
window: window,
|
||||
duration: morphingEffect.duration,
|
||||
curve: QEasingCurve.Linear,
|
||||
animations: [{
|
||||
type: Effect.CrossFadePrevious,
|
||||
to: 1.0,
|
||||
from: 0.0
|
||||
}]
|
||||
});
|
||||
}
|
||||
},
|
||||
handleFrameGeometryChanged: function (window, oldGeometry) {
|
||||
var newGeometry = window.geometry;
|
||||
|
||||
//only do the transition for near enough tooltips,
|
||||
//don't cross the whole screen: ugly
|
||||
var distance = Math.abs(oldGeometry.x - newGeometry.x) + Math.abs(oldGeometry.y - newGeometry.y);
|
||||
|
||||
if (distance > (newGeometry.width + newGeometry.height) * 2) {
|
||||
if (window.moveAnimation) {
|
||||
delete window.moveAnimation;
|
||||
}
|
||||
if (window.fadeAnimation) {
|
||||
delete window.fadeAnimation;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//don't resize it "too much", set as four times
|
||||
if ((newGeometry.width / oldGeometry.width) > 8 ||
|
||||
(oldGeometry.width / newGeometry.width) > 8 ||
|
||||
(newGeometry.height / oldGeometry.height) > 8 ||
|
||||
(oldGeometry.height / newGeometry.height) > 8) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.setData(Effect.WindowForceBackgroundContrastRole, false);
|
||||
window.setData(Effect.WindowForceBlurRole, true);
|
||||
|
||||
var couldRetarget = false;
|
||||
|
||||
if (window.moveAnimation) {
|
||||
if (window.moveAnimation[0]) {
|
||||
couldRetarget = retarget(window.moveAnimation[0], {
|
||||
value1: newGeometry.width,
|
||||
value2: newGeometry.height
|
||||
}, morphingEffect.duration);
|
||||
}
|
||||
if (couldRetarget && window.moveAnimation[1]) {
|
||||
couldRetarget = retarget(window.moveAnimation[1], {
|
||||
value1: newGeometry.x + newGeometry.width/2,
|
||||
value2: newGeometry.y + newGeometry.height / 2
|
||||
}, morphingEffect.duration);
|
||||
}
|
||||
if (!couldRetarget) {
|
||||
cancel(window.moveAnimation[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!couldRetarget) {
|
||||
window.moveAnimation = animate({
|
||||
window: window,
|
||||
duration: morphingEffect.duration,
|
||||
curve: QEasingCurve.Linear,
|
||||
animations: [{
|
||||
type: Effect.Size,
|
||||
to: {
|
||||
value1: newGeometry.width,
|
||||
value2: newGeometry.height
|
||||
},
|
||||
from: {
|
||||
value1: oldGeometry.width,
|
||||
value2: oldGeometry.height
|
||||
}
|
||||
}, {
|
||||
type: Effect.Position,
|
||||
to: {
|
||||
value1: newGeometry.x + newGeometry.width / 2,
|
||||
value2: newGeometry.y + newGeometry.height / 2
|
||||
},
|
||||
from: {
|
||||
value1: oldGeometry.x + oldGeometry.width / 2,
|
||||
value2: oldGeometry.y + oldGeometry.height / 2
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
manage: function (window) {
|
||||
//only tooltips and notifications
|
||||
if (!window.tooltip && !window.notification && !window.criticalNotification) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.windowFrameGeometryAboutToChange.connect(morphingEffect.handleFrameGeometryAboutToChange);
|
||||
window.windowFrameGeometryChanged.connect(morphingEffect.handleFrameGeometryChanged);
|
||||
},
|
||||
|
||||
init: function () {
|
||||
effect.configChanged.connect(morphingEffect.loadConfig);
|
||||
effects.windowAdded.connect(morphingEffect.manage);
|
||||
|
||||
for (const window of effects.stackingOrder) {
|
||||
morphingEffect.manage(window);
|
||||
}
|
||||
}
|
||||
};
|
||||
morphingEffect.init();
|
141
kwin/effects/morphingpopups/metadata.json
Normal file
141
kwin/effects/morphingpopups/metadata.json
Normal file
|
@ -0,0 +1,141 @@
|
|||
{
|
||||
"KPackageStructure": "KWin/Effect",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "mart@kde.org",
|
||||
"Name": "Marco Martin",
|
||||
"Name[ar]": "ماركو مارتن",
|
||||
"Name[ast]": "Marco Martin",
|
||||
"Name[az]": "Marco Martin",
|
||||
"Name[be]": "Marco Martin",
|
||||
"Name[bg]": "Marco Martin",
|
||||
"Name[ca@valencia]": "Marco Martin",
|
||||
"Name[ca]": "Marco Martin",
|
||||
"Name[cs]": "Marco Martin",
|
||||
"Name[de]": "Marco Martin",
|
||||
"Name[en_GB]": "Marco Martin",
|
||||
"Name[eo]": "Marco Martin",
|
||||
"Name[es]": "Marco Martin",
|
||||
"Name[et]": "Marco Martin",
|
||||
"Name[eu]": "Marco Martin",
|
||||
"Name[fi]": "Marco Martin",
|
||||
"Name[fr]": "Marco Martin",
|
||||
"Name[gl]": "Marco Martin",
|
||||
"Name[he]": "מרקו מרטין",
|
||||
"Name[hu]": "Marco Martin",
|
||||
"Name[ia]": "Marco Martin",
|
||||
"Name[id]": "Marco Martin",
|
||||
"Name[is]": "Marco Martin",
|
||||
"Name[it]": "Marco Martin",
|
||||
"Name[ja]": "Marco Martin",
|
||||
"Name[ka]": "Marco Martin",
|
||||
"Name[ko]": "Marco Martin",
|
||||
"Name[lt]": "Marco Martin",
|
||||
"Name[nl]": "Marco Martin",
|
||||
"Name[nn]": "Marco Martin",
|
||||
"Name[pl]": "Marco Martin",
|
||||
"Name[pt]": "Marco Martin",
|
||||
"Name[pt_BR]": "Marco Martin",
|
||||
"Name[ro]": "Marco Martin",
|
||||
"Name[ru]": "Marco Martin",
|
||||
"Name[sk]": "Marco Martin",
|
||||
"Name[sl]": "Marco Martin",
|
||||
"Name[sv]": "Marco Martin",
|
||||
"Name[ta]": "மார்கோ மார்ட்டின்",
|
||||
"Name[tr]": "Marco Martin",
|
||||
"Name[uk]": "Marco Martin",
|
||||
"Name[vi]": "Marco Martin",
|
||||
"Name[x-test]": "xxMarco Martinxx",
|
||||
"Name[zh_CN]": "Marco Martin",
|
||||
"Name[zh_TW]": "Marco Martin"
|
||||
}
|
||||
],
|
||||
"Category": "Appearance",
|
||||
"Description": "Cross fade animation when Tooltips or Notifications change their geometry",
|
||||
"Description[ar]": "تحريك التلاشي المتقاطع عندما يغير التلميح أو الإشعار من أبعاده",
|
||||
"Description[be]": "Анімацыя згасання пры змене геаметрыі выплыўных падказак і апавяшчэнняў",
|
||||
"Description[bg]": "Кръстосано преливане, когато подсказките или известията променят геометрията си",
|
||||
"Description[ca@valencia]": "Animació d'esvaïment creuat quan els consells d'eines o les notificacions canvien la seua geometria",
|
||||
"Description[ca]": "Animació d'esvaïment creuat quan els consells d'eines o les notificacions canvien la seva geometria",
|
||||
"Description[de]": "Überblendende Animationen, wenn Kurzinfos oder Benachrichtigungen ihre Geometrie ändern",
|
||||
"Description[en_GB]": "Cross fade animation when Tooltips or Notifications change their geometry",
|
||||
"Description[eo]": "Krucfada animacio kiam Konsiletoj aŭ Sciigoj ŝanĝas sian geometrion",
|
||||
"Description[es]": "Animación cruzada cuando las ayudas emergentes o las notificaciones cambian su geometría",
|
||||
"Description[et]": "Animatsioon hääbumisega, kui kohtspikrid või märguanded muudavad geomeetriat",
|
||||
"Description[eu]": "Desagertze gurutzatua tresnen argibideek edo jakinarazpenek geometria aldatzen dutenean",
|
||||
"Description[fi]": "Häivytysanimaatio työkaluvihjeiden tai ilmoitusten muutettua muotoaan",
|
||||
"Description[fr]": "Animation en fondu enchaîné lorsque des infobulles ou des notifications modifient leurs géométries",
|
||||
"Description[gl]": "Usar unha animación de esvaemento cando a xeometría das mensaxes emerxentes de axuda ou notificación cambia.",
|
||||
"Description[he]": "הנפשת עמעום צולבת כשחלוניות עצה או התראות משנים את גודלם/מיקומם",
|
||||
"Description[hu]": "Keresztbe halványulás animáció, amikor a buboréksúgók vagy az értesítések megváltoztatják a geometriájukat",
|
||||
"Description[ia]": "Transversa animation distingite quando Consilios o Notificationes cambia le lor geometria",
|
||||
"Description[is]": "Láta dofna á milli þegar vísbendingar eða tilkynningar breyta stærð sinni og/eða stöðu",
|
||||
"Description[it]": "Animazione in dissolvenza quando i suggerimenti e le notifiche cambiano la loro geometria",
|
||||
"Description[ja]": "ツールチップや通知ポップアップのジオメトリ変更時のクロスフェードアニメーション",
|
||||
"Description[ka]": "ჯვროვანი მინავლება, როცა მინიშნებები ან გაფრთხილებები გეომეტრიას იცვლიან",
|
||||
"Description[ko]": "풍선 도움말이나 알림 크기가 변경될 때 크로스페이드 애니메이션 사용",
|
||||
"Description[lt]": "Užplūdimo animacija, kai paaiškinimai ar pranešimai pakeičia savo geometriją",
|
||||
"Description[nl]": "Verwissel animatie van opkomen/vervagen wanneer tekstballonnen of meldingen hun geometrie wijzigen",
|
||||
"Description[nn]": "Krysstoningsanimasjon når hjelpebobler eller varslingar endrar form",
|
||||
"Description[pl]": "Efekt zmiany kształtu podpowiedzi i powiadomień przy zmianie ich geometrii",
|
||||
"Description[pt]": "Animações desvanecidas quando as dicas ou notificações mudam de tamanho",
|
||||
"Description[ru]": "При изменении формы всплывающих подсказок или уведомлений они плавно растягиваются или сжимаются",
|
||||
"Description[sk]": "Animácia krížového prelínania, keď sa zmení geometria nápovedy k nástrojom alebo oznámení",
|
||||
"Description[sl]": "Animacija navzkrižnega preliva, ko se orodnim namigom ali obvestilom spremeni geometrija",
|
||||
"Description[ta]": "கருவித்துப்புகளின் மற்றும் அறிவிப்புகளின் அளவை மாற்றும்போது அவற்றை மங்கசெய்து மாற்றும்",
|
||||
"Description[tr]": "Araç ipuçları veya bildirimler boyutları değiştiğinde gösterilecek çapraz geçiş canlandırması",
|
||||
"Description[uk]": "Анімація зі зміною освітленості під час зміни геометрії панелей підказок і сповіщень",
|
||||
"Description[vi]": "Hiệu ứng động mờ dần khi các chú giải hay thông báo thay đổi hình dạng",
|
||||
"Description[x-test]": "xxCross fade animation when Tooltips or Notifications change their geometryxx",
|
||||
"Description[zh_CN]": "工具提示/通知信息框大小变化时呈现过渡动效",
|
||||
"Description[zh_TW]": "當工具提示或通知變更位置時交錯淡出動畫",
|
||||
"EnabledByDefault": true,
|
||||
"Icon": "preferences-system-windows-effect-morphingpopups",
|
||||
"Id": "morphingpopups",
|
||||
"License": "GPL",
|
||||
"Name": "Morphing Popups",
|
||||
"Name[ar]": "المنبثقات المتحورة",
|
||||
"Name[be]": "Трансфармаванне выплыўных акон",
|
||||
"Name[bg]": "Променящи се изскачащи прозорци",
|
||||
"Name[ca@valencia]": "Missatges emergents en metamorfosi",
|
||||
"Name[ca]": "Missatges emergents en metamorfosi",
|
||||
"Name[cs]": "Morfující vyskakovací okna",
|
||||
"Name[de]": "Verformende Aufklappfenster",
|
||||
"Name[en_GB]": "Morphing Popups",
|
||||
"Name[eo]": "Morphing Ŝprucfenestroj",
|
||||
"Name[es]": "Transformación de ventanas emergentes",
|
||||
"Name[eu]": "Eraldatzen diren gainerakorrak",
|
||||
"Name[fi]": "Ponnahdusikkunoiden muodonmuutos",
|
||||
"Name[fr]": "Effectuer un fondu enchaîné des infobulles",
|
||||
"Name[gl]": "Xanelas emerxentes cambiantes",
|
||||
"Name[he]": "חלוניות צצות משתנות",
|
||||
"Name[hu]": "Alakváltó felugrók",
|
||||
"Name[ia]": "Popups de Morphing",
|
||||
"Name[is]": "Myndbrigði svarglugga",
|
||||
"Name[it]": "Finestre a comparsa che si trasformano",
|
||||
"Name[ja]": "変形するポップアップ",
|
||||
"Name[ka]": "ტრანსფორმირებადი მხტუნარები",
|
||||
"Name[ko]": "변형되는 팝업",
|
||||
"Name[lt]": "Persikeičiantys iškylantieji langai",
|
||||
"Name[nl]": "Morphing pop-ups",
|
||||
"Name[nn]": "Formendring for sprettoppvindauge",
|
||||
"Name[pl]": "Zmiennokształtne okna",
|
||||
"Name[pt]": "Janelas Mutantes",
|
||||
"Name[pt_BR]": "Mensagens com mudança de forma",
|
||||
"Name[ro]": "Indicii în schimbare",
|
||||
"Name[ru]": "Анимация преобразования всплывающих окон",
|
||||
"Name[sk]": "Postupne sa meniace vyskakovacie okná",
|
||||
"Name[sl]": "Pogovorna okna pretvorb",
|
||||
"Name[ta]": "தெரித்தெழுபவை திரிவது",
|
||||
"Name[tr]": "Dönüşen Açılır Pencereler",
|
||||
"Name[uk]": "Аморфні контекстні панелі",
|
||||
"Name[vi]": "Ô bật lên biến dạng",
|
||||
"Name[x-test]": "xxMorphing Popupsxx",
|
||||
"Name[zh_CN]": "气泡大小渐变动画",
|
||||
"Name[zh_TW]": "交錯彈出視窗"
|
||||
},
|
||||
"X-KDE-Ordering": 60,
|
||||
"X-KWin-Video-Url": "https://files.kde.org/plasma/kwin/effect-videos/morphingpopups.ogv",
|
||||
"X-Plasma-API": "javascript"
|
||||
}
|
176
kwin/effects/scale/contents/code/main.js
Normal file
176
kwin/effects/scale/contents/code/main.js
Normal file
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2018, 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
const blacklist = [
|
||||
// The logout screen has to be animated only by the logout effect.
|
||||
"ksmserver ksmserver",
|
||||
"ksmserver-logout-greeter ksmserver-logout-greeter",
|
||||
|
||||
// KDE Plasma splash screen has to be animated only by the login effect.
|
||||
"ksplashqml ksplashqml",
|
||||
|
||||
// Spectacle needs to be blacklisted in order to stay out of its own screenshots.
|
||||
"spectacle spectacle", // x11
|
||||
"spectacle org.kde.spectacle", // wayland
|
||||
];
|
||||
|
||||
class ScaleEffect {
|
||||
constructor() {
|
||||
effect.configChanged.connect(this.loadConfig.bind(this));
|
||||
effect.animationEnded.connect(this.cleanupForcedRoles.bind(this));
|
||||
effects.windowAdded.connect(this.slotWindowAdded.bind(this));
|
||||
effects.windowClosed.connect(this.slotWindowClosed.bind(this));
|
||||
effects.windowDataChanged.connect(this.slotWindowDataChanged.bind(this));
|
||||
|
||||
this.loadConfig();
|
||||
}
|
||||
|
||||
loadConfig() {
|
||||
const defaultDuration = 200;
|
||||
const duration = effect.readConfig("Duration", defaultDuration) || defaultDuration;
|
||||
this.duration = animationTime(duration);
|
||||
this.inScale = effect.readConfig("InScale", 0.8);
|
||||
this.outScale = effect.readConfig("OutScale", 0.8);
|
||||
}
|
||||
|
||||
static isScaleWindow(window) {
|
||||
// We don't want to animate most of plasmashell's windows, yet, some
|
||||
// of them we want to, for example, Task Manager Settings window.
|
||||
// The problem is that all those window share single window class.
|
||||
// So, the only way to decide whether a window should be animated is
|
||||
// to use a heuristic: if a window has decoration, then it's most
|
||||
// likely a dialog or a settings window so we have to animate it.
|
||||
if (window.windowClass == "plasmashell plasmashell"
|
||||
|| window.windowClass == "plasmashell org.kde.plasmashell") {
|
||||
return window.hasDecoration;
|
||||
}
|
||||
|
||||
if (blacklist.indexOf(window.windowClass) != -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (window.hasDecoration) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Don't animate combobox popups, tooltips, popup menus, etc.
|
||||
if (window.popupWindow) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Dont't animate the outline and the screenlocker as it looks bad.
|
||||
if (window.lockScreen || window.outline) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Override-redirect windows are usually used for user interface
|
||||
// concepts that are not expected to be animated by this effect.
|
||||
if (!window.managed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return window.normalWindow || window.dialog;
|
||||
}
|
||||
|
||||
setupForcedRoles(window) {
|
||||
window.setData(Effect.WindowForceBackgroundContrastRole, true);
|
||||
window.setData(Effect.WindowForceBlurRole, true);
|
||||
}
|
||||
|
||||
cleanupForcedRoles(window) {
|
||||
window.setData(Effect.WindowForceBackgroundContrastRole, null);
|
||||
window.setData(Effect.WindowForceBlurRole, null);
|
||||
}
|
||||
|
||||
slotWindowAdded(window) {
|
||||
if (effects.hasActiveFullScreenEffect) {
|
||||
return;
|
||||
}
|
||||
if (!ScaleEffect.isScaleWindow(window)) {
|
||||
return;
|
||||
}
|
||||
if (!window.visible) {
|
||||
return;
|
||||
}
|
||||
if (effect.isGrabbed(window, Effect.WindowAddedGrabRole)) {
|
||||
return;
|
||||
}
|
||||
this.setupForcedRoles(window);
|
||||
window.scaleInAnimation = animate({
|
||||
window: window,
|
||||
curve: QEasingCurve.OutCubic,
|
||||
duration: this.duration,
|
||||
animations: [
|
||||
{
|
||||
type: Effect.Scale,
|
||||
from: this.inScale
|
||||
},
|
||||
{
|
||||
type: Effect.Opacity,
|
||||
from: 0
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
slotWindowClosed(window) {
|
||||
if (effects.hasActiveFullScreenEffect) {
|
||||
return;
|
||||
}
|
||||
if (!ScaleEffect.isScaleWindow(window)) {
|
||||
return;
|
||||
}
|
||||
if (!window.visible || window.skipsCloseAnimation) {
|
||||
return;
|
||||
}
|
||||
if (effect.isGrabbed(window, Effect.WindowClosedGrabRole)) {
|
||||
return;
|
||||
}
|
||||
if (window.scaleInAnimation) {
|
||||
cancel(window.scaleInAnimation);
|
||||
delete window.scaleInAnimation;
|
||||
}
|
||||
this.setupForcedRoles(window);
|
||||
window.scaleOutAnimation = animate({
|
||||
window: window,
|
||||
curve: QEasingCurve.InCubic,
|
||||
duration: this.duration,
|
||||
animations: [
|
||||
{
|
||||
type: Effect.Scale,
|
||||
to: this.outScale
|
||||
},
|
||||
{
|
||||
type: Effect.Opacity,
|
||||
to: 0
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
slotWindowDataChanged(window, role) {
|
||||
if (role == Effect.WindowAddedGrabRole) {
|
||||
if (window.scaleInAnimation && effect.isGrabbed(window, role)) {
|
||||
cancel(window.scaleInAnimation);
|
||||
delete window.scaleInAnimation;
|
||||
this.cleanupForcedRoles(window);
|
||||
}
|
||||
} else if (role == Effect.WindowClosedGrabRole) {
|
||||
if (window.scaleOutAnimation && effect.isGrabbed(window, role)) {
|
||||
cancel(window.scaleOutAnimation);
|
||||
delete window.scaleOutAnimation;
|
||||
this.cleanupForcedRoles(window);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new ScaleEffect();
|
18
kwin/effects/scale/contents/config/main.xml
Normal file
18
kwin/effects/scale/contents/config/main.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name=""/>
|
||||
<group name="">
|
||||
<entry name="Duration" type="UInt">
|
||||
<default>0</default>
|
||||
</entry>
|
||||
<entry name="InScale" type="Double">
|
||||
<default>0.8</default>
|
||||
</entry>
|
||||
<entry name="OutScale" type="Double">
|
||||
<default>0.8</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
93
kwin/effects/scale/contents/ui/config.ui
Normal file
93
kwin/effects/scale/contents/ui/config.ui
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ScaleEffectConfig</class>
|
||||
<widget class="QWidget" name="ScaleEffectConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>455</width>
|
||||
<height>177</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_Duration">
|
||||
<property name="text">
|
||||
<string>Duration:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="kcfg_Duration">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="specialValueText">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> milliseconds</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9999</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_InScale">
|
||||
<property name="text">
|
||||
<string>Window open scale:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_OutScale">
|
||||
<property name="text">
|
||||
<string>Window close scale:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_InScale">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9.990000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_OutScale">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9.990000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
145
kwin/effects/scale/metadata.json
Normal file
145
kwin/effects/scale/metadata.json
Normal file
|
@ -0,0 +1,145 @@
|
|||
{
|
||||
"KPackageStructure": "KWin/Effect",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "vlad.zahorodnii@kde.org",
|
||||
"Name": "Vlad Zahorodnii",
|
||||
"Name[ar]": "فلاد زاهورودني",
|
||||
"Name[az]": "Vlad Zahorodnii",
|
||||
"Name[be]": "Vlad Zahorodnii",
|
||||
"Name[bg]": "Vlad Zahorodnii",
|
||||
"Name[ca@valencia]": "Vlad Zahorodnii",
|
||||
"Name[ca]": "Vlad Zahorodnii",
|
||||
"Name[cs]": "Vlad Zahorodnii",
|
||||
"Name[de]": "Vlad Zahorodnii",
|
||||
"Name[en_GB]": "Vlad Zahorodnii",
|
||||
"Name[eo]": "Vlad Zahorodnii",
|
||||
"Name[es]": "Vlad Zahorodnii",
|
||||
"Name[et]": "Vlad Zahorodnii",
|
||||
"Name[eu]": "Vlad Zahorodnii",
|
||||
"Name[fi]": "Vlad Zahorodnii",
|
||||
"Name[fr]": "Vlad Zahorodnii",
|
||||
"Name[gl]": "Vlad Zahorodnii.",
|
||||
"Name[he]": "ולאד זהורודני",
|
||||
"Name[hu]": "Vlad Zahorodnii",
|
||||
"Name[ia]": "Vlad Zahorodnii",
|
||||
"Name[id]": "Vlad Zahorodnii",
|
||||
"Name[is]": "Vlad Zahorodnii",
|
||||
"Name[it]": "Vlad Zahorodnii",
|
||||
"Name[ja]": "Vlad Zahorodnii",
|
||||
"Name[ka]": "Vlad Zahorodnii",
|
||||
"Name[ko]": "Vlad Zahorodnii",
|
||||
"Name[lt]": "Vlad Zahorodnii",
|
||||
"Name[nl]": "Vlad Zahorodnii",
|
||||
"Name[nn]": "Vlad Zahorodnii",
|
||||
"Name[pl]": "Vlad Zahorodnii",
|
||||
"Name[pt]": "Vlad Zahorodnii",
|
||||
"Name[pt_BR]": "Vlad Zahorodnii",
|
||||
"Name[ro]": "Vlad Zahorodnii",
|
||||
"Name[ru]": "Влад Загородний",
|
||||
"Name[sk]": "Vlad Zahorodnii",
|
||||
"Name[sl]": "Vlad Zahorodnii",
|
||||
"Name[sv]": "Vlad Zahorodnii",
|
||||
"Name[ta]": "விலாட் ஜாஹொரிடுனி",
|
||||
"Name[tr]": "Vlad Zahorodnii",
|
||||
"Name[uk]": "Влад Загородній",
|
||||
"Name[vi]": "Vlad Zahorodnii",
|
||||
"Name[x-test]": "xxVlad Zahorodniixx",
|
||||
"Name[zh_CN]": "Vlad Zahorodnii",
|
||||
"Name[zh_TW]": "Vlad Zahorodnii"
|
||||
}
|
||||
],
|
||||
"Category": "Window Open/Close Animation",
|
||||
"Description": "Make windows smoothly scale in and out when they are shown or hidden",
|
||||
"Description[ar]": "اجعل النوافذ تكبر وتصغر بنعومة عند إظهاراها وإخفائها",
|
||||
"Description[be]": "Плаўнае павелічэнне або памяншэнне акон пры з'яўленні або знікненні",
|
||||
"Description[bg]": "Плавно увеличаване и намаляване на мащаба на прозорците при показване или скриване",
|
||||
"Description[ca@valencia]": "Fa que les finestres entren o isquen volant quan es mostren o s'oculten",
|
||||
"Description[ca]": "Fa que les finestres entrin o surtin volant quan es mostren o s'oculten",
|
||||
"Description[cs]": "Nechá okna plynule zvětšit/zmenšit se, pokud jsou zobrazeny resp. skryty",
|
||||
"Description[de]": "Vergrößert und verkleinert Fenster sanft beim Ein- oder Ausblenden",
|
||||
"Description[en_GB]": "Make windows smoothly scale in and out when they are shown or hidden",
|
||||
"Description[eo]": "Fari fenestrojn glate grimpi en kaj eksteren kiam ili estas montritaj aŭ kaŝitaj",
|
||||
"Description[es]": "Hacer que las ventanas se escalen suavemente al mostrarlas y al ocultarlas",
|
||||
"Description[et]": "Skaleerib aknaid sujuvalt, kui need peidetakse või nähtavale tuuakse",
|
||||
"Description[eu]": "Leihoak emeki barrura eta kanpora eskalatu haiek erakutsi edo ezkutatzean",
|
||||
"Description[fi]": "Skaalaa ponnahdusikkunat pehmeästi näytölle tai näytöltä",
|
||||
"Description[fr]": "Faire un re-dimensionnement en avant ou en arrière des fenêtres lorsqu'elles sont affichées ou masquées",
|
||||
"Description[gl]": "Facer que as xanelas crezan ou decrezan suavemente cando se mostran ou agochan.",
|
||||
"Description[he]": "הפיכת הגדלת והקטנת קנה מידה של חלונות כשהם מוצגים או מוסתרים",
|
||||
"Description[hu]": "Az ablakok folyamatosan méretezett módon lesznek elrejtve és megjelenítve",
|
||||
"Description[ia]": "Face que fenestras pote dulcemente scalar intra e foras quando illos es monstrate o celate",
|
||||
"Description[is]": "Láta glugga stækka og minnka inn og út mjúklega þegar þeir eru birtir eða faldir",
|
||||
"Description[it]": "Ridimensiona le finestre dolcemente quando sono mostrate o nascoste",
|
||||
"Description[ja]": "ウィンドウが表示/非表示時スムーズに拡大/縮小します",
|
||||
"Description[ka]": "ფანჯრების რბილად გადიდება/დაპატარავება მათი ჩვენება/დამალვისას",
|
||||
"Description[ko]": "창이 보여지거나 감춰질 때 부드러운 크기 조정을 사용합니다",
|
||||
"Description[lt]": "Padaryti, kad langai glotniai keistų dydį, kai yra rodomi ar slepiami",
|
||||
"Description[nl]": "Laat vensters vloeiend kleiner en groter schalen als ze worden getoond of verborgen",
|
||||
"Description[nn]": "Skaler vindauge jamt inn og ut når dei vert viste eller gøymde",
|
||||
"Description[pl]": "Okna gładko pomniejszają się przy otwieraniu i powiększają przy zamykaniu",
|
||||
"Description[pt]": "Faz com que as janelas mudem suavemente de tamanho quando aparecem ou desaparecem",
|
||||
"Description[ro]": "Face ferestrele să se scaleze lin când sunt arătate sau ascunse",
|
||||
"Description[ru]": "Плавное увеличение или уменьшение окон при их появлении и скрытии",
|
||||
"Description[sk]": "Plynulé zväčšovanie a zmenšovanie okien pri ich zobrazení alebo skrytí",
|
||||
"Description[sl]": "Okna naj gladko spreminjajo velikost (navzven in navznoter), ko se prikažejo ali skrijejo",
|
||||
"Description[ta]": "சாளரங்களை காட்டும்போதும் மறைக்கும்போதும் அவற்றின் அளவை படிப்படியாக மாற்றுவதுபோல் அசைவூட்டும்",
|
||||
"Description[tr]": "Pencereler gösterilirken veya gizlenirken pürüzsüzce ölçeklendirilmelerini sağlar",
|
||||
"Description[uk]": "Плавне масштабування вікон при появі або приховуванні",
|
||||
"Description[vi]": "Làm cửa sổ đổi cỡ một cách êm dịu khi chúng hiện ra và biến mất",
|
||||
"Description[x-test]": "xxMake windows smoothly scale in and out when they are shown or hiddenxx",
|
||||
"Description[zh_CN]": "窗口显示/隐藏时呈现平滑缩放过渡动效",
|
||||
"Description[zh_TW]": "讓視窗在顯示或隱藏的時候平滑地以比例縮放方式出現或消失",
|
||||
"EnabledByDefault": true,
|
||||
"Icon": "preferences-system-windows-effect-scale",
|
||||
"Id": "scale",
|
||||
"License": "GPL",
|
||||
"Name": "Scale",
|
||||
"Name[ar]": "حجّم",
|
||||
"Name[be]": "Маштабаванне",
|
||||
"Name[bg]": "Мащабиране",
|
||||
"Name[ca@valencia]": "Escala",
|
||||
"Name[ca]": "Escala",
|
||||
"Name[cs]": "Měřítko",
|
||||
"Name[de]": "Skalieren",
|
||||
"Name[en_GB]": "Scale",
|
||||
"Name[eo]": "Skalo",
|
||||
"Name[es]": "Escalar",
|
||||
"Name[et]": "Skaleerimine",
|
||||
"Name[eu]": "Eskalatu",
|
||||
"Name[fi]": "Skaalaus",
|
||||
"Name[fr]": "Échelle",
|
||||
"Name[gl]": "Escala",
|
||||
"Name[he]": "קנה מידה",
|
||||
"Name[hu]": "Méretezés",
|
||||
"Name[ia]": "Scala",
|
||||
"Name[is]": "Kvarði",
|
||||
"Name[it]": "Scala",
|
||||
"Name[ja]": "スケール",
|
||||
"Name[ka]": "მასშტაბირება",
|
||||
"Name[ko]": "크기 조정",
|
||||
"Name[lt]": "Mastelis",
|
||||
"Name[nl]": "Schaal",
|
||||
"Name[nn]": "Skalering",
|
||||
"Name[pl]": "Skalowanie",
|
||||
"Name[pt]": "Escala",
|
||||
"Name[pt_BR]": "Escala",
|
||||
"Name[ro]": "Scalare",
|
||||
"Name[ru]": "Масштабирование",
|
||||
"Name[sk]": "Meniť mierku",
|
||||
"Name[sl]": "Spremeni velikost",
|
||||
"Name[ta]": "அளவுமாற்று",
|
||||
"Name[tr]": "Ölçeklendir",
|
||||
"Name[uk]": "Масштабування",
|
||||
"Name[vi]": "Đổi cỡ",
|
||||
"Name[x-test]": "xxScalexx",
|
||||
"Name[zh_CN]": "按比例缩放",
|
||||
"Name[zh_TW]": "縮放"
|
||||
},
|
||||
"X-KDE-ConfigModule": "kcm_kwin4_genericscripted",
|
||||
"X-KDE-Ordering": 60,
|
||||
"X-KWin-Config-TranslationDomain": "kwin",
|
||||
"X-KWin-Exclusive-Category": "toplevel-open-close-animation",
|
||||
"X-Plasma-API": "javascript"
|
||||
}
|
143
kwin/effects/smodpeekeffect/contents/code/main.js
Normal file
143
kwin/effects/smodpeekeffect/contents/code/main.js
Normal file
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* KWin - the KDE window manager
|
||||
* This file is part of the KDE project.
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2015 Thomas Lübking <thomas.luebking@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
/*global effect, effects, animate, animationTime, Effect, QEasingCurve */
|
||||
|
||||
"use strict";
|
||||
|
||||
var badBadWindowsEffect = {
|
||||
duration: animationTime(450),
|
||||
showingDesktop: false,
|
||||
loadConfig: function () {
|
||||
badBadWindowsEffect.duration = animationTime(450);
|
||||
},
|
||||
setShowingDesktop: function (showing) {
|
||||
badBadWindowsEffect.showingDesktop = showing;
|
||||
|
||||
},
|
||||
offToCorners: function (showing, frozenTime) {
|
||||
if (typeof frozenTime === "undefined") {
|
||||
frozenTime = -1;
|
||||
}
|
||||
var stackingOrder = effects.stackingOrder;
|
||||
var screenGeo = effects.virtualScreenGeometry;
|
||||
var xOffset = screenGeo.width / 16;
|
||||
var yOffset = screenGeo.height / 16;
|
||||
|
||||
for (var i = 0; i < stackingOrder.length; ++i) {
|
||||
var w = stackingOrder[i];
|
||||
|
||||
if (!w.managed && w.windowClass == "kwin_x11 kwin" && w.caption == "" && !w.hasDecoration) continue;
|
||||
if (!w.hiddenByShowDesktop && !w.normalWindow) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// ignore invisible windows and such that do not have to be restored
|
||||
if (!w.visible) {
|
||||
if (w.offToCornerId) {
|
||||
// if it was visible when the effect was activated delete its animation data
|
||||
cancel(w.offToCornerId);
|
||||
delete w.offToCornerId;
|
||||
delete w.apertureCorner;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't touch docks
|
||||
if (w.dock) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//console.log("Before: " + JSON.stringify(w));
|
||||
|
||||
if(showing) {
|
||||
if (!w.offToCornerId || !freezeInTime(w.offToCornerId, frozenTime)) {
|
||||
|
||||
w.offToCornerId = set({
|
||||
window: w,
|
||||
duration: badBadWindowsEffect.duration,
|
||||
curve: QEasingCurve.InOutQuad,
|
||||
//delay: 10,
|
||||
animations: [{
|
||||
type: Effect.Opacity,
|
||||
to: 0.0,
|
||||
frozenTime: frozenTime
|
||||
|
||||
}]
|
||||
});
|
||||
//console.log("script");
|
||||
}
|
||||
} else {
|
||||
if (!w.visible) {
|
||||
cancel(w.offToCornerId);
|
||||
delete w.offToCornerId;
|
||||
delete w.apertureCorner;
|
||||
// This if the window was invisible and has become visible in the meantime
|
||||
} else if (!w.offToCornerId || !redirect(w.offToCornerId, Effect.Backward) || !freezeInTime(w.offToCornerId, frozenTime)) {
|
||||
/*animate({
|
||||
window: w,
|
||||
duration: badBadWindowsEffect.duration,
|
||||
curve: QEasingCurve.Linear,
|
||||
animations: [{
|
||||
type: Effect.Opacity,
|
||||
from: 0.0
|
||||
}]
|
||||
});*/
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
animationEnded: function (w, a, meta) {
|
||||
// After the animation that closes the effect, reset all the parameters
|
||||
if (!badBadWindowsEffect.showingDesktop && w.offToCornerId != null) {
|
||||
cancel(w.offToCornerId);
|
||||
delete w.offToCornerId;
|
||||
delete w.apertureCorner;
|
||||
}
|
||||
},
|
||||
realtimeScreenEdgeCallback: function (border, deltaProgress, effectScreen) {
|
||||
if (!deltaProgress || !effectScreen) {
|
||||
badBadWindowsEffect.offToCorners(badBadWindowsEffect.showingDesktop, -1);
|
||||
return;
|
||||
}
|
||||
let time = 0;
|
||||
|
||||
switch (border) {
|
||||
case KWin.ElectricTop:
|
||||
case KWin.ElectricBottom:
|
||||
time = Math.min(1, (Math.abs(deltaProgress.height) / (effectScreen.geometry.height / 2))) * badBadWindowsEffect.duration;
|
||||
break;
|
||||
case KWin.ElectricLeft:
|
||||
case KWin.ElectricRight:
|
||||
time = Math.min(1, (Math.abs(deltaProgress.width) / (effectScreen.geometry.width / 2))) * badBadWindowsEffect.duration;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if (badBadWindowsEffect.showingDesktop) {
|
||||
time = badBadWindowsEffect.duration - time;
|
||||
}
|
||||
|
||||
badBadWindowsEffect.offToCorners(true, time)
|
||||
},
|
||||
init: function () {
|
||||
badBadWindowsEffect.loadConfig();
|
||||
effects.showingDesktopChanged.connect(badBadWindowsEffect.setShowingDesktop);
|
||||
effects.showingDesktopChanged.connect(badBadWindowsEffect.offToCorners);
|
||||
effect.animationEnded.connect(badBadWindowsEffect.animationEnded);
|
||||
|
||||
//let edges = effect.touchEdgesForAction("show-desktop");
|
||||
|
||||
/*for (let i in edges) {
|
||||
let edge = parseInt(edges[i]);
|
||||
registerRealtimeScreenEdge(edge, badBadWindowsEffect.realtimeScreenEdgeCallback);
|
||||
}*/
|
||||
}
|
||||
};
|
||||
|
||||
badBadWindowsEffect.init();
|
20
kwin/effects/smodpeekeffect/metadata.json
Normal file
20
kwin/effects/smodpeekeffect/metadata.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"KPackageStructure": "KWin/Effect",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Name": "Souris"
|
||||
}
|
||||
],
|
||||
"Category": "Show Desktop Animation",
|
||||
"Description": "Fade windows to reveal the desktop",
|
||||
"EnabledByDefault": false,
|
||||
"Id": "smodpeekeffect",
|
||||
"License": "GPL",
|
||||
"Name": "SMOD Peek"
|
||||
},
|
||||
"X-KDE-Ordering": 100,
|
||||
"X-KWin-Exclusive-Category": "show-desktop",
|
||||
"X-Plasma-API": "javascript",
|
||||
"X-Plasma-MainScript": "code/main.js"
|
||||
}
|
196
kwin/effects/squash/contents/code/main.js
Normal file
196
kwin/effects/squash/contents/code/main.js
Normal file
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var squashEffect = { // 300 ms
|
||||
duration: animationTime(250),
|
||||
loadConfig: function () {
|
||||
squashEffect.duration = animationTime(250);
|
||||
},
|
||||
slotWindowMinimized: function (window) {
|
||||
if (effects.hasActiveFullScreenEffect) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the window doesn't have an icon in the task manager,
|
||||
// don't animate it.
|
||||
var iconRect = window.iconGeometry;
|
||||
if (iconRect.width == 0 || iconRect.height == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.unminimizeAnimation) {
|
||||
if (redirect(window.unminimizeAnimation, Effect.Backward)) {
|
||||
return;
|
||||
}
|
||||
cancel(window.unminimizeAnimation);
|
||||
delete window.unminimizeAnimation;
|
||||
}
|
||||
|
||||
if (window.minimizeAnimation) {
|
||||
if (redirect(window.minimizeAnimation, Effect.Forward)) {
|
||||
return;
|
||||
}
|
||||
cancel(window.minimizeAnimation);
|
||||
}
|
||||
|
||||
var windowRect = window.geometry;
|
||||
|
||||
window.minimizeAnimation = animate({
|
||||
window: window,
|
||||
curve: QEasingCurve.Linear,
|
||||
duration: squashEffect.duration*1.1,
|
||||
animations: [
|
||||
{
|
||||
type: Effect.Size,
|
||||
from: {
|
||||
value1: windowRect.width,
|
||||
value2: windowRect.height
|
||||
},
|
||||
to: {
|
||||
value1: iconRect.width,
|
||||
value2: iconRect.height
|
||||
}
|
||||
},
|
||||
{
|
||||
type: Effect.Translation,
|
||||
from: {
|
||||
value1: 0.0,
|
||||
value2: 0.0
|
||||
},
|
||||
to: {
|
||||
value1: iconRect.x - windowRect.x -
|
||||
(windowRect.width - iconRect.width) / 2,
|
||||
value2: iconRect.y - windowRect.y -
|
||||
(windowRect.height - iconRect.height) / 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
type: Effect.Opacity,
|
||||
from: 0.9,
|
||||
to: 0.0
|
||||
},
|
||||
/*{
|
||||
type: Effect.Rotation,
|
||||
meta: {
|
||||
axis: 1
|
||||
},
|
||||
from: 0,
|
||||
to: 0.262
|
||||
},
|
||||
{
|
||||
type: Effect.Rotation,
|
||||
meta: {
|
||||
axis: 2
|
||||
},
|
||||
from: 0,
|
||||
to: 0.262
|
||||
}*/
|
||||
|
||||
]
|
||||
});
|
||||
},
|
||||
slotWindowUnminimized: function (window) {
|
||||
if (effects.hasActiveFullScreenEffect) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the window doesn't have an icon in the task manager,
|
||||
// don't animate it.
|
||||
var iconRect = window.iconGeometry;
|
||||
if (iconRect.width == 0 || iconRect.height == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.minimizeAnimation) {
|
||||
if (redirect(window.minimizeAnimation, Effect.Backward)) {
|
||||
return;
|
||||
}
|
||||
cancel(window.minimizeAnimation);
|
||||
delete window.minimizeAnimation;
|
||||
}
|
||||
|
||||
if (window.unminimizeAnimation) {
|
||||
if (redirect(window.unminimizeAnimation, Effect.Forward)) {
|
||||
return;
|
||||
}
|
||||
cancel(window.unminimizeAnimation);
|
||||
}
|
||||
|
||||
window.setData(Effect.WindowForceBlurRole, true);
|
||||
|
||||
var windowRect = window.geometry;
|
||||
|
||||
window.unminimizeAnimation = animate({
|
||||
window: window,
|
||||
curve: QEasingCurve.Linear,
|
||||
duration: squashEffect.duration,
|
||||
animations: [
|
||||
|
||||
/*{
|
||||
type: Effect.Rotation,
|
||||
axis: 0,
|
||||
sourceAnchor: 0,
|
||||
targetAnchor: 1,
|
||||
from: 1,
|
||||
to: 0.5
|
||||
},*/
|
||||
{
|
||||
type: Effect.Size,
|
||||
from: {
|
||||
value1: iconRect.width,
|
||||
value2: iconRect.height
|
||||
},
|
||||
to: {
|
||||
value1: windowRect.width,
|
||||
value2: windowRect.height
|
||||
}
|
||||
},
|
||||
{
|
||||
type: Effect.Translation,
|
||||
from: {
|
||||
value1: iconRect.x - windowRect.x -
|
||||
(windowRect.width - iconRect.width) / 2,
|
||||
value2: iconRect.y - windowRect.y -
|
||||
(windowRect.height - iconRect.height) / 2,
|
||||
},
|
||||
to: {
|
||||
value1: 0.0,
|
||||
value2: 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
type: Effect.Opacity,
|
||||
from: 0.0,
|
||||
to: 1.0
|
||||
}
|
||||
|
||||
]
|
||||
});
|
||||
},
|
||||
slotWindowAdded: function (window) {
|
||||
window.minimizedChanged.connect(() => {
|
||||
if (window.minimized) {
|
||||
squashEffect.slotWindowMinimized(window);
|
||||
} else {
|
||||
squashEffect.slotWindowUnminimized(window);
|
||||
}
|
||||
});
|
||||
},
|
||||
init: function () {
|
||||
effect.configChanged.connect(squashEffect.loadConfig);
|
||||
|
||||
effects.windowAdded.connect(squashEffect.slotWindowAdded);
|
||||
for (const window of effects.stackingOrder) {
|
||||
squashEffect.slotWindowAdded(window);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
squashEffect.init();
|
138
kwin/effects/squash/metadata.json
Normal file
138
kwin/effects/squash/metadata.json
Normal file
|
@ -0,0 +1,138 @@
|
|||
{
|
||||
"KPackageStructure": "KWin/Effect",
|
||||
"KPlugin": {
|
||||
"Authors": [
|
||||
{
|
||||
"Email": "rivolaks@hot.ee, vlad.zahorodnii@kde.org",
|
||||
"Name": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ar]": "ريفو لاكس، فلاد زاهورودني",
|
||||
"Name[be]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[bg]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ca@valencia]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ca]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[cs]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[de]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[en_GB]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[eo]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[es]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[et]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[eu]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[fi]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[fr]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[gl]": "Rivo Laks e Vlad Zahorodnii.",
|
||||
"Name[he]": "ריבו לאקס, ולאד זוהורוני",
|
||||
"Name[hu]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ia]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[is]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[it]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ja]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ka]": "Vlad Zahorodnii",
|
||||
"Name[ko]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[lt]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[nl]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[nn]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[pl]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[pt]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ro]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ru]": "Rivo Laks, Влад Загородний",
|
||||
"Name[sk]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[sl]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[ta]": "ரிவோ லாக்சு, விலாட் ஜாஹொரிடுனி",
|
||||
"Name[tr]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[uk]": "Rivo Laks, Влад Завгородній",
|
||||
"Name[vi]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[x-test]": "xxRivo Laks, Vlad Zahorodniixx",
|
||||
"Name[zh_CN]": "Rivo Laks, Vlad Zahorodnii",
|
||||
"Name[zh_TW]": "Rivo Laks, Vlad Zahorodnii"
|
||||
}
|
||||
],
|
||||
"Category": "Appearance",
|
||||
"Description": "Squash windows when they are minimized",
|
||||
"Description[ar]": "تنكمش النوافذ عند تصغيرها",
|
||||
"Description[be]": "Сціскаць вокны, калі яны згорнутыя",
|
||||
"Description[bg]": "Свиване на прозорците при минимизиране",
|
||||
"Description[ca@valencia]": "Amuntega les finestres quan estan minimitzades",
|
||||
"Description[ca]": "Amuntega les finestres quan estan minimitzades",
|
||||
"Description[de]": "Quetscht Fenster beim Minimieren zusammen",
|
||||
"Description[en_GB]": "Squash windows when they are minimised",
|
||||
"Description[eo]": "Squash fenestroj kiam ili estas minimumigitaj",
|
||||
"Description[es]": "Aplastar las ventanas cuando se minimizan",
|
||||
"Description[et]": "Minimeeritud akende taas üleshüpitamine",
|
||||
"Description[eu]": "Zanpatu leihoak haiek ikonotzen direnean",
|
||||
"Description[fi]": "Litistä pienennettävät ikkunat",
|
||||
"Description[fr]": "Déformer les fenêtres lors de leur minimisation",
|
||||
"Description[gl]": "Xuntar as xanelas cando estean minimizadas.",
|
||||
"Description[he]": "למעוך את החלונות כשהם ממוזערים",
|
||||
"Description[hu]": "Összevonja az ablakokat, amikor minimalizálódnak",
|
||||
"Description[ia]": "Deforma fenestras durante que illes es minimisate",
|
||||
"Description[is]": "Kremja saman glugga þegar þeir eru faldir",
|
||||
"Description[it]": "Schiaccia le finestre quando vengono minimizzate",
|
||||
"Description[ja]": "最小化されたときウィンドウが縮小します",
|
||||
"Description[ka]": "ფანჯრების შეჭყლეტა ჩაკეცვისა დროს",
|
||||
"Description[ko]": "창을 최소화할 때 압축시킵니다",
|
||||
"Description[lt]": "Sutraiškyti langus, kai jie suskleidžiami",
|
||||
"Description[nl]": "Krimp vensters wanneer ze geminimaliseerd zijn",
|
||||
"Description[nn]": "Skvis vindauge når dei vert minimerte",
|
||||
"Description[pl]": "Ściąga okna przy ich minimalizacji",
|
||||
"Description[pt]": "Deformar as janelas quando são minimizadas",
|
||||
"Description[ro]": "Strivește ferestrele când sunt minimizate",
|
||||
"Description[ru]": "Сжатие окна при сворачивании",
|
||||
"Description[sk]": "Stlačenie okien, keď sú minimalizované",
|
||||
"Description[sl]": "Skrči okna, ko so pomanjšana",
|
||||
"Description[ta]": "சாளரங்களை ஒதுக்கும்போது அவற்றை நசுக்குவது போல் அசைவூட்டும்",
|
||||
"Description[tr]": "Pencereler simge durumuna küçültüldüğünde onları tıkıştır",
|
||||
"Description[uk]": "Складує вікна, якщо їх мінімізовано",
|
||||
"Description[vi]": "Ép nhỏ cửa sổ khi thu nhỏ",
|
||||
"Description[x-test]": "xxSquash windows when they are minimizedxx",
|
||||
"Description[zh_CN]": "窗口最小化时绘制收缩过渡动画",
|
||||
"Description[zh_TW]": "最小化視窗時擠壓它們",
|
||||
"EnabledByDefault": true,
|
||||
"Icon": "preferences-system-windows-effect-squash",
|
||||
"Id": "squash",
|
||||
"License": "GPL",
|
||||
"Name": "Squash",
|
||||
"Name[ar]": "الانكماش",
|
||||
"Name[be]": "Сцісканне",
|
||||
"Name[bg]": "Свиване",
|
||||
"Name[ca@valencia]": "Amuntega",
|
||||
"Name[ca]": "Amuntega",
|
||||
"Name[de]": "Quetschen",
|
||||
"Name[en_GB]": "Squash",
|
||||
"Name[eo]": "Dispremi",
|
||||
"Name[es]": "Aplastar",
|
||||
"Name[et]": "Üleshüpe",
|
||||
"Name[eu]": "Zanpatu",
|
||||
"Name[fi]": "Litistys",
|
||||
"Name[fr]": "Compresser",
|
||||
"Name[gl]": "Xuntar",
|
||||
"Name[he]": "מעיכה",
|
||||
"Name[hu]": "Összevonás",
|
||||
"Name[ia]": "Squash",
|
||||
"Name[is]": "Kremja",
|
||||
"Name[it]": "Schiaccia",
|
||||
"Name[ja]": "縮小",
|
||||
"Name[ka]": "დაჭმუჭნვა",
|
||||
"Name[ko]": "압축",
|
||||
"Name[lt]": "Sutraiškymas",
|
||||
"Name[nl]": "Krimpen",
|
||||
"Name[nn]": "Skvis",
|
||||
"Name[pl]": "Ściąganie",
|
||||
"Name[pt]": "Esmagar",
|
||||
"Name[pt_BR]": "Achatar",
|
||||
"Name[ro]": "Strivire",
|
||||
"Name[ru]": "Сжатие",
|
||||
"Name[sk]": "Stlačiť",
|
||||
"Name[sl]": "Strni",
|
||||
"Name[ta]": "நசுக்கு",
|
||||
"Name[tr]": "Tıkıştır",
|
||||
"Name[uk]": "Складування",
|
||||
"Name[vi]": "Ép nhỏ",
|
||||
"Name[x-test]": "xxSquashxx",
|
||||
"Name[zh_CN]": "最小化过渡动画 (收缩)",
|
||||
"Name[zh_TW]": "壓縮"
|
||||
},
|
||||
"X-KDE-Ordering": 60,
|
||||
"X-KWin-Exclusive-Category": "minimize",
|
||||
"X-KWin-Video-Url": "https://files.kde.org/plasma/kwin/effect-videos/minimize.ogv",
|
||||
"X-Plasma-API": "javascript"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue