Compare commits
No commits in common. "736c19c41ed9dc5443688a27fd18909b25901671" and "ec9a9a507495cddaf04d4c19f9356ea1298f29d6" have entirely different histories.
736c19c41e
...
ec9a9a5074
|
@ -68,12 +68,7 @@ FluScrollablePage{
|
||||||
id: control
|
id: control
|
||||||
width: 220
|
width: 220
|
||||||
height: 240
|
height: 240
|
||||||
FluShadow{
|
|
||||||
radius:8
|
|
||||||
anchors.fill: item_content
|
|
||||||
}
|
|
||||||
FluItem{
|
FluItem{
|
||||||
id:item_content
|
|
||||||
radius: [8,8,8,8]
|
radius: [8,8,8,8]
|
||||||
width: 200
|
width: 200
|
||||||
height: 220
|
height: 220
|
||||||
|
|
|
@ -27,7 +27,6 @@ FRAMELESSHELPER_USE_NAMESPACE
|
||||||
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
||||||
#ifdef Q_OS_WIN // 此设置仅在Windows下生效
|
#ifdef Q_OS_WIN // 此设置仅在Windows下生效
|
||||||
FramelessConfig::instance()->set(Global::Option::ForceHideWindowFrameBorder);
|
FramelessConfig::instance()->set(Global::Option::ForceHideWindowFrameBorder);
|
||||||
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow,false);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur,false);
|
FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur,false);
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
Screenshot::Screenshot(QQuickItem* parent) : QQuickPaintedItem(parent)
|
Screenshot::Screenshot(QQuickItem* parent) : QQuickPaintedItem(parent)
|
||||||
{
|
{
|
||||||
maskColor(QColor(0,0,0,80));
|
|
||||||
start(QPoint(0,0));
|
start(QPoint(0,0));
|
||||||
end(QPoint(0,0));
|
end(QPoint(0,0));
|
||||||
_desktopGeometry = qApp->primaryScreen()->virtualGeometry();
|
_desktopGeometry = qApp->primaryScreen()->virtualGeometry();
|
||||||
|
@ -19,7 +18,7 @@ void Screenshot::paint(QPainter* painter)
|
||||||
painter->save();
|
painter->save();
|
||||||
painter->eraseRect(boundingRect());
|
painter->eraseRect(boundingRect());
|
||||||
painter->drawPixmap(_desktopGeometry,_desktopPixmap);
|
painter->drawPixmap(_desktopGeometry,_desktopPixmap);
|
||||||
painter->fillRect(_desktopGeometry,_maskColor);
|
painter->fillRect(_desktopGeometry,QColor(0,0,0,60));
|
||||||
painter->setCompositionMode(QPainter::CompositionMode_Clear);
|
painter->setCompositionMode(QPainter::CompositionMode_Clear);
|
||||||
painter->fillRect(QRect(_start.x(),_start.y(),_end.x()-_start.x(),_end.y()-_start.y()), Qt::black);
|
painter->fillRect(QRect(_start.x(),_start.y(),_end.x()-_start.x(),_end.y()-_start.y()), Qt::black);
|
||||||
painter->restore();
|
painter->restore();
|
||||||
|
|
|
@ -12,7 +12,6 @@ class Screenshot : public QQuickPaintedItem
|
||||||
QML_NAMED_ELEMENT(Screenshot)
|
QML_NAMED_ELEMENT(Screenshot)
|
||||||
Q_PROPERTY_AUTO(QPoint,start);
|
Q_PROPERTY_AUTO(QPoint,start);
|
||||||
Q_PROPERTY_AUTO(QPoint,end);
|
Q_PROPERTY_AUTO(QPoint,end);
|
||||||
Q_PROPERTY_AUTO(QColor,maskColor);
|
|
||||||
public:
|
public:
|
||||||
Screenshot(QQuickItem* parent = nullptr);
|
Screenshot(QQuickItem* parent = nullptr);
|
||||||
void paint(QPainter* painter) override;
|
void paint(QPainter* painter) override;
|
||||||
|
|
|
@ -36,7 +36,6 @@ TextArea{
|
||||||
return placeholderNormalColor
|
return placeholderNormalColor
|
||||||
}
|
}
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
width: background.implicitWidth
|
|
||||||
background: FluTextBoxBackground{
|
background: FluTextBoxBackground{
|
||||||
inputItem: control
|
inputItem: control
|
||||||
implicitWidth: 240
|
implicitWidth: 240
|
||||||
|
|
|
@ -5,26 +5,14 @@ import QtQuick.Layouts
|
||||||
import FluentUI
|
import FluentUI
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
property int dotSize: 5
|
|
||||||
property int borderSize: 1
|
|
||||||
property color borderColor: FluTheme.primaryColor.dark
|
|
||||||
QtObject{
|
|
||||||
id:d
|
|
||||||
property int dotMouseSize: control.dotSize+10
|
|
||||||
property int dotMargins: -(control.dotSize-control.borderSize)/2
|
|
||||||
property bool enablePosition: false
|
|
||||||
property int menuMargins: 6
|
|
||||||
}
|
|
||||||
id:control
|
id:control
|
||||||
Component{
|
Component{
|
||||||
id:com_screen
|
id:com_screen
|
||||||
Window{
|
Window{
|
||||||
id:window_screen
|
id:window_screen
|
||||||
flags: Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
|
flags: Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
|
||||||
x:-1
|
width: Screen.desktopAvailableWidth
|
||||||
y:-1
|
height: Screen.height
|
||||||
width: 1
|
|
||||||
height: 1
|
|
||||||
visible: true
|
visible: true
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
|
@ -32,41 +20,32 @@ Loader {
|
||||||
control.sourceComponent = undefined
|
control.sourceComponent = undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: {
|
|
||||||
setGeometry(0,0,Screen.desktopAvailableWidth,Screen.height)
|
|
||||||
}
|
|
||||||
Screenshot{
|
Screenshot{
|
||||||
id:screenshot
|
id:screenshot
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
MouseArea{
|
MouseArea{
|
||||||
|
property bool enablePosition: false
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.RightButton | Qt.LeftButton
|
acceptedButtons: Qt.RightButton | Qt.LeftButton
|
||||||
onPressed:
|
onPressed:
|
||||||
(mouse)=>{
|
(mouse)=>{
|
||||||
if(mouse.button === Qt.LeftButton){
|
if(mouse.button === Qt.LeftButton){
|
||||||
d.enablePosition = true
|
enablePosition = true
|
||||||
screenshot.start = Qt.point(mouse.x,mouse.y)
|
screenshot.start = Qt.point(mouse.x,mouse.y)
|
||||||
screenshot.end = Qt.point(mouse.x,mouse.y)
|
screenshot.end = Qt.point(mouse.x,mouse.y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onPositionChanged:
|
onPositionChanged:
|
||||||
(mouse)=>{
|
(mouse)=>{
|
||||||
if(d.enablePosition){
|
if(enablePosition){
|
||||||
screenshot.end = Qt.point(mouse.x,mouse.y)
|
screenshot.end = Qt.point(mouse.x,mouse.y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onReleased:
|
onReleased:
|
||||||
(mouse)=>{
|
(mouse)=>{
|
||||||
if(mouse.button === Qt.LeftButton){
|
if(mouse.button === Qt.LeftButton){
|
||||||
d.enablePosition = false
|
enablePosition = false
|
||||||
screenshot.end = Qt.point(mouse.x,mouse.y)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=>{
|
|
||||||
if(mouse.button === Qt.LeftButton){
|
|
||||||
d.enablePosition = false
|
|
||||||
screenshot.end = Qt.point(mouse.x,mouse.y)
|
screenshot.end = Qt.point(mouse.x,mouse.y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,8 +68,8 @@ Loader {
|
||||||
width: Math.abs(screenshot.end.x - screenshot.start.x)
|
width: Math.abs(screenshot.end.x - screenshot.start.x)
|
||||||
height: Math.abs(screenshot.end.y - screenshot.start.y)
|
height: Math.abs(screenshot.end.y - screenshot.start.y)
|
||||||
color:"#00000000"
|
color:"#00000000"
|
||||||
border.width: control.borderSize
|
border.width: 1
|
||||||
border.color: control.borderColor
|
border.color: FluTheme.primaryColor.dark
|
||||||
MouseArea{
|
MouseArea{
|
||||||
property point clickPos: Qt.point(0,0)
|
property point clickPos: Qt.point(0,0)
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -111,346 +90,6 @@ Loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle{
|
|
||||||
id:rect_top_left
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
left: rect_capture.left
|
|
||||||
leftMargin: d.dotMargins
|
|
||||||
topMargin: d.dotMargins
|
|
||||||
top: rect_capture.top
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeFDiagCursor
|
|
||||||
anchors.centerIn: rect_top_left
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.setOverrideCursor(cursorShape)
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x+w,y+h)
|
|
||||||
screenshot.end = Qt.point(x,y)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
screenshot.end = mapToItem(screenshot,Qt.point(mouse.x,mouse.y))
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
id:rect_top_center
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
horizontalCenter: rect_capture.horizontalCenter
|
|
||||||
topMargin: d.dotMargins
|
|
||||||
top: rect_capture.top
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeVerCursor
|
|
||||||
anchors.centerIn: rect_top_center
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.setOverrideCursor(cursorShape)
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x+w,y+h)
|
|
||||||
screenshot.end = Qt.point(x,y)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
screenshot.end = Qt.point(x,mapToItem(screenshot,Qt.point(mouse.x,mouse.y)).y)
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
id:rect_top_right
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
right: rect_capture.right
|
|
||||||
rightMargin: d.dotMargins
|
|
||||||
topMargin: d.dotMargins
|
|
||||||
top: rect_capture.top
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeBDiagCursor
|
|
||||||
anchors.centerIn: rect_top_right
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x,y+h)
|
|
||||||
screenshot.end = Qt.point(x+w,y)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
screenshot.end = mapToItem(screenshot,Qt.point(mouse.x,mouse.y))
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
id:rect_right_center
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
right: rect_capture.right
|
|
||||||
rightMargin: d.dotMargins
|
|
||||||
verticalCenter: rect_capture.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeHorCursor
|
|
||||||
anchors.centerIn: rect_right_center
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x,y)
|
|
||||||
screenshot.end = Qt.point(x+w,y+h)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
var y = rect_capture.y
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.end = Qt.point(mapToItem(screenshot,Qt.point(mouse.x,mouse.y)).x,y+h)
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
id:rect_right_bottom
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
right: rect_capture.right
|
|
||||||
rightMargin: d.dotMargins
|
|
||||||
bottom: rect_capture.bottom
|
|
||||||
bottomMargin: d.dotMargins
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeFDiagCursor
|
|
||||||
anchors.centerIn: rect_right_bottom
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x,y)
|
|
||||||
screenshot.end = Qt.point(x+w,y+h)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
screenshot.end = mapToItem(screenshot,Qt.point(mouse.x,mouse.y))
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
id:rect_bottom_center
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
horizontalCenter: rect_capture.horizontalCenter
|
|
||||||
bottom: rect_capture.bottom
|
|
||||||
bottomMargin: d.dotMargins
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeVerCursor
|
|
||||||
anchors.centerIn: rect_bottom_center
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x,y)
|
|
||||||
screenshot.end = Qt.point(x+w,y+h)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
var w = rect_capture.width
|
|
||||||
screenshot.end = Qt.point(x+w,mapToItem(screenshot,Qt.point(mouse.x,mouse.y)).y)
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
id:rect_bottom_left
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
left: rect_capture.left
|
|
||||||
leftMargin: d.dotMargins
|
|
||||||
bottom: rect_capture.bottom
|
|
||||||
bottomMargin: d.dotMargins
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeBDiagCursor
|
|
||||||
anchors.centerIn: rect_bottom_left
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x+w,y)
|
|
||||||
screenshot.end = Qt.point(x,y+h)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
screenshot.end = mapToItem(screenshot,Qt.point(mouse.x,mouse.y))
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
id:rect_left_center
|
|
||||||
width: control.dotSize
|
|
||||||
height: control.dotSize
|
|
||||||
color: control.borderColor
|
|
||||||
anchors{
|
|
||||||
left: rect_capture.left
|
|
||||||
leftMargin: d.dotMargins
|
|
||||||
verticalCenter: rect_capture.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MouseArea{
|
|
||||||
cursorShape: Qt.SizeHorCursor
|
|
||||||
anchors.centerIn: rect_left_center
|
|
||||||
width: d.dotMouseSize
|
|
||||||
height: d.dotMouseSize
|
|
||||||
onPressed:
|
|
||||||
(mouse)=> {
|
|
||||||
var x = rect_capture.x
|
|
||||||
var y = rect_capture.y
|
|
||||||
var w = rect_capture.width
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.start = Qt.point(x+w,y)
|
|
||||||
screenshot.end = Qt.point(x,y+h)
|
|
||||||
}
|
|
||||||
onReleased:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
onPositionChanged:
|
|
||||||
(mouse)=> {
|
|
||||||
var y = rect_capture.y
|
|
||||||
var h = rect_capture.height
|
|
||||||
screenshot.end = Qt.point(mapToItem(screenshot,Qt.point(mouse.x,mouse.y)).x,y+h)
|
|
||||||
}
|
|
||||||
onCanceled:
|
|
||||||
(mouse)=> {
|
|
||||||
FluTools.restoreOverrideCursor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Rectangle{
|
|
||||||
width: 100
|
|
||||||
height: 40
|
|
||||||
visible: {
|
|
||||||
if(screenshot.start === Qt.point(0,0) && screenshot.end === Qt.point(0,0)){
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if(d.enablePosition){
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
x:rect_capture.x + rect_capture.width - width
|
|
||||||
y:{
|
|
||||||
if(rect_capture.y + rect_capture.height + d.menuMargins < screenshot.height-height){
|
|
||||||
return rect_capture.y + rect_capture.height + d.menuMargins
|
|
||||||
}else if(rect_capture.y - height - d.menuMargins > 0){
|
|
||||||
return rect_capture.y - height - d.menuMargins
|
|
||||||
}else{
|
|
||||||
screenshot.height - height - d.menuMargins
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import FluentUI
|
||||||
Item{
|
Item{
|
||||||
property int mode: FluTimelineType.Left
|
property int mode: FluTimelineType.Left
|
||||||
property alias model: repeater.model
|
property alias model: repeater.model
|
||||||
property color lineColor: FluTheme.dark ? Qt.rgba(80/255,80/255,80/255,1) : Qt.rgba(210/255,210/255,210/255,1)
|
property color lineColor: Qt.rgba(240/255,240/255,240/255,1)
|
||||||
id:control
|
id:control
|
||||||
implicitWidth: 380
|
implicitWidth: 380
|
||||||
implicitHeight: layout_column.height
|
implicitHeight: layout_column.height
|
||||||
|
|
|
@ -12,9 +12,9 @@ Window {
|
||||||
property Component loadingItem: com_loading
|
property Component loadingItem: com_loading
|
||||||
property color backgroundColor: {
|
property color backgroundColor: {
|
||||||
if(active){
|
if(active){
|
||||||
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(238/255,244/255,249/255,1)
|
||||||
}
|
}
|
||||||
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(237/255,237/255,237/255,1)
|
return FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||||
}
|
}
|
||||||
property var _pageRegister
|
property var _pageRegister
|
||||||
property string _route
|
property string _route
|
||||||
|
|
Loading…
Reference in New Issue