mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-07-15 18:12:21 +08:00
fix: 修复 Deepin 系统上显示“开发者模式未开启”的问题
没有区分 Deepin 和 UOS,在 Deepin 上对开发者模式状态文件进行判断,可能造成错误 Log: 添加判断区分 Deepin 和 UOS,仅在 UOS 判断开发者模式状态文件;优化 main 函数长度,将环境变量设置和 config.ini 读写放入 Utils 独立静态函数中调用;修复从托盘打开主界面时透明度动画不流畅的问题;优化关闭窗口动画代码,与打开窗口动画代码合并;修复主窗口关闭时,从托盘打开关于对话框后,调起主窗口会遮挡关于对话框的问题
This commit is contained in:
parent
de2db98324
commit
ab6c3d37d2
@ -1,4 +1,5 @@
|
||||
#include "application.h"
|
||||
#include "mainwindow-dtk.h"
|
||||
|
||||
#include <DPlatformWindowHandle>
|
||||
#include <DLog>
|
||||
@ -46,7 +47,7 @@ Application::Application(int &argc, char **argv)
|
||||
|
||||
void Application::handleAboutAction()
|
||||
{
|
||||
if (aboutDialog()) {
|
||||
if (aboutDialog() && aboutDialog()->parent() == m_mainWindow) {
|
||||
DApplication::handleAboutAction();
|
||||
return;
|
||||
}
|
||||
@ -81,10 +82,30 @@ void Application::setVersionAndBuildDateTime(const QString &version, const QStri
|
||||
setApplicationVersion(DApplication::buildVersion(config.value("build/version").toString() + "-" + "Flamescion" + "-" + config.value("build/time").toString()));
|
||||
}
|
||||
|
||||
void Application::setMainWindow(MainWindow *window)
|
||||
{
|
||||
m_mainWindow = window;
|
||||
if (aboutDialog() == nullptr || aboutDialog()->parent() != m_mainWindow)
|
||||
{
|
||||
initAboutDialog();
|
||||
}
|
||||
}
|
||||
|
||||
void Application::initAboutDialog()
|
||||
{
|
||||
if (m_mainWindow == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (aboutDialog())
|
||||
{
|
||||
aboutDialog()->deleteLater();
|
||||
setAboutDialog(nullptr);
|
||||
}
|
||||
|
||||
// 自定义 DAboutDialog
|
||||
DAboutDialog *dialog = new DAboutDialog(activeWindow());
|
||||
DAboutDialog *dialog = new DAboutDialog(m_mainWindow);
|
||||
dialog->setProductName(productName());
|
||||
dialog->setProductIcon(productIcon());
|
||||
dialog->setVersion(translate("DAboutDialog", "Version: %1").arg(applicationVersion()));
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
class MainWindow;
|
||||
class Application : public DApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -16,6 +17,7 @@ public:
|
||||
static void checkAppConfigLocation();
|
||||
|
||||
void setVersionAndBuildDateTime(const QString &version, const QString &buildDateTime);
|
||||
void setMainWindow(MainWindow *window);
|
||||
|
||||
private:
|
||||
void initAboutDialog();
|
||||
@ -23,6 +25,8 @@ private:
|
||||
private:
|
||||
QString m_version;
|
||||
QString m_buildDateTime;
|
||||
|
||||
MainWindow *m_mainWindow = nullptr;
|
||||
};
|
||||
|
||||
#endif // APPLICATION_H
|
||||
|
69
src/main.cpp
69
src/main.cpp
@ -1,5 +1,6 @@
|
||||
#include "application.h"
|
||||
#include "mainwindow-dtk.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#include <DSysInfo>
|
||||
#include <DApplicationSettings>
|
||||
@ -14,8 +15,6 @@
|
||||
DCORE_USE_NAMESPACE
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
#define UOSCheckFile "/var/lib/deepin/developer-mode/enabled"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Get build time
|
||||
@ -24,75 +23,16 @@ int main(int argc, char *argv[])
|
||||
static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss");
|
||||
static const QString buildDateTime = buildDate.toString("yyyy.MM.dd") + "-" + buildTime.toString("hh:mm:ss");
|
||||
|
||||
// 设置桌面环境环境变量
|
||||
bool isDeepinOS = true;
|
||||
if (!QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin"))
|
||||
{
|
||||
qputenv("XDG_CURRENT_DESKTOP", "Deepin");
|
||||
isDeepinOS = false;
|
||||
}
|
||||
|
||||
bool isWayland = false;
|
||||
auto e = QProcessEnvironment::systemEnvironment();
|
||||
QString XDG_SESSION_TYPE = e.value(QStringLiteral("XDG_SESSION_TYPE"));
|
||||
QString WAYLAND_DISPLAY = e.value(QStringLiteral("WAYLAND_DISPLAY"));
|
||||
if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
|
||||
{
|
||||
isWayland = true;
|
||||
}
|
||||
|
||||
// NOTE: 提前设置组织名称和应用名称,避免配置文件位置错误
|
||||
DApplication::setOrganizationName("spark-union");
|
||||
DApplication::setApplicationName("spark-store");
|
||||
Application::checkAppConfigLocation(); // 检查 ~/.config/spark-union/spark-store 文件夹是否存在
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
config.setValue("build/isWayland", isWayland);
|
||||
config.setValue("build/isDeepinOS", isDeepinOS);
|
||||
// Check config file, if there is no wayland config, then set it to default, which means use wayland if possible.
|
||||
if (!config.contains("build/useWayland"))
|
||||
{
|
||||
config.setValue("build/useWayland", true);
|
||||
}
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
|
||||
bool useWayland = config.value("build/useWayland").toBool();
|
||||
qDebug() << "System Wayland enabled:" << isWayland << ". Spark Wayland enabled:" << useWayland;
|
||||
// 初始化 config.ini 配置文件
|
||||
Utils::initConfig();
|
||||
|
||||
// Set display backend
|
||||
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDDE() || isDeepinOS))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "wayland");
|
||||
}
|
||||
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDDE() && isDeepinOS))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dwayland");
|
||||
}
|
||||
else
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dxcb");
|
||||
}
|
||||
|
||||
// Check UOS developer mode.
|
||||
QFile UOSDevelopFile(UOSCheckFile);
|
||||
if (isDeepinOS && UOSDevelopFile.exists() && UOSDevelopFile.open(QFile::ReadOnly | QFile::Text))
|
||||
{
|
||||
config.setValue("UOS/isUOS", true);
|
||||
QString lineData = UOSDevelopFile.readLine();
|
||||
bool devmode = lineData.trimmed().toInt();
|
||||
qDebug() << "UOS Developer Mode Status:" << devmode;
|
||||
config.setValue("UOS/EnableDeveloperMode", devmode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config.contains("UOS/isUOS"))
|
||||
{
|
||||
config.remove("UOS/isUOS");
|
||||
config.remove("UOS/EnableDeveloperMode");
|
||||
}
|
||||
}
|
||||
UOSDevelopFile.close();
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
Utils::setQPAPlatform();
|
||||
|
||||
// 龙芯机器配置,使得 DApplication 能正确加载 QTWEBENGINE
|
||||
qputenv("DTK_FORCE_RASTER_WIDGETS", "FALSE");
|
||||
@ -131,6 +71,7 @@ int main(int argc, char *argv[])
|
||||
DApplicationSettings settings; // 定义 DApplicationSettings,自动保存主题设置
|
||||
|
||||
MainWindow w;
|
||||
a.setMainWindow(&w); // 设置应用程序主窗口,用于初始化关于对话框
|
||||
// 让打开时界面显示在正中
|
||||
Dtk::Widget::moveToCenter(&w);
|
||||
|
||||
|
@ -139,7 +139,7 @@ void MainWindow::initTitleBar()
|
||||
ly_titlebar->addWidget(backButton);
|
||||
// Check wayland configs
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
if (!config.value("build/isDeepinOS").toBool() && config.value("build/useWayland").toBool())
|
||||
if (!config.value("runtime/isDDE").toBool() && config.value("runtime/useWayland").toBool())
|
||||
{
|
||||
// Wayland 搜索栏居中
|
||||
ly_titlebar->addStretch(WaylandSearchCenter);
|
||||
|
@ -1,9 +1,23 @@
|
||||
#include "utils.h"
|
||||
#include "application.h"
|
||||
|
||||
#include <QDBusInterface>
|
||||
#include <DSysInfo>
|
||||
|
||||
// Author: chatGPT
|
||||
#include <QDBusInterface>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QFile>
|
||||
|
||||
#define UOSDeveloperModeFile "/var/lib/deepin/developer-mode/enabled"
|
||||
|
||||
/**
|
||||
* @author chatGPT
|
||||
* @brief Utils::sendNotification 发送系统通知
|
||||
* @param icon 图标名称
|
||||
* @param title 通知标题
|
||||
* @param body 通知内容
|
||||
*/
|
||||
void Utils::sendNotification(const QString &icon, const QString &title, const QString &body)
|
||||
{
|
||||
QDBusInterface interface("org.freedesktop.Notifications",
|
||||
@ -22,3 +36,149 @@ void Utils::sendNotification(const QString &icon, const QString &title, const QS
|
||||
|
||||
interface.callWithArgumentList(QDBus::AutoDetect, "Notify", args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::isDDE 判断是否使用 DDE 桌面环境
|
||||
* @return
|
||||
*/
|
||||
bool Utils::isDDE()
|
||||
{
|
||||
bool isDDE = true;
|
||||
if (!QString::fromUtf8(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin"))
|
||||
{
|
||||
qputenv("XDG_CURRENT_DESKTOP", "Deepin");
|
||||
isDDE = false;
|
||||
}
|
||||
|
||||
return isDDE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::isWayland 判断是否使用 wayland 显示协议
|
||||
* @return bool true: 使用 wayland 显示协议 false: 使用 x11 显示协议
|
||||
*/
|
||||
bool Utils::isWayland()
|
||||
{
|
||||
bool isWayland = false;
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
QString XDG_SESSION_TYPE = env.value(QStringLiteral("XDG_SESSION_TYPE"));
|
||||
QString WAYLAND_DISPLAY = env.value(QStringLiteral("WAYLAND_DISPLAY"));
|
||||
if (XDG_SESSION_TYPE == QLatin1String("wayland") || WAYLAND_DISPLAY.contains(QLatin1String("wayland"), Qt::CaseInsensitive))
|
||||
{
|
||||
isWayland = true;
|
||||
}
|
||||
|
||||
return isWayland;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::initConfig 初始化 config.ini 配置文件,去除废弃字段
|
||||
*/
|
||||
void Utils::initConfig()
|
||||
{
|
||||
// WARNING: 请在 组织名称 和 应用程序名称 初始化完成后调用
|
||||
bool useWayland = true;
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
if (config.contains("build/useWayland"))
|
||||
{
|
||||
useWayland = config.value("build/useWayland").toBool();
|
||||
}
|
||||
config.remove("build/isDeepinOS");
|
||||
config.remove("build/isWayland");
|
||||
config.remove("build/useWayland");
|
||||
|
||||
config.setValue("runtime/isDDE", isDDE());
|
||||
config.setValue("runtime/isWayland", isWayland());
|
||||
// Check config file, if there is no wayland config, then set it to default, which means use wayland if possible.
|
||||
if (!config.contains("runtime/useWayland"))
|
||||
{
|
||||
config.setValue("runtime/useWayland", useWayland);
|
||||
}
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
|
||||
checkUOSDeveloperMode(); // Check UOS developer mode
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::isUOS 判断是否为 UOS 操作系统
|
||||
* @return bool true: UOS 操作系统 false: 非 UOS 操作系统
|
||||
*/
|
||||
bool Utils::isUOS()
|
||||
{
|
||||
// WARNING: 请在 组织名称 和 应用程序名称 初始化完成后调用
|
||||
bool isUOS = false;
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
if (Dtk::Core::DSysInfo::productType() == Dtk::Core::DSysInfo::Uos)
|
||||
{
|
||||
isUOS = true;
|
||||
config.setValue("UOS/isUOS", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
isUOS = false;
|
||||
config.remove("UOS");
|
||||
}
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
|
||||
return isUOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::setQPAPlatform Set display backend
|
||||
*/
|
||||
void Utils::setQPAPlatform()
|
||||
{
|
||||
// WARNING: 请在 initConfig() 执行后调用
|
||||
bool isDDE = Utils::isDDE(); // WARNING: 只能执行一次,后续执行时环境变量已经被覆盖,导致判断错误
|
||||
bool isWayland = Utils::isWayland();
|
||||
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
bool useWayland = config.value("runtime/useWayland").toBool();
|
||||
|
||||
qDebug() << "System Wayland enabled:" << isWayland << "Spark Wayland enabled:" << useWayland;
|
||||
|
||||
if (isWayland && useWayland && !(Dtk::Core::DSysInfo::isDeepin() || isDDE))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "wayland");
|
||||
}
|
||||
else if (isWayland && useWayland && (Dtk::Core::DSysInfo::isDeepin() && isDDE))
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dwayland");
|
||||
}
|
||||
else
|
||||
{
|
||||
qputenv("QT_QPA_PLATFORM", "dxcb");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Utils::checkUOSDeveloperMode Check UOS developer mode
|
||||
*/
|
||||
void Utils::checkUOSDeveloperMode()
|
||||
{
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
|
||||
QFile file(UOSDeveloperModeFile);
|
||||
if (Utils::isUOS() && file.exists() && file.open(QFile::ReadOnly | QFile::Text))
|
||||
{
|
||||
QString lineData = QString::fromUtf8(file.readLine());
|
||||
bool devmode = lineData.trimmed().toInt();
|
||||
qDebug() << "UOS Developer Mode Status:" << devmode;
|
||||
config.setValue("UOS/EnableDeveloperMode", devmode);
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* NOTE: Utils::isUOS() 中,判断为非 UOS 时已经从 config 中删除 UOS 组,
|
||||
* 此处若包含该字段则一定是 UOS,直接写入开发者模式开关状态即可
|
||||
*/
|
||||
if (config.contains("UOS/EnableDeveloperMode"))
|
||||
{
|
||||
config.setValue("UOS/EnableDeveloperMode", false);
|
||||
}
|
||||
}
|
||||
file.close();
|
||||
config.sync(); // 写入更改至 config.ini,并同步最新内容
|
||||
}
|
||||
|
@ -7,6 +7,12 @@ class Utils
|
||||
{
|
||||
public:
|
||||
static void sendNotification(const QString &icon, const QString &title, const QString &body);
|
||||
static bool isDDE();
|
||||
static bool isWayland();
|
||||
static void initConfig();
|
||||
static bool isUOS();
|
||||
static void setQPAPlatform();
|
||||
static void checkUOSDeveloperMode();
|
||||
};
|
||||
|
||||
#endif // UTILS_H
|
||||
|
@ -1,8 +1,5 @@
|
||||
#include "widgetanimation.h"
|
||||
|
||||
WidgetAnimation::WidgetAnimation()
|
||||
{
|
||||
}
|
||||
#include "widgets/base/basewidgetopacity.h"
|
||||
|
||||
void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange)
|
||||
{
|
||||
@ -28,27 +25,35 @@ void WidgetAnimation::widgetShake(QWidget *pWidget, int nRange)
|
||||
QPropertyAnimation *WidgetAnimation::createWidgetOpacity(QWidget *pWidget, bool isAppear)
|
||||
{
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(pWidget, "windowOpacity", pWidget);
|
||||
// 设置动画效果
|
||||
animation->setEasingCurve(QEasingCurve::Linear);
|
||||
// 设置动画时间(单位:毫秒)
|
||||
animation->setDuration(500);
|
||||
// 设置动画步长值,以及在该位置时显示的透明度
|
||||
if (isAppear)
|
||||
{
|
||||
animation->setKeyValueAt(0, 0);
|
||||
// m_animation->setKeyValueAt(0.5, 0);
|
||||
animation->setKeyValueAt(1, 1);
|
||||
// 设置动画效果
|
||||
animation->setEasingCurve(QEasingCurve::Linear);
|
||||
// 设置动画步长值,以及在该位置时显示的透明度(即动画关键帧)
|
||||
animation->setKeyValueAt(0.0, 0.0);
|
||||
animation->setKeyValueAt(1.0, 1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
animation->setKeyValueAt(0, 1);
|
||||
animation->setKeyValueAt(1, 0);
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
animation->setKeyValueAt(0.0, 1.0);
|
||||
animation->setKeyValueAt(1.0, 0.0);
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::finished, pWidget, [=]() { pWidget->close(); });
|
||||
}
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::valueChanged, pWidget, [=]()
|
||||
{
|
||||
pWidget->update(); // NOTE: 保证窗口透明度动画平滑
|
||||
});
|
||||
|
||||
return animation;
|
||||
}
|
||||
|
||||
void WidgetAnimation::widgetOpacity(QWidget *pWidget, bool isAppear)
|
||||
{
|
||||
// 开始动画
|
||||
createWidgetOpacity(pWidget, isAppear)->start();
|
||||
// 启动/关闭动画
|
||||
createWidgetOpacity(pWidget, isAppear)->start(QPropertyAnimation::DeleteWhenStopped);
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
#ifndef WIDGETANIMATION_H
|
||||
#define WIDGETANIMATION_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QPropertyAnimation>
|
||||
|
||||
class WidgetAnimation
|
||||
{
|
||||
public:
|
||||
WidgetAnimation();
|
||||
static void widgetShake(QWidget *pWidget, int nRange);
|
||||
|
||||
static QPropertyAnimation* createWidgetOpacity(QWidget *pWidget, bool isAppear);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "basewidgetopacity.h"
|
||||
#include "utils/widgetanimation.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
@ -8,7 +9,6 @@
|
||||
|
||||
BaseWidgetOpacity::BaseWidgetOpacity(QWidget *parent) : DBlurEffectWidget(parent)
|
||||
{
|
||||
// WidgetAnimation::widgetOpacity(this,true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -19,7 +19,7 @@ void BaseWidgetOpacity::showEvent(QShowEvent *event)
|
||||
{
|
||||
// FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?)
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
bool isWayland = config.value("build/isWayland").toBool();
|
||||
bool isWayland = Utils::isWayland();
|
||||
if (!isWayland)
|
||||
{
|
||||
if (!showWindowAnimation)
|
||||
@ -32,13 +32,15 @@ void BaseWidgetOpacity::showEvent(QShowEvent *event)
|
||||
DBlurEffectWidget::showEvent(event);
|
||||
}
|
||||
|
||||
/// @brief 窗口关闭事件
|
||||
/// @param event
|
||||
/**
|
||||
* @brief 窗口关闭事件
|
||||
* @param event
|
||||
*/
|
||||
void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
// FIXME: wayland 不支持直接设置窗口透明度,需要调用 wayland 相关库(考虑抄控制中心“窗口移动时启用透明特效”代码?)
|
||||
QSettings config(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/config.ini", QSettings::IniFormat);
|
||||
bool isWayland = config.value("build/isWayland").toBool();
|
||||
bool isWayland = Utils::isWayland();
|
||||
if (isWayland)
|
||||
{
|
||||
return DBlurEffectWidget::closeEvent(event);
|
||||
@ -47,23 +49,8 @@ void BaseWidgetOpacity::closeEvent(QCloseEvent *event)
|
||||
if (!closeWindowAnimation)
|
||||
{
|
||||
closeWindowAnimation = true;
|
||||
WidgetAnimation::widgetOpacity(this, false);
|
||||
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity");
|
||||
animation->setEasingCurve(QEasingCurve::OutQuart);
|
||||
animation->setDuration(500);
|
||||
animation->setStartValue(1.0);
|
||||
animation->setEndValue(0.0);
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::valueChanged, this, [=](const QVariant &value)
|
||||
{
|
||||
this->update();
|
||||
// setWindowTitle(QString("ヾ(⌒∇⌒*)See You♪ - %1%").arg(int(value.toFloat() * 100)));
|
||||
});
|
||||
|
||||
QObject::connect(animation, &QPropertyAnimation::finished, this, [=]()
|
||||
{ this->close(); });
|
||||
|
||||
animation->start();
|
||||
event->ignore();
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user