Compare commits
No commits in common. "50f70711727169005a4bd9fb7b1add9855f432c7" and "9ced60de1e5959bfbccb6aac077f211bbb12675d" have entirely different histories.
50f7071172
...
9ced60de1e
|
@ -325,13 +325,13 @@ void FluFramelessHelper::componentComplete(){
|
|||
exstyle = exstyle | WS_EX_LAYERED;
|
||||
SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle);
|
||||
SetLayeredWindowAttributes(hwnd, RGB(251, 255, 242), 0, LWA_COLORKEY);
|
||||
SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||
connect(window,&QQuickWindow::activeChanged,this,[this,hwnd]{
|
||||
if(this->window->isActive()){
|
||||
LONG exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
if(exstyle & WS_EX_LAYERED){
|
||||
exstyle = exstyle &~ WS_EX_LAYERED;
|
||||
SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle);
|
||||
SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -41,7 +41,6 @@ Item{
|
|||
color: control.lineColor
|
||||
height: parent.height
|
||||
width: 2
|
||||
visible: repeater.count!==0
|
||||
state: d.stateName
|
||||
states: [
|
||||
State {
|
||||
|
@ -111,7 +110,6 @@ Item{
|
|||
id:layout_column
|
||||
spacing: 30
|
||||
width: control.width
|
||||
height: repeater.count === 0 ? 1 : childrenRect.height
|
||||
Repeater{
|
||||
id:repeater
|
||||
Item{
|
||||
|
|
|
@ -12,9 +12,9 @@ Popup{
|
|||
property int index : 0
|
||||
id:control
|
||||
padding: 0
|
||||
parent: Overlay.overlay
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
anchors.centerIn: Overlay.overlay
|
||||
width: d.windowWidth
|
||||
height: d.windowHeight
|
||||
background: Item{}
|
||||
contentItem: Item{}
|
||||
onVisibleChanged: {
|
||||
|
@ -50,6 +50,16 @@ Popup{
|
|||
Item{
|
||||
id:d
|
||||
property var window: Window.window
|
||||
property int windowWidth: {
|
||||
if(d.window)
|
||||
return d.window.width
|
||||
return 0
|
||||
}
|
||||
property int windowHeight: {
|
||||
if(d.window)
|
||||
return d.window.height
|
||||
return 0
|
||||
}
|
||||
property point pos: Qt.point(0,0)
|
||||
property var step : steps[index]
|
||||
property var target : step.target()
|
||||
|
@ -115,10 +125,10 @@ Popup{
|
|||
return 1
|
||||
return 0
|
||||
}
|
||||
x: Math.min(Math.max(0,d.pos.x+d.target.width/2-width/2),control.width-width)
|
||||
x: Math.min(Math.max(0,d.pos.x+d.target.width/2-width/2),d.windowWidth-width)
|
||||
y:{
|
||||
var ty=d.pos.y+d.target.height+control.targetMargins + 15
|
||||
if((ty+height)>control.height)
|
||||
if((ty+height)>d.windowHeight)
|
||||
return d.pos.y-height-control.targetMargins - 15
|
||||
return ty
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ Item{
|
|||
color: control.lineColor
|
||||
height: parent.height
|
||||
width: 2
|
||||
visible: repeater.count!==0
|
||||
state: d.stateName
|
||||
states: [
|
||||
State {
|
||||
|
@ -111,7 +110,6 @@ Item{
|
|||
id:layout_column
|
||||
spacing: 30
|
||||
width: control.width
|
||||
height: repeater.count === 0 ? 1 : childrenRect.height
|
||||
Repeater{
|
||||
id:repeater
|
||||
Item{
|
||||
|
|
|
@ -12,9 +12,9 @@ Popup{
|
|||
property int index : 0
|
||||
id:control
|
||||
padding: 0
|
||||
parent: Overlay.overlay
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
anchors.centerIn: Overlay.overlay
|
||||
width: d.window?.width
|
||||
height: d.window?.height
|
||||
background: Item{}
|
||||
contentItem: Item{}
|
||||
onVisibleChanged: {
|
||||
|
@ -50,7 +50,7 @@ Popup{
|
|||
Item{
|
||||
id:d
|
||||
property var window: Window.window
|
||||
property point pos: Qt.point(0,0)
|
||||
property var pos:Qt.point(0,0)
|
||||
property var step : steps[index]
|
||||
property var target : step.target()
|
||||
}
|
||||
|
@ -85,8 +85,7 @@ Popup{
|
|||
ctx.fillRect(0, 0, canvasSize.width, canvasSize.height)
|
||||
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)
|
||||
drawRoundedRect(rect,2,ctx)
|
||||
drawRoundedRect(Qt.rect(d.pos.x-control.targetMargins,d.pos.y-control.targetMargins, d.target.width+control.targetMargins*2, d.target.height+control.targetMargins*2),2,ctx)
|
||||
ctx.restore()
|
||||
}
|
||||
function drawRoundedRect(rect, r, ctx) {
|
||||
|
@ -110,17 +109,11 @@ Popup{
|
|||
width: 500
|
||||
height: 88 + text_desc.height
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
property int dir : {
|
||||
if(y<d.pos.y)
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
x: Math.min(Math.max(0,d.pos.x+d.target.width/2-width/2),control.width-width)
|
||||
y:{
|
||||
property int dir : (y<d.pos.y)?1:0
|
||||
x: Math.min(Math.max(0,d.pos.x+d.target.width/2-width/2),d.window?.width-width)
|
||||
y: {
|
||||
var ty=d.pos.y+d.target.height+control.targetMargins + 15
|
||||
if((ty+height)>control.height)
|
||||
return d.pos.y-height-control.targetMargins - 15
|
||||
return ty
|
||||
return ((ty+height)>d.window?.height)?(d.pos.y-height-control.targetMargins - 15):ty
|
||||
}
|
||||
border.width: 0
|
||||
FluShadow{
|
||||
|
|
Loading…
Reference in New Issue