🔧 Port random fire option to KWin
This commit is contained in:
+28
-21
@@ -17,13 +17,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="4" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Gradient</string>
|
<string>Animation Time [ms]</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -40,6 +40,16 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Scale</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="kcfg_Scale">
|
<widget class="QDoubleSpinBox" name="kcfg_Scale">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
@@ -50,17 +60,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Speed</string>
|
<string>Speed</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="kcfg_MovementSpeed">
|
<widget class="QDoubleSpinBox" name="kcfg_MovementSpeed">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-5.000000000000000</double>
|
<double>-5.000000000000000</double>
|
||||||
@@ -70,17 +80,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Scale</string>
|
<string>Gradient</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="3" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="KColorButton" name="kcfg_Gradient1">
|
<widget class="KColorButton" name="kcfg_Gradient1">
|
||||||
@@ -119,20 +129,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QCheckBox" name="kcfg_3DNoise">
|
<widget class="QCheckBox" name="kcfg_3DNoise">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>3D Noise</string>
|
<string>3D Noise</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="5" column="1">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QCheckBox" name="kcfg_RandomColor">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Animation Time [ms]</string>
|
<string>Use Random Color</string>
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -145,6 +152,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<header>kcolorbutton.h</header>
|
<header>kcolorbutton.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources />
|
<resources/>
|
||||||
<connections />
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -36,5 +36,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
<entry name="3DNoise" type="Bool">
|
<entry name="3DNoise" type="Bool">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry name="RandomColor" type="Bool">
|
||||||
|
<default>false</default>
|
||||||
|
</entry>
|
||||||
</group>
|
</group>
|
||||||
</kcfg>
|
</kcfg>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
// This part is automatically included in the effect's source during the build process.
|
||||||
|
// The code below is called whenever a window is closed or opened.
|
||||||
|
|
||||||
|
let seed = Math.random();
|
||||||
|
effect.setUniform(this.shader, 'uSeed', seed);
|
||||||
@@ -8,6 +8,8 @@
|
|||||||
effect.setUniform(this.shader, 'uDuration', this.duration * 0.001);
|
effect.setUniform(this.shader, 'uDuration', this.duration * 0.001);
|
||||||
effect.setUniform(this.shader, 'u3DNoise',
|
effect.setUniform(this.shader, 'u3DNoise',
|
||||||
effect.readConfig('3DNoise', true) ? 1.0 : 0.0);
|
effect.readConfig('3DNoise', true) ? 1.0 : 0.0);
|
||||||
|
effect.setUniform(this.shader, 'uRandomColor',
|
||||||
|
effect.readConfig('RandomColor', true) ? 1.0 : 0.0);
|
||||||
effect.setUniform(this.shader, 'uScale', effect.readConfig('Scale', 1.0));
|
effect.setUniform(this.shader, 'uScale', effect.readConfig('Scale', 1.0));
|
||||||
effect.setUniform(this.shader, 'uMovementSpeed', effect.readConfig('MovementSpeed', 1.0));
|
effect.setUniform(this.shader, 'uMovementSpeed', effect.readConfig('MovementSpeed', 1.0));
|
||||||
effect.setUniform(this.shader, 'uGradient1', this.readRGBAConfig('Gradient1'));
|
effect.setUniform(this.shader, 'uGradient1', this.readRGBAConfig('Gradient1'));
|
||||||
|
|||||||
Reference in New Issue
Block a user