📝 Add even more comments
This commit is contained in:
+8
-4
@@ -55,7 +55,9 @@ var TVEffect = class TVEffect {
|
||||
|
||||
// -------------------------------------------------------------------- API for prefs.js
|
||||
|
||||
|
||||
// This is called by the preferences dialog. It loads the settings page for this effect,
|
||||
// binds all properties to the settings and appends the page to the main stack of the
|
||||
// preferences dialog.
|
||||
static initPreferences(dialog) {
|
||||
|
||||
// Add the settings page to the builder.
|
||||
@@ -74,13 +76,14 @@ var TVEffect = class TVEffect {
|
||||
|
||||
// ---------------------------------------------------------------- API for extension.js
|
||||
|
||||
|
||||
// This is called from extension.js whenever a window is closed with this effect.
|
||||
static createShader(settings) {
|
||||
return new TVShader(settings);
|
||||
}
|
||||
|
||||
// If there's a transition in progress, we re-target these transitions so that the
|
||||
// window is neither scaled nor faded.
|
||||
// This is also called from extension.js. It is used to tweak the ongoing transitions of
|
||||
// the actor - usually windows are faded to transparency and scaled down slightly by
|
||||
// GNOME Shell. Here, we modify this behavior as well as the transition duration.
|
||||
static tweakTransitions(actor, settings) {
|
||||
const animationTime = settings.get_int('tv-animation-time');
|
||||
|
||||
@@ -92,6 +95,7 @@ var TVEffect = class TVEffect {
|
||||
}
|
||||
};
|
||||
|
||||
// For this effect, we scale the window only vertically.
|
||||
tweakTransition('opacity', 255);
|
||||
tweakTransition('scale-x', 1);
|
||||
tweakTransition('scale-y', 0.5);
|
||||
|
||||
Reference in New Issue
Block a user