mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-02 11:17:39 +08:00
update
This commit is contained in:
parent
5b3834ed8f
commit
1be9103412
@ -31,7 +31,7 @@ FluTheme::FluTheme(QObject *parent)
|
||||
});
|
||||
primaryColor(FluColors::getInstance()->Blue());
|
||||
nativeText(false);
|
||||
enableAnimation(false);
|
||||
enableAnimation(true);
|
||||
darkMode(FluThemeType::DarkMode::Light);
|
||||
_systemDark = systemDark();
|
||||
qApp->installEventFilter(this);
|
||||
|
@ -752,7 +752,12 @@ Item {
|
||||
id:nav_stack2
|
||||
anchors.fill: nav_stack
|
||||
clip: true
|
||||
visible: FluPageType.SingleInstance === nav_stack.currentItem.launchMode
|
||||
visible: {
|
||||
if(!nav_stack.currentItem){
|
||||
return false
|
||||
}
|
||||
return FluPageType.SingleInstance === nav_stack.currentItem.launchMode
|
||||
}
|
||||
}
|
||||
function navStack(){
|
||||
return nav_stack
|
||||
|
@ -96,24 +96,22 @@ Popup{
|
||||
ctx.globalCompositeOperation = 'destination-out'
|
||||
ctx.fillStyle = 'black'
|
||||
var rect = Qt.rect(d.pos.x-control.targetMargins,d.pos.y-control.targetMargins, d.target.width+control.targetMargins*2, d.target.height+control.targetMargins*2)
|
||||
ctx.fillRect(rect.x,rect.y,rect.width,rect.height)
|
||||
drawRoundedRect(rect,2,ctx)
|
||||
ctx.restore()
|
||||
}
|
||||
//Todo
|
||||
function drawRoundedRect(rect, r, ctx) {
|
||||
var ptA = Qt.point(rect.x + r, rect.y)
|
||||
var ptB = Qt.point(rect.x + rect.width, rect.y)
|
||||
var ptC = Qt.point(rect.x + rect.width, rect.y + rect.height)
|
||||
var ptD = Qt.point(rect.x, rect.y + rect.height)
|
||||
var ptE = Qt.point(rect.x, rect.y)
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(ptA.x, ptA.y)
|
||||
ctx.arcTo(ptB.x, ptB.y, ptC.x, ptC.y, r)
|
||||
ctx.arcTo(ptC.x, ptC.y, ptD.x, ptD.y, r)
|
||||
ctx.arcTo(ptD.x, ptD.y, ptE.x, ptE.y, r)
|
||||
ctx.arcTo(ptE.x, ptE.y, ptA.x, ptA.y, r)
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(rect.x + r, rect.y);
|
||||
ctx.lineTo(rect.x + rect.width - r, rect.y);
|
||||
ctx.arcTo(rect.x + rect.width, rect.y, rect.x + rect.width, rect.y + r, r);
|
||||
ctx.lineTo(rect.x + rect.width, rect.y + rect.height - r);
|
||||
ctx.arcTo(rect.x + rect.width, rect.y + rect.height, rect.x + rect.width - r, rect.y + rect.height, r);
|
||||
ctx.lineTo(rect.x + r, rect.y + rect.height);
|
||||
ctx.arcTo(rect.x, rect.y + rect.height, rect.x, rect.y + rect.height - r, r);
|
||||
ctx.lineTo(rect.x, rect.y + r);
|
||||
ctx.arcTo(rect.x, rect.y, rect.x + r, rect.y, r);
|
||||
ctx.closePath();
|
||||
ctx.fill()
|
||||
ctx.closePath()
|
||||
}
|
||||
}
|
||||
FluArea{
|
||||
|
@ -753,7 +753,12 @@ Item {
|
||||
id:nav_stack2
|
||||
anchors.fill: nav_stack
|
||||
clip: true
|
||||
visible: FluPageType.SingleInstance === nav_stack.currentItem.launchMode
|
||||
visible: {
|
||||
if(!nav_stack.currentItem){
|
||||
return false
|
||||
}
|
||||
return FluPageType.SingleInstance === nav_stack.currentItem.launchMode
|
||||
}
|
||||
}
|
||||
function navStack(){
|
||||
return nav_stack
|
||||
|
@ -89,19 +89,18 @@ Popup{
|
||||
ctx.restore()
|
||||
}
|
||||
function drawRoundedRect(rect, r, ctx) {
|
||||
var ptA = Qt.point(rect.x + r, rect.y)
|
||||
var ptB = Qt.point(rect.x + rect.width, rect.y)
|
||||
var ptC = Qt.point(rect.x + rect.width, rect.y + rect.height)
|
||||
var ptD = Qt.point(rect.x, rect.y + rect.height)
|
||||
var ptE = Qt.point(rect.x, rect.y)
|
||||
ctx.beginPath()
|
||||
ctx.moveTo(ptA.x, ptA.y)
|
||||
ctx.arcTo(ptB.x, ptB.y, ptC.x, ptC.y, r)
|
||||
ctx.arcTo(ptC.x, ptC.y, ptD.x, ptD.y, r)
|
||||
ctx.arcTo(ptD.x, ptD.y, ptE.x, ptE.y, r)
|
||||
ctx.arcTo(ptE.x, ptE.y, ptA.x, ptA.y, r)
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(rect.x + r, rect.y);
|
||||
ctx.lineTo(rect.x + rect.width - r, rect.y);
|
||||
ctx.arcTo(rect.x + rect.width, rect.y, rect.x + rect.width, rect.y + r, r);
|
||||
ctx.lineTo(rect.x + rect.width, rect.y + rect.height - r);
|
||||
ctx.arcTo(rect.x + rect.width, rect.y + rect.height, rect.x + rect.width - r, rect.y + rect.height, r);
|
||||
ctx.lineTo(rect.x + r, rect.y + rect.height);
|
||||
ctx.arcTo(rect.x, rect.y + rect.height, rect.x, rect.y + rect.height - r, r);
|
||||
ctx.lineTo(rect.x, rect.y + r);
|
||||
ctx.arcTo(rect.x, rect.y, rect.x + r, rect.y, r);
|
||||
ctx.closePath();
|
||||
ctx.fill()
|
||||
ctx.closePath()
|
||||
}
|
||||
}
|
||||
FluArea{
|
||||
|
Loading…
Reference in New Issue
Block a user