refactor(settings): remove minimize animation option

main
reionwong 2 months ago
parent 4a51ae6105
commit 8c8bfbe55c

@ -21,11 +21,7 @@
#include <QDBusConnection>
#include <QDBusInterface>
#include <QDBusReply>
#include <QDBusServiceWatcher>
#include <QDBusPendingCall>
#include <QStandardPaths>
#include <QDebug>
Appearance::Appearance(QObject *parent)
@ -35,8 +31,6 @@ Appearance::Appearance(QObject *parent)
"com.cutefish.Theme",
QDBusConnection::sessionBus())
, m_dockSettings(new QSettings(QSettings::UserScope, "cutefishos", "dock"))
, m_kwinSettings(new QSettings(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/kwinrc",
QSettings::IniFormat))
, m_dockIconSize(0)
, m_dockDirection(0)
, m_dockVisibility(0)
@ -49,10 +43,6 @@ Appearance::Appearance(QObject *parent)
// Dock only supports the centered style. Migrate old Full style settings.
m_dockSettings->setValue("Style", 0);
m_kwinSettings->beginGroup("Plugins");
m_minimiumAnimation = m_kwinSettings->value("magiclampEnabled").toBool() ? 1 : 0;
m_kwinSettings->endGroup();
// Init
if (m_interface.isValid()) {
m_fontPointSize = m_interface.property("systemFontPointSize").toInt();
@ -239,22 +229,3 @@ void Appearance::setDevicePixelRatio(double value)
iface.call("setDevicePixelRatio", value);
}
}
int Appearance::minimiumAnimation() const
{
return m_minimiumAnimation;
}
void Appearance::setMinimiumAnimation(int minimiumAnimation)
{
if (m_minimiumAnimation != minimiumAnimation) {
m_minimiumAnimation = minimiumAnimation;
m_kwinSettings->beginGroup("Plugins");
m_kwinSettings->setValue("magiclampEnabled", m_minimiumAnimation == 1);
m_kwinSettings->setValue("cutefish_squashEnabled", m_minimiumAnimation == 0);
m_kwinSettings->endGroup();
m_kwinSettings->sync();
QDBusInterface("org.kde.KWin", "/KWin").call("reconfigure");
emit minimiumAnimationChanged();
}
}

@ -35,7 +35,6 @@ class Appearance : public QObject
Q_PROPERTY(bool blurEnabled READ blurEnabled WRITE setBlurEnabled NOTIFY blurEnabledChanged)
Q_PROPERTY(double devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged)
Q_PROPERTY(bool dockRoundedWindow READ dockRoundedWindow WRITE setDockRoundedWindow NOTIFY dockRoundedWindowChanged)
Q_PROPERTY(int minimiumAnimation READ minimiumAnimation WRITE setMinimiumAnimation NOTIFY minimiumAnimationChanged)
public:
explicit Appearance(QObject *parent = nullptr);
@ -71,9 +70,6 @@ public:
double devicePixelRatio() const;
Q_INVOKABLE void setDevicePixelRatio(double value);
int minimiumAnimation() const;
void setMinimiumAnimation(int minimiumAnimation);
signals:
void dockIconSizeChanged();
void dockDirectionChanged();
@ -83,20 +79,16 @@ signals:
void blurEnabledChanged();
void devicePixelRatioChanged();
void dockRoundedWindowChanged();
void minimiumAnimationChanged();
private:
QDBusInterface m_interface;
QSettings *m_dockSettings;
QSettings *m_kwinSettings;
bool m_dockRoundedWindow;
int m_dockIconSize;
int m_dockDirection;
int m_dockVisibility;
int m_fontPointSize;
int m_minimiumAnimation;
};
#endif // APPEARANCE_H

@ -57,7 +57,7 @@ ItemPage {
Label {
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
text: "<b>Openfish</b>"
text: "<b>Cutefish</b>"
visible: !about.isCutefishOS
font.pointSize: 22
color: "#3385FF"

@ -123,30 +123,6 @@ ItemPage {
}
}
RoundedItem {
RowLayout {
spacing: FishUI.Units.largeSpacing * 2
Label {
text: qsTr("Minimize animation")
}
TabBar {
Layout.fillWidth: true
currentIndex: appearance.minimiumAnimation
onCurrentIndexChanged: appearance.minimiumAnimation = currentIndex
TabButton {
text: qsTr("Default")
}
TabButton {
text: qsTr("Magic Lamp")
}
}
}
}
RoundedItem {
Label {
text: qsTr("Accent color")

@ -123,21 +123,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>গাঢ় থিমে ওয়ালপেপার ম্লান করুন</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>মিনিমাইজের এ্যানিমেশন</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>ডিফল্ট</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>ম্যাজিক ল্যাম্প</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -123,21 +123,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -123,21 +123,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>Zamrači pozadinu u Tamnoj temi</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>Smanji animacije</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>Zadano</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>Magična lampa</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -136,21 +136,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>ダークテーマで壁紙を暗くする</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>最小化アニメーション</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>デフォルト</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>魔法のランプ</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -90,21 +90,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>Hampifanarahana amin&apos;ny loha-hevitra Maizina ny fond d&apos;ecran</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>Atao somary kelikely ny fihetsiketsehana</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>Par defaut</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>Jiro majika</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -123,21 +123,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>Verduister de bureaubladachtergrond van het donkere thema</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>Minimaliseeranimatie</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>Standaard</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>Magische lamp</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -136,21 +136,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>Zatamni pozadinu u tamnom režimu</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>Minimiziraj animaciju</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>Standardni</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>Magicna Lampa</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -123,21 +123,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -90,21 +90,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>Làm mờ hình nền khi ở chế độ tối</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>Hiệu ứng thu nhỏ</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>Mặc định</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>Chiếc đèn thần kì</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

@ -123,21 +123,6 @@
<source>Dim the wallpaper in dark theme</source>
<translation>在深色模式下调暗壁纸</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="121"/>
<source>Minimize animation</source>
<translation>最小化动画</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="130"/>
<source>Default</source>
<translation>默认</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="134"/>
<source>Magic Lamp</source>
<translation>神灯</translation>
</message>
<message>
<location filename="../src/qml/Appearance/Main.qml" line="142"/>
<source>Accent color</source>

Loading…
Cancel
Save