chore: depend
Description: remove depend of mate Log: 删除mate、gnome依赖
This commit is contained in:
parent
f0beeeee6e
commit
b3556c6828
|
@ -1,3 +1,12 @@
|
|||
ukui-control-center (4.10.0.0-ok1.6) nile; urgency=medium
|
||||
|
||||
* BUG:无
|
||||
* 需求号: 无
|
||||
* 其他改动说明:去除多余mate依赖
|
||||
* 其他改动影响域:无,重新编译
|
||||
|
||||
-- zhoubin <zhoubin@kylinos.cn> Wed, 08 Nov 2023 14:25:16 +0800
|
||||
|
||||
ukui-control-center (4.10.0.0-ok1.5) nile; urgency=medium
|
||||
|
||||
* BUG:I82NX1【主要】【用户手册】用户手册-设置中有多处激活、安全相关描述或截图
|
||||
|
|
|
@ -26,8 +26,7 @@ LIBS += -L$$[QT_INSTALL_LIBS] -lgsettings-qt
|
|||
|
||||
CONFIG += link_pkgconfig \
|
||||
C++11
|
||||
PKGCONFIG += libmatekbd \
|
||||
gsettings-qt \
|
||||
PKGCONFIG += gsettings-qt \
|
||||
kysdk-qtwidgets \
|
||||
kysdk-diagnostics \
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "interface/ukcccommon.h"
|
||||
using namespace ukcc;
|
||||
#include "flowlayout.h"
|
||||
#include "tristatelabel.h"
|
||||
|
||||
#define STYLE_FONT_SCHEMA "org.ukui.style"
|
||||
|
||||
|
@ -171,7 +170,7 @@ void HomePageWidget::initUI() {
|
|||
funcHorLayout->setSpacing(8);
|
||||
|
||||
uint AllWidth = 0;
|
||||
QList< TristateLabel *> mLabels;
|
||||
QList<TristateLabel *> Labels;
|
||||
//循环填充模块下属功能
|
||||
if (moduleIndex >= FunctionSelect::funcinfoListHomePage.size()) {
|
||||
continue;
|
||||
|
@ -204,10 +203,14 @@ void HomePageWidget::initUI() {
|
|||
QString textName = single.namei18nString;
|
||||
TristateLabel *label = new TristateLabel(textName, widget);
|
||||
|
||||
mLabels.append(label);
|
||||
AllWidth += label->width() + 4;
|
||||
if (AllWidth > 198)
|
||||
if (single.isEnable) {
|
||||
Labels.append(label);
|
||||
AllWidth += label->width() + funcHorLayout->spacing();
|
||||
}
|
||||
// 显示后总label宽度大导致显示不全,隐藏后加载显示的label
|
||||
if (!single.isEnable || AllWidth > 198) {
|
||||
label->setVisible(false);
|
||||
}
|
||||
|
||||
// 监听该插件是否启用
|
||||
if (plugin_settings) {
|
||||
|
@ -219,21 +222,31 @@ void HomePageWidget::initUI() {
|
|||
if (key == SHOW_KEY) {
|
||||
CommonInterface * pluginInstance = qobject_cast<CommonInterface *>(moduleMap.value(single.namei18nString));
|
||||
bool isShow = pluginInstance->isEnable() && vecGsettins[single.nameString]->get(SHOW_KEY).toBool();
|
||||
label->setVisible(isShow && AllWidth < 198);
|
||||
// 动态调整在首页显示的插件池
|
||||
if (isShow) {
|
||||
mLabels[moduleIndex].insert(funcIndex, label);
|
||||
int MWidth = 0;
|
||||
for (TristateLabel * label : mLabels[moduleIndex]) {
|
||||
if ((MWidth += label->width() + funcHorLayout->spacing()) < 198) {
|
||||
label->setVisible(true);
|
||||
} else {
|
||||
label->setVisible(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mLabels[moduleIndex].removeOne(label);
|
||||
label->setVisible(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!single.isEnable) {
|
||||
label->setVisible(false);
|
||||
}
|
||||
|
||||
connect(label, SIGNAL(clicked()), moduleSignalMapper, SLOT(map()));
|
||||
moduleSignalMapper->setMapping(label, moduleMap[single.namei18nString]);
|
||||
|
||||
funcHorLayout->addWidget(label);
|
||||
}
|
||||
|
||||
mLabels.append(Labels);
|
||||
funcHorLayout->addStretch();
|
||||
|
||||
// 下属无插件,不显示
|
||||
|
@ -247,11 +260,11 @@ void HomePageWidget::initUI() {
|
|||
connect(stylesettings,&QGSettings::changed, [=](QString key) {
|
||||
if ("systemFont" == key || "systemFontSize" == key) {
|
||||
int MWidth = 0;
|
||||
for (TristateLabel * label : mLabels) {
|
||||
for (TristateLabel * label : mLabels[moduleIndex]) {
|
||||
QFontMetrics fontMetrics(this->font());
|
||||
int fontSize = fontMetrics.width(label->text());
|
||||
label->setFixedWidth(fontSize);
|
||||
if ((MWidth += label->width() + 4) < 198) {
|
||||
if ((MWidth += label->width() + funcHorLayout->spacing()) < 198) {
|
||||
label->setVisible(true);
|
||||
} else {
|
||||
label->setVisible(false);
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <QVariantMap>
|
||||
#include <QGSettings>
|
||||
|
||||
#include "tristatelabel.h"
|
||||
|
||||
#ifdef WITHKYSEC
|
||||
#include <kysec/libkysec.h>
|
||||
#include <kysec/status.h>
|
||||
|
@ -76,6 +78,7 @@ private:
|
|||
Ui::HomePageWidget *ui;
|
||||
MainWindow * pmainWindow;
|
||||
QVariantMap mModuleMap;
|
||||
QList<QList<TristateLabel *>> mLabels;
|
||||
};
|
||||
|
||||
#endif // HOMEPAGEWIDGET_H
|
||||
|
|
|
@ -26,7 +26,6 @@ using namespace ukcc;
|
|||
#include "imageutil.h"
|
||||
#include "ukccabout.h"
|
||||
|
||||
#include <libmatemixer/matemixer.h>
|
||||
#include <QLabel>
|
||||
#include <QLocale>
|
||||
#include <QPushButton>
|
||||
|
@ -82,7 +81,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
ui(new Ui::MainWindow),
|
||||
m_searchWidget(nullptr)
|
||||
{
|
||||
mate_mixer_init();
|
||||
qApp->installEventFilter(this);
|
||||
qApp->setStyle(new InternalStyle("ukui"));
|
||||
is_ExitPower = isExitsPower();
|
||||
|
|
Loading…
Reference in New Issue