🪲 Fix KWin portal effect config UI

This commit is contained in:
Simon Schneegans
2022-12-22 21:21:39 +01:00
parent 87281c89df
commit 3f55c23aff
2 changed files with 143 additions and 77 deletions
+91 -25
View File
@@ -1,10 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<ui version="4.0"> <ui version="4.0">
<class>BMWConfigForm</class> <class>BMWConfigForm</class>
<widget class="QWidget" name="BMWConfigForm"> <widget class="QWidget" name="BMWConfigForm">
@@ -17,17 +11,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Duration:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Color:</string> <string>Color:</string>
@@ -40,10 +24,23 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="0" column="0">
<widget class="KColorButton" name="kcfg_Color"> <widget class="QLabel" name="label">
<property name="alphaChannelEnabled"> <property name="text">
<bool>true</bool> <string>Duration:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Rotation Speed</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@@ -53,16 +50,85 @@ SPDX-License-Identifier: GPL-3.0-or-later
<string> milliseconds</string> <string> milliseconds</string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>100</number> <number>1000</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>9999</number> <number>5000</number>
</property> </property>
<property name="singleStep"> <property name="singleStep">
<number>100</number> <number>100</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1">
<widget class="KColorButton" name="kcfg_Color">
<property name="alphaChannelEnabled" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Whirl</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Details</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="kcfg_Details">
<property name="minimum">
<double>1.000000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="kcfg_Whirl">
<property name="minimum">
<double>-2.000000000000000</double>
</property>
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="stepType">
<enum>QAbstractSpinBox::AdaptiveDecimalStepType</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="kcfg_RotationSpeed">
<property name="minimum">
<double>-2.000000000000000</double>
</property>
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="stepType">
<enum>QAbstractSpinBox::AdaptiveDecimalStepType</enum>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
@@ -72,6 +138,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>
+3 -3
View File
@@ -7,6 +7,6 @@
effect.setUniform(this.shader, 'uDuration', this.duration * 0.001); effect.setUniform(this.shader, 'uDuration', this.duration * 0.001);
effect.setUniform(this.shader, 'uColor', this.readRGBConfig('Color')); effect.setUniform(this.shader, 'uColor', this.readRGBConfig('Color'));
effect.setUniform(this.shader, 'uDetails', this.readConfig('Details', 1.0)); effect.setUniform(this.shader, 'uDetails', effect.readConfig('Details', 1.0));
effect.setUniform(this.shader, 'uRotationSpeed', this.readConfig('RotationSpeed', 1.0)); effect.setUniform(this.shader, 'uRotationSpeed', effect.readConfig('RotationSpeed', 1.0));
effect.setUniform(this.shader, 'uWhirl', this.readConfig('Whirl', 1.0)); effect.setUniform(this.shader, 'uWhirl', effect.readConfig('Whirl', 1.0));