forked from openkylin/qt5-ukui-platformtheme
sync blur and windowsmanager form yhkylin/v101
remove ukui on style property interface adjust format
This commit is contained in:
parent
c5c909ae46
commit
473946d36c
|
@ -117,9 +117,9 @@ bool BlurHelper::eventFilter(QObject *obj, QEvent *e)
|
|||
#if (QT_VERSION >= QT_VERSION_CHECK(5,12,0))
|
||||
void BlurHelper::registerWidget(QWidget *widget)
|
||||
{
|
||||
// FIXME: how to blur window on wayland?
|
||||
if (!QX11Info::isPlatformX11())
|
||||
return;
|
||||
// // FIXME: how to blur window on wayland?
|
||||
// if (!QX11Info::isPlatformX11())
|
||||
// return;
|
||||
|
||||
if (!widget)
|
||||
return;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1567,13 +1567,11 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty
|
|||
width = sp->m_PushButtonParameters.pushButtonCheckDisablePen.width();
|
||||
painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonCheckDisablePen);
|
||||
painter->setBrush(sp->m_PushButtonParameters.pushButtonCheckDisableBrush);
|
||||
}
|
||||
else if (button->features & QStyleOptionButton::Flat) {
|
||||
} else if (button->features & QStyleOptionButton::Flat) {
|
||||
width = 0;
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(Qt::NoBrush);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
width = sp->m_PushButtonParameters.pushButtonDisablePen.width();
|
||||
painter->setPen(width <= 0 ? Qt::NoPen : sp->m_PushButtonParameters.pushButtonDisablePen);
|
||||
painter->setBrush(sp->m_PushButtonParameters.pushButtonDisableBrush);
|
||||
|
@ -1629,7 +1627,8 @@ void UKUIConfigStyle::drawPrimitive(QStyle::PrimitiveElement element, const QSty
|
|||
} else {
|
||||
if(width == 1 && sp->m_PushButtonParameters.radius != 0)
|
||||
painter->translate(0.5, 0.5);
|
||||
painter->drawRoundedRect(rect.adjusted(width, width, -width, -width), sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius);
|
||||
painter->drawRoundedRect(rect.adjusted(width, width, -width, -width),
|
||||
sp->m_PushButtonParameters.radius, sp->m_PushButtonParameters.radius);
|
||||
}
|
||||
painter->restore();
|
||||
return;
|
||||
|
@ -5456,8 +5455,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp
|
|||
|
||||
|
||||
bool hasIcon = false;
|
||||
if(isComboBox)
|
||||
{
|
||||
if (isComboBox) {
|
||||
if(!menuItem->icon.isNull())
|
||||
hasIcon = true;
|
||||
// auto *comboBox = qobject_cast<const QComboBox*>(widget);
|
||||
|
@ -5469,8 +5467,7 @@ void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOp
|
|||
// break;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else if(menuItem->maxIconWidth != 0)
|
||||
} else if(menuItem->maxIconWidth != 0)
|
||||
hasIcon = true;
|
||||
|
||||
// if(qobject_cast<const QMenu*>(widget))
|
||||
|
|
|
@ -203,13 +203,13 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e)
|
|||
if (!m_prepared_to_drag)
|
||||
return;
|
||||
|
||||
if (m_is_dragging)
|
||||
return;
|
||||
|
||||
QWidget *w = qobject_cast<QWidget*>(obj);
|
||||
const QPoint native = e->globalPos();
|
||||
qreal dpiRatio = qApp->devicePixelRatio();
|
||||
if (QX11Info::isPlatformX11()) {
|
||||
if (m_is_dragging)
|
||||
return;
|
||||
|
||||
// qDebug()<<"x11 move start";
|
||||
auto connection = QX11Info::connection();
|
||||
xcb_ungrab_pointer(connection, XCB_TIME_CURRENT_TIME);
|
||||
|
@ -262,7 +262,7 @@ void WindowManager::mouseMoveEvent(QObject *obj, QMouseEvent *e)
|
|||
return;
|
||||
shellSurface->requestMove(m_seat, m_serial);
|
||||
#endif
|
||||
|
||||
m_is_dragging = true;
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue