Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Feb 24, 2024
1 parent a02ee68 commit 84b3a36
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 1,373 deletions.
1 change: 0 additions & 1 deletion example/example.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
<file>qml/page/T_RatingControl.qml</file>
<file>qml/page/T_Rectangle.qml</file>
<file>qml/page/T_RemoteLoader.qml</file>
<file>qml/page/T_Screenshot.qml</file>
<file>qml/page/T_Settings.qml</file>
<file>qml/page/T_Slider.qml</file>
<file>qml/page/T_StatusLayout.qml</file>
Expand Down
6 changes: 0 additions & 6 deletions example/qml-Qt6/global/ItemsOriginal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,6 @@ FluObject{
url:"qrc:/example/qml/page/T_Timeline.qml"
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"Screenshot(Todo)"
menuDelegate: paneItemMenu
url:"qrc:/example/qml/page/T_Screenshot.qml"
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"Captcha"
menuDelegate: paneItemMenu
Expand Down
57 changes: 0 additions & 57 deletions example/qml-Qt6/page/T_Screenshot.qml

This file was deleted.

6 changes: 0 additions & 6 deletions example/qml/global/ItemsOriginal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,6 @@ FluObject{
url:"qrc:/example/qml/page/T_Timeline.qml"
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"Screenshot(Todo)"
menuDelegate: paneItemMenu
url:"qrc:/example/qml/page/T_Screenshot.qml"
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"Captcha"
menuDelegate: paneItemMenu
Expand Down
57 changes: 0 additions & 57 deletions example/qml/page/T_Screenshot.qml

This file was deleted.

10 changes: 0 additions & 10 deletions src/Def.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ Q_ENUM_NS(CacheMode)
QML_NAMED_ELEMENT(FluNetworkType)
}

namespace FluScreenshotType {
Q_NAMESPACE
enum CaptrueMode {
Pixmap = 0x0000,
File = 0x0001,
};
Q_ENUM_NS(CaptrueMode)
QML_NAMED_ELEMENT(FluScreenshotType)
}

namespace FluThemeType {
Q_NAMESPACE
enum DarkMode {
Expand Down
11 changes: 10 additions & 1 deletion src/FluFramelessHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void FluFramelessHelper::componentComplete(){
_realWidth = QQmlProperty(window,"_realWidth");
_appBarHeight = QQmlProperty(window,"_appBarHeight");
#ifdef Q_OS_WIN
window->setFlag(Qt::CustomizeWindowHint,true);
window->setFlags((window->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint);
_nativeEvent =new FramelessEventFilter(this);
qApp->installNativeEventFilter(_nativeEvent);
HWND hwnd = reinterpret_cast<HWND>(window->winId());
Expand All @@ -272,6 +272,15 @@ void FluFramelessHelper::componentComplete(){
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);
}
}
});
#else
window->setFlags((window->flags() & (~Qt::WindowMinMaxButtonsHint) & (~Qt::Dialog)) | Qt::FramelessWindowHint | Qt::Window);
#endif
Expand Down
5 changes: 0 additions & 5 deletions src/FluentUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "FluEventBus.h"
#include "FluTreeModel.h"
#include "FluViewModel.h"
#include "Screenshot.h"
#include "FluRectangle.h"
#include "FluNetwork.h"
#include "FluFramelessHelper.h"
Expand All @@ -32,8 +31,6 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterType<QRCode>(uri,major,minor,"QRCode");
qmlRegisterType<FluCaptcha>(uri,major,minor,"FluCaptcha");
qmlRegisterType<FluWatermark>(uri,major,minor,"FluWatermark");
qmlRegisterType<ScreenshotBackground>(uri,major,minor,"ScreenshotBackground");
qmlRegisterType<Screenshot>(uri,major,minor,"Screenshot");
qmlRegisterType<FluColorSet>(uri,major,minor,"FluColorSet");
qmlRegisterType<FluEvent>(uri,major,minor,"FluEvent");
qmlRegisterType<FluViewModel>(uri,major,minor,"FluViewModel");
Expand Down Expand Up @@ -107,7 +104,6 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRadioButtons.qml"),uri,major,minor,"FluRadioButtons");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRatingControl.qml"),uri,major,minor,"FluRatingControl");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRemoteLoader.qml"),uri,major,minor,"FluRemoteLoader");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluScreenshot.qml"),uri,major,minor,"FluScreenshot");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluScrollBar.qml"),uri,major,minor,"FluScrollBar");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluScrollIndicator.qml"),uri,major,minor,"FluScrollIndicator");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluScrollablePage.qml"),uri,major,minor,"FluScrollablePage");
Expand Down Expand Up @@ -151,7 +147,6 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterUncreatableMetaObject(FluTabViewType::staticMetaObject, uri,major,minor,"FluTabViewType", "Access to enums & flags only");
qmlRegisterUncreatableMetaObject(FluNavigationViewType::staticMetaObject, uri,major,minor,"FluNavigationViewType", "Access to enums & flags only");
qmlRegisterUncreatableMetaObject(FluTimelineType::staticMetaObject, uri,major,minor,"FluTimelineType", "Access to enums & flags only");
qmlRegisterUncreatableMetaObject(FluScreenshotType::staticMetaObject, uri,major,minor,"FluScreenshotType", "Access to enums & flags only");
qmlRegisterUncreatableMetaObject(FluViewModelType::staticMetaObject, uri,major,minor,"FluViewModelType", "Access to enums & flags only");
qmlRegisterUncreatableMetaObject(FluNetworkType::staticMetaObject, uri,major,minor,"FluNetworkType", "Access to enums & flags only");

Expand Down
Loading

0 comments on commit 84b3a36

Please sign in to comment.