🔀 Merge pull request #497 from Schneegans/feature/kde-port
This commit is contained in:
+16
-18
@@ -40,22 +40,22 @@ export default class Effect {
|
||||
constructor() {
|
||||
this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
|
||||
// Store uniform locations of newly created shaders.
|
||||
shader._uColorSpeed = shader.get_uniform_location('uColorSpeed');
|
||||
shader._uRandomColorOffset = shader.get_uniform_location('uRandomColorOffset');
|
||||
shader._uColorOffset = shader.get_uniform_location('uColorOffset');
|
||||
shader._uColorSaturation = shader.get_uniform_location('uColorSaturation');
|
||||
shader._uEdgeSize = shader.get_uniform_location('uEdgeSize');
|
||||
shader._uEdgeHardness = shader.get_uniform_location('uEdgeHardness');
|
||||
shader._uBlur = shader.get_uniform_location('uBlur');
|
||||
shader._uSeed = shader.get_uniform_location('uSeed');
|
||||
shader._uSpeed = shader.get_uniform_location('uSpeed');
|
||||
shader._uRandomColor = shader.get_uniform_location('uRandomColor');
|
||||
shader._uStartHue = shader.get_uniform_location('uStartHue');
|
||||
shader._uSaturation = shader.get_uniform_location('uSaturation');
|
||||
shader._uEdgeSize = shader.get_uniform_location('uEdgeSize');
|
||||
shader._uEdgeHardness = shader.get_uniform_location('uEdgeHardness');
|
||||
shader._uBlur = shader.get_uniform_location('uBlur');
|
||||
shader._uSeed = shader.get_uniform_location('uSeed');
|
||||
|
||||
// Write all uniform values at the start of each animation.
|
||||
shader.connect('begin-animation', (shader, settings) => {
|
||||
// clang-format off
|
||||
shader.set_uniform_float(shader._uColorSpeed, 1, [settings.get_double('aura-glow-color-speed')]);
|
||||
shader.set_uniform_float(shader._uRandomColorOffset, 1, [settings.get_boolean('aura-glow-random-color')]);
|
||||
shader.set_uniform_float(shader._uColorOffset, 1, [settings.get_double('aura-glow-color-offset')]);
|
||||
shader.set_uniform_float(shader._uColorSaturation, 1, [settings.get_double('aura-glow-color-saturation')]);
|
||||
shader.set_uniform_float(shader._uSpeed, 1, [settings.get_double('aura-glow-speed')]);
|
||||
shader.set_uniform_float(shader._uRandomColor, 1, [settings.get_boolean('aura-glow-random-color')]);
|
||||
shader.set_uniform_float(shader._uStartHue, 1, [settings.get_double('aura-glow-start-hue')]);
|
||||
shader.set_uniform_float(shader._uSaturation, 1, [settings.get_double('aura-glow-saturation')]);
|
||||
shader.set_uniform_float(shader._uEdgeSize, 1, [settings.get_double('aura-glow-edge-size')]);
|
||||
shader.set_uniform_float(shader._uEdgeHardness, 1, [settings.get_double('aura-glow-edge-hardness')]);
|
||||
shader.set_uniform_float(shader._uBlur, 1, [settings.get_double('aura-glow-blur')]);
|
||||
@@ -95,19 +95,17 @@ export default class Effect {
|
||||
// binds all user interface elements to the respective settings keys of the profile.
|
||||
static bindPreferences(dialog) {
|
||||
dialog.bindAdjustment('aura-glow-animation-time');
|
||||
dialog.bindAdjustment('aura-glow-color-speed');
|
||||
dialog.bindAdjustment('aura-glow-speed');
|
||||
dialog.bindSwitch('aura-glow-random-color');
|
||||
dialog.bindAdjustment('aura-glow-color-offset');
|
||||
dialog.bindAdjustment('aura-glow-color-saturation');
|
||||
dialog.bindAdjustment('aura-glow-start-hue');
|
||||
dialog.bindAdjustment('aura-glow-saturation');
|
||||
dialog.bindAdjustment('aura-glow-edge-size');
|
||||
dialog.bindAdjustment('aura-glow-edge-hardness');
|
||||
dialog.bindAdjustment('aura-glow-blur');
|
||||
|
||||
// enable and disable the one slider
|
||||
function enableDisablePref(dialog, state) {
|
||||
dialog.getBuilder()
|
||||
.get_object('aura-glow-color-offset-scale')
|
||||
.set_sensitive(!state);
|
||||
dialog.getBuilder().get_object('aura-glow-start-hue-slider').set_sensitive(!state);
|
||||
}
|
||||
|
||||
const switchWidget = dialog.getBuilder().get_object('aura-glow-random-color');
|
||||
|
||||
+16
-16
@@ -39,22 +39,24 @@ export default class Effect {
|
||||
constructor() {
|
||||
this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
|
||||
// Store uniform locations of newly created shaders.
|
||||
shader._uWT = shader.get_uniform_location('uWT');
|
||||
shader._uXpos = shader.get_uniform_location('uXpos');
|
||||
shader._uYpos = shader.get_uniform_location('uYpos');
|
||||
shader._uWinRot = shader.get_uniform_location('uWinRot');
|
||||
shader._uSparkleRot = shader.get_uniform_location('uSparkleRot');
|
||||
shader._uSparkleSize = shader.get_uniform_location('uSparkleSize');
|
||||
shader._uAnimationSplit = shader.get_uniform_location('uAnimationSplit');
|
||||
shader._uHorizontalSparklePosition =
|
||||
shader.get_uniform_location('uHorizontalSparklePosition');
|
||||
shader._uVerticalSparklePosition =
|
||||
shader.get_uniform_location('uVerticalSparklePosition');
|
||||
shader._uWindowRotation = shader.get_uniform_location('uWindowRotation');
|
||||
shader._uSparkleRot = shader.get_uniform_location('uSparkleRot');
|
||||
shader._uSparkleSize = shader.get_uniform_location('uSparkleSize');
|
||||
|
||||
shader._uSeed = shader.get_uniform_location('uSeed');
|
||||
|
||||
// Write all uniform values at the start of each animation.
|
||||
shader.connect('begin-animation', (shader, settings) => {
|
||||
// clang-format off
|
||||
shader.set_uniform_float(shader._uWT, 1, [settings.get_double('team-rocket-window-time')]);
|
||||
shader.set_uniform_float(shader._uXpos, 1, [settings.get_double('team-rocket-x')]);
|
||||
shader.set_uniform_float(shader._uYpos, 1, [settings.get_double('team-rocket-y')]);
|
||||
shader.set_uniform_float(shader._uWinRot, 1, [settings.get_boolean('team-rocket-win-rot')]);
|
||||
shader.set_uniform_float(shader._uAnimationSplit, 1, [settings.get_double('team-rocket-animation-split')]);
|
||||
shader.set_uniform_float(shader._uHorizontalSparklePosition, 1, [settings.get_double('team-rocket-horizontal-sparkle-position')]);
|
||||
shader.set_uniform_float(shader._uVerticalSparklePosition, 1, [settings.get_double('team-rocket-vertical-sparkle-position')]);
|
||||
shader.set_uniform_float(shader._uWindowRotation, 1, [settings.get_boolean('team-rocket-window-rotation')]);
|
||||
shader.set_uniform_float(shader._uSparkleRot, 1, [settings.get_double('team-rocket-sparkle-rot')]);
|
||||
shader.set_uniform_float(shader._uSparkleSize, 1, [settings.get_double('team-rocket-sparkle-size')]);
|
||||
// clang-format on
|
||||
@@ -93,12 +95,10 @@ export default class Effect {
|
||||
// binds all user interface elements to the respective settings keys of the profile.
|
||||
static bindPreferences(dialog) {
|
||||
dialog.bindAdjustment('team-rocket-animation-time');
|
||||
dialog.bindAdjustment('team-rocket-window-time');
|
||||
dialog.bindAdjustment('team-rocket-x');
|
||||
dialog.bindAdjustment('team-rocket-y');
|
||||
|
||||
dialog.bindSwitch('team-rocket-win-rot');
|
||||
|
||||
dialog.bindAdjustment('team-rocket-animation-split');
|
||||
dialog.bindAdjustment('team-rocket-horizontal-sparkle-position');
|
||||
dialog.bindAdjustment('team-rocket-vertical-sparkle-position');
|
||||
dialog.bindSwitch('team-rocket-window-rotation');
|
||||
dialog.bindAdjustment('team-rocket-sparkle-rot');
|
||||
dialog.bindAdjustment('team-rocket-sparkle-size');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user