fix(merge v101): merge v101
Description: 同步主线bug修复 Log: 无
This commit is contained in:
parent
18fb67295c
commit
32e4c33cfa
|
@ -18,6 +18,7 @@ include_directories(
|
|||
${Qt5Widgets_INCLUDE_DIRS}
|
||||
${Qt5DBus_INCLUDE_DIRS}
|
||||
${GLIB2_INCLUDE_DIRS}
|
||||
${GIOUNIX2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
**/
|
||||
#include "giodbus.h"
|
||||
#include <gio/gio.h>
|
||||
#include <gio-unix-2.0/gio/gunixfdlist.h>
|
||||
#include <gio/gunixfdlist.h>
|
||||
#include <glib.h>
|
||||
|
||||
int get_server_gvariant_stdout (int drvid)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/bash
|
||||
/usr/lib/ukui-screensaver/set4kScale >/dev/null 2>&1
|
||||
ukui-screensaver-dialog --lock-startup & >/dev/null 2>&1
|
||||
/usr/lib/ukui-screensaver/screensaver-focus-helper & >/dev/null 2>&1
|
||||
|
||||
|
|
|
@ -989,7 +989,7 @@ void Screensaver::setDatelayout()
|
|||
if(dateType == "cn")
|
||||
this->dateOfDay->setText(QDate::currentDate().toString("yyyy/MM/dd ddd").replace("周","星期"));
|
||||
else
|
||||
this->dateOfDay->setText(QDate::currentDate().toString("yyyy-MM-dd ddd"));
|
||||
this->dateOfDay->setText(QDate::currentDate().toString("yyyy-MM-dd ddd").replace("周","星期"));
|
||||
this->dateOfDay->setObjectName("dateOfDay");
|
||||
this->dateOfDay->setAlignment(Qt::AlignCenter);
|
||||
this->dateOfDay->adjustSize();
|
||||
|
@ -1105,7 +1105,7 @@ void Screensaver::updateTime()
|
|||
if(dateType == "cn")
|
||||
this->dateOfDay->setText(curDateTime.date().toString("yyyy/MM/dd ddd").replace("周","星期"));
|
||||
else
|
||||
this->dateOfDay->setText(curDateTime.date().toString("yyyy-MM-dd ddd"));
|
||||
this->dateOfDay->setText(curDateTime.date().toString("yyyy-MM-dd ddd").replace("周","星期"));
|
||||
m_lastDateTime = curDateTime;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ void AuthDialog::initUI()
|
|||
m_userWidget->setObjectName(QStringLiteral("userWidget"));
|
||||
|
||||
/* 头像 */
|
||||
const QString SheetStyle = QString("border-radius: %1px; border:0px solid white;").arg(77*scale);
|
||||
const QString SheetStyle = QString("border-radius: %1px; border:0px solid white;").arg((int)(77*scale));
|
||||
m_labelHeadImg = new QLabel(m_userWidget);
|
||||
m_labelHeadImg->setObjectName(QStringLiteral("faceLabel"));
|
||||
m_labelHeadImg->setFocusPolicy(Qt::NoFocus);
|
||||
|
@ -451,17 +451,17 @@ void AuthDialog::setChildrenGeometry()
|
|||
width(), 376*scale);
|
||||
m_labelLoginTypeTip->setGeometry(0,0,m_userWidget->width(), 30);
|
||||
m_labelLoginTypeTip->setAlignment(Qt::AlignCenter);
|
||||
m_labelHeadImg->setStyleSheet(QString("border-radius: %1px; border:0px solid white;").arg(77*scale));
|
||||
m_labelHeadImg->setStyleSheet(QString("border-radius: %1px; border:0px solid white;").arg((int)(77*scale)));
|
||||
m_labelHeadImg->setGeometry((width() - 154*scale) / 2 , m_labelLoginTypeTip->geometry().bottom()+24*scale, 154*scale, 154*scale);
|
||||
|
||||
QPixmap facePixmap = makeRoundLogo(user.icon, 154*scale, 154*scale, 77*scale);
|
||||
m_labelHeadImg->setPixmap(facePixmap);
|
||||
|
||||
m_labelQRCode->setStyleSheet(QString("border-radius: %1px; border:0px solid white;background-color: rgba(255,255,255,100%);").arg(6*scale));
|
||||
m_labelQRCode->setStyleSheet(QString("border-radius: %1px; border:0px solid white;background-color: rgba(255,255,255,100%);").arg((int)(6*scale)));
|
||||
m_labelQRCode->setGeometry((width() - 154*scale) / 2 , m_labelLoginTypeTip->geometry().bottom()+24*scale, 154*scale, 154*scale);
|
||||
setQRCode(m_imgQRCode);
|
||||
|
||||
m_labelFace->setStyleSheet(QString("border-radius: %1px; border:0px solid white;background-color: rgba(255,255,255,10%);").arg(77*scale));
|
||||
m_labelFace->setStyleSheet(QString("border-radius: %1px; border:0px solid white;background-color: rgba(255,255,255,10%);").arg((int)(77*scale)));
|
||||
m_labelFace->setGeometry((width() - 154*scale) / 2 , m_labelLoginTypeTip->geometry().bottom()+24*scale, 154*scale, 154*scale);
|
||||
QImage faceImg;
|
||||
setFaceImg(faceImg);
|
||||
|
@ -1074,6 +1074,12 @@ void AuthDialog::performBiometricAuth()
|
|||
{
|
||||
qWarning() << "No available devices";
|
||||
skipBiometricAuth();
|
||||
if (m_deviceInfo) {
|
||||
if (!m_widgetLoginOpts || !m_widgetLoginOpts->findDeviceById(m_deviceInfo->id)
|
||||
|| m_widgetLoginOpts->isDeviceDisable(m_deviceInfo->id)) {
|
||||
m_deviceInfo = DeviceInfoPtr();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1386,7 +1392,7 @@ void AuthDialog::setFaceImg(QImage& imgFace, int nStatus)
|
|||
break;
|
||||
case 2:
|
||||
faceImage = m_widgetLoginOpts->loadSvg(":/image/assets/ukui-loginopt-smile.svg", "gray", 48);
|
||||
m_labelFace->setStyleSheet(QString("border-radius: %1px; border:0px solid white;background-color: rgba(255,255,255,20%);").arg(77*scale));
|
||||
m_labelFace->setStyleSheet(QString("border-radius: %1px; border:0px solid white;background-color: rgba(255,255,255,10%);").arg((int)(77*scale)));
|
||||
break;
|
||||
default:
|
||||
faceImage = QPixmap(":/image/assets/ukui-loginopt-smile.svg");
|
||||
|
@ -1467,6 +1473,9 @@ void AuthDialog::onLoginOptsCount(unsigned uCount, bool is_bioBtn)
|
|||
if(m_widgetLoginOpts->getLoginOptCount() < 1)
|
||||
{
|
||||
qWarning() << "No available devices";
|
||||
if (m_deviceInfo) {
|
||||
m_deviceInfo = DeviceInfoPtr();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1592,6 +1601,12 @@ void AuthDialog::onBiometricDbusChanged(bool bActive)
|
|||
if(m_widgetLoginOpts->getLoginOptCount() < 1)
|
||||
{
|
||||
qWarning() << "No available devices";
|
||||
if (m_deviceInfo) {
|
||||
if (!m_widgetLoginOpts || !m_widgetLoginOpts->findDeviceById(m_deviceInfo->id)
|
||||
|| m_widgetLoginOpts->isDeviceDisable(m_deviceInfo->id)) {
|
||||
m_deviceInfo = DeviceInfoPtr();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
#define TIME_TYPE_SCHEMA "org.ukui.control-center.panel.plugins"
|
||||
#define CONFIG_FILE "/etc/lightdm/ukui-greeter.conf"
|
||||
#define ON_TAB_SHEET "QPushButton{background-color: rgba(255,255,255,15%); border-radius: 4px; border: 2px solid #2C73C8;}"
|
||||
#define ON_NORMAL_SHEET "QPushButton{text-align:center;color: rgb(255, 255, 255, 255);border: none;border-radius: 4px;outline: none;} \
|
||||
QPushButton::hover{background-color: rgb(255,255,255,15%);} \
|
||||
#define ON_NORMAL_SHEET "QPushButton{text-align:center;color: rgba(255, 255, 255, 255);border: none;border-radius: 4px;outline: none;} \
|
||||
QPushButton::hover{background-color: rgba(255,255,255,15%);} \
|
||||
QPushButton::pressed {background-color: rgba(255,255,255,40%);}\
|
||||
QPushButton::checked {background-color: rgba(255, 255, 255, 40%);}"
|
||||
float scale;
|
||||
|
@ -709,7 +709,7 @@ void LockWidget::initUI()
|
|||
if(dateType == "cn")
|
||||
ui->lblDate->setText(QDate::currentDate().toString("yyyy/MM/dd ddd").replace("周","星期"));
|
||||
else
|
||||
ui->lblDate->setText(QDate::currentDate().toString("yyyy-MM-dd ddd"));
|
||||
ui->lblDate->setText(QDate::currentDate().toString("yyyy-MM-dd ddd").replace("周","星期"));
|
||||
});
|
||||
|
||||
if(timeType == 12)
|
||||
|
@ -728,7 +728,7 @@ void LockWidget::initUI()
|
|||
if(dateType == "cn")
|
||||
ui->lblDate->setText(QDate::currentDate().toString("yyyy/MM/dd ddd").replace("周","星期"));
|
||||
else
|
||||
ui->lblDate->setText(QDate::currentDate().toString("yyyy-MM-dd ddd"));
|
||||
ui->lblDate->setText(QDate::currentDate().toString("yyyy-MM-dd ddd").replace("周","星期"));
|
||||
|
||||
ui->lblDate->setFontSize(18);
|
||||
ui->lblDate->setAlignment(Qt::AlignCenter);
|
||||
|
@ -801,8 +801,8 @@ void LockWidget::initUI()
|
|||
// });
|
||||
|
||||
btnNetworkManager = new KyNetworkIcon(this);
|
||||
btnNetworkManager->setStyleSheet("QPushButton{text-align:center;color: rgb(255, 255, 255, 255);border: none;border-radius: 4px;outline: none;} \
|
||||
QPushButton::hover{background-color: rgb(255,255,255,15%);} \
|
||||
btnNetworkManager->setStyleSheet("QPushButton{text-align:center;color: rgba(255, 255, 255, 255);border: none;border-radius: 4px;outline: none;} \
|
||||
QPushButton::hover{background-color: rgba(255,255,255,15%);} \
|
||||
QPushButton::pressed {background-color: rgba(255,255,255,40%);}\
|
||||
QPushButton::checked {background-color: rgba(255, 255, 255, 40%);}");
|
||||
btnNetworkManager->setCheckable(true);
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
#define ON_TAB_SHEET "QPushButton{background-color: rgba(255,255,255,15%); border-radius: 4px; border: 2px solid #2C73C8;}"
|
||||
#define ON_NORMAL_SHEET "QPushButton{background-color: rgba(255,255,255,15%); border-radius: 4px; border: none;}\
|
||||
QPushButton::hover{ background-color: rgb(255,255,255,40%);}\
|
||||
QPushButton::hover{ background-color: rgba(255,255,255,40%);}\
|
||||
QPushButton::pressed {background-color: rgba(255,255,255,40%);}\
|
||||
QPushButton::checked {background-color: rgba(255, 255, 255, 40%);}"
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
|
||||
#include "rootWindowBackground.h"
|
||||
|
||||
Pixmap pix;
|
||||
static const XID INVAL_ID = ~0UL;
|
||||
Pixmap pix = INVAL_ID;
|
||||
Display *dpy = NULL;
|
||||
Window root = 0;
|
||||
Screen *scn = NULL;
|
||||
|
@ -189,6 +190,10 @@ void setRootWindowBackground(bool type,unsigned int color,char *filename, int nO
|
|||
if(!root)
|
||||
root = DefaultRootWindow(dpy);
|
||||
|
||||
if (pix != INVAL_ID) {
|
||||
XFreePixmap(dpy, pix);
|
||||
pix = INVAL_ID;
|
||||
}
|
||||
pix = XCreatePixmap(dpy, root, width, height,
|
||||
DefaultDepthOfScreen(scn));
|
||||
|
||||
|
@ -385,6 +390,7 @@ void drawBackground(bool isDraw)
|
|||
return ;
|
||||
}
|
||||
if (isDraw) {
|
||||
if (pix != INVAL_ID)
|
||||
XSetWindowBackgroundPixmap(dpy, root, pix);
|
||||
XClearWindow(dpy, root);
|
||||
}
|
||||
|
@ -393,7 +399,10 @@ void drawBackground(bool isDraw)
|
|||
XEvent ev;
|
||||
XNextEvent(dpy, &ev);
|
||||
}
|
||||
if (pix != INVAL_ID) {
|
||||
XFreePixmap(dpy, pix);
|
||||
pix = INVAL_ID;
|
||||
}
|
||||
XCloseDisplay(dpy);
|
||||
dpy = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue