forked from openkylin/qt5-ukui-platformtheme
Remove ApplicationStyleSettings
This commit is contained in:
parent
6acc6d5deb
commit
faba92327c
|
@ -163,27 +163,27 @@ UKUIConfigStyle::UKUIConfigStyle(bool dark, bool useDefault, QString type) : QPr
|
||||||
|
|
||||||
m_window_manager = new WindowManager(this);
|
m_window_manager = new WindowManager(this);
|
||||||
|
|
||||||
m_app_style_settings = ApplicationStyleSettings::getInstance();
|
// m_app_style_settings = ApplicationStyleSettings::getInstance();
|
||||||
if (m_app_style_settings) {
|
// if (m_app_style_settings) {
|
||||||
connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) {
|
// connect(m_app_style_settings, &ApplicationStyleSettings::colorStretageChanged, [=](const ApplicationStyleSettings::ColorStretagy &stretagy) {
|
||||||
////todo implemet palette switch.
|
// ////todo implemet palette switch.
|
||||||
switch (stretagy) {
|
// switch (stretagy) {
|
||||||
case ApplicationStyleSettings::System: {
|
// case ApplicationStyleSettings::System: {
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
case ApplicationStyleSettings::Bright: {
|
// case ApplicationStyleSettings::Bright: {
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
case ApplicationStyleSettings::Dark: {
|
// case ApplicationStyleSettings::Dark: {
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
default:
|
// default:
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
qWarning("org.ukui.style is null!");
|
// qWarning("org.ukui.style is null!");
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) {
|
if (QGSettings::isSchemaInstalled("org.ukui.peripherals-mouse")) {
|
||||||
QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse");
|
QGSettings *settings = new QGSettings("org.ukui.peripherals-mouse");
|
||||||
|
|
|
@ -46,7 +46,7 @@ class BlurHelper;
|
||||||
class GestureHelper;
|
class GestureHelper;
|
||||||
class WindowManager;
|
class WindowManager;
|
||||||
|
|
||||||
class ApplicationStyleSettings;
|
//class ApplicationStyleSettings;
|
||||||
//QT_BEGIN_NAMESPACE
|
//QT_BEGIN_NAMESPACE
|
||||||
//namespace UKUIConfigStyleSpace { class UKUIConfigStyle; }
|
//namespace UKUIConfigStyleSpace { class UKUIConfigStyle; }
|
||||||
//QT_END_NAMESPACE
|
//QT_END_NAMESPACE
|
||||||
|
@ -201,7 +201,7 @@ private:
|
||||||
GestureHelper *m_gesture_helper = nullptr;
|
GestureHelper *m_gesture_helper = nullptr;
|
||||||
WindowManager *m_window_manager = nullptr;
|
WindowManager *m_window_manager = nullptr;
|
||||||
|
|
||||||
ApplicationStyleSettings *m_app_style_settings = nullptr;
|
// ApplicationStyleSettings *m_app_style_settings = nullptr;
|
||||||
|
|
||||||
bool m_blink_cursor = true;
|
bool m_blink_cursor = true;
|
||||||
int m_blink_cursor_time = 1200;
|
int m_blink_cursor_time = 1200;
|
||||||
|
|
|
@ -53,9 +53,9 @@ UKUIStylePlugin::UKUIStylePlugin(QObject *parent) :
|
||||||
if (QApplication::style()->inherits("InternalStyle"))
|
if (QApplication::style()->inherits("InternalStyle"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto appStyleSettings = ApplicationStyleSettings::getInstance();
|
// auto appStyleSettings = ApplicationStyleSettings::getInstance();
|
||||||
if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default)
|
// if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default)
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
auto styleName = settings->get("styleName").toString();
|
auto styleName = settings->get("styleName").toString();
|
||||||
auto widgetThemeName = settings->get("widgetThemeName").toString();
|
auto widgetThemeName = settings->get("widgetThemeName").toString();
|
||||||
|
@ -191,9 +191,9 @@ void UKUIStylePlugin::tableModeChanged(bool isTableMode)
|
||||||
if (QApplication::style()->inherits("InternalStyle"))
|
if (QApplication::style()->inherits("InternalStyle"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto appStyleSettings = ApplicationStyleSettings::getInstance();
|
// auto appStyleSettings = ApplicationStyleSettings::getInstance();
|
||||||
if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default)
|
// if (appStyleSettings->currentStyleStretagy() != ApplicationStyleSettings::Default)
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
auto settings = UKUIStyleSettings::globalInstance();
|
auto settings = UKUIStyleSettings::globalInstance();
|
||||||
auto styleName = settings->get("styleName").toString();
|
auto styleName = settings->get("styleName").toString();
|
||||||
|
|
Loading…
Reference in New Issue