🔧 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>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Gradient</string>
|
||||
<string>Animation Time [ms]</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -40,6 +40,16 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</property>
|
||||
</widget>
|
||||
</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">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_Scale">
|
||||
<property name="minimum">
|
||||
@@ -50,17 +60,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="kcfg_MovementSpeed">
|
||||
<property name="minimum">
|
||||
<double>-5.000000000000000</double>
|
||||
@@ -70,17 +80,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Scale</string>
|
||||
<string>Gradient</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="KColorButton" name="kcfg_Gradient1">
|
||||
@@ -119,20 +129,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="kcfg_3DNoise">
|
||||
<property name="text">
|
||||
<string>3D Noise</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="kcfg_RandomColor">
|
||||
<property name="text">
|
||||
<string>Animation Time [ms]</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
<string>Use Random Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -145,6 +152,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<header>kcolorbutton.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources />
|
||||
<connections />
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -36,5 +36,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<entry name="3DNoise" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="RandomColor" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
</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, 'u3DNoise',
|
||||
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, 'uMovementSpeed', effect.readConfig('MovementSpeed', 1.0));
|
||||
effect.setUniform(this.shader, 'uGradient1', this.readRGBAConfig('Gradient1'));
|
||||
|
||||
Reference in New Issue
Block a user