update
parent
88b15b92ea
commit
f4cebb5c14
|
@ -66,7 +66,7 @@ jobs:
|
||||||
- name: package
|
- name: package
|
||||||
id: package
|
id: package
|
||||||
env:
|
env:
|
||||||
archiveName: ${{ matrix.qt_ver }}-${{ env.fileName }}-${{ matrix.qt_arch }}
|
archiveName: ${{ env.fileName }}-${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
||||||
|
|
|
@ -67,7 +67,7 @@ jobs:
|
||||||
- name: package
|
- name: package
|
||||||
id: package
|
id: package
|
||||||
env:
|
env:
|
||||||
archiveName: ${{ matrix.qt_ver }}-${{ env.fileName }}-${{ matrix.qt_arch }}
|
archiveName: ${{ env.fileName }}-${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
||||||
msvcArch: ${{ matrix.msvc_arch }}
|
msvcArch: ${{ matrix.msvc_arch }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QQuickWindow>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
|
||||||
QMap<QString, QVariant> properties(){
|
QMap<QString, QVariant> properties(){
|
||||||
|
@ -16,6 +17,7 @@ int main(int argc, char *argv[])
|
||||||
QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io");
|
||||||
QCoreApplication::setApplicationName("FluentUI");
|
QCoreApplication::setApplicationName("FluentUI");
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
|
||||||
QGuiApplication app(argc, argv);
|
QGuiApplication app(argc, argv);
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
QMapIterator<QString, QVariant> iterator(properties());
|
QMapIterator<QString, QVariant> iterator(properties());
|
||||||
|
|
|
@ -16,6 +16,7 @@ public:
|
||||||
|
|
||||||
FramelessView::FramelessView(QWindow *parent) : Super(parent), d(new FramelessViewPrivate)
|
FramelessView::FramelessView(QWindow *parent) : Super(parent), d(new FramelessViewPrivate)
|
||||||
{
|
{
|
||||||
|
setResizeMode(SizeRootObjectToView);
|
||||||
refreshWindow();
|
refreshWindow();
|
||||||
setIsMax(windowState() == Qt::WindowMaximized);
|
setIsMax(windowState() == Qt::WindowMaximized);
|
||||||
setIsFull(windowState() == Qt::WindowFullScreen);
|
setIsFull(windowState() == Qt::WindowFullScreen);
|
||||||
|
@ -35,8 +36,6 @@ void FramelessView::refreshWindow(){
|
||||||
}else{
|
}else{
|
||||||
setFlags(Qt::Window);
|
setFlags(Qt::Window);
|
||||||
}
|
}
|
||||||
setResizeMode(SizeViewToRootObject);
|
|
||||||
setResizeMode(SizeRootObjectToView);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FramelessView::~FramelessView()
|
FramelessView::~FramelessView()
|
||||||
|
@ -123,6 +122,17 @@ bool FramelessView::nativeEvent(const QByteArray &eventType, void *message, qint
|
||||||
bool FramelessView::nativeEvent(const QByteArray &eventType, void *message, long *result)
|
bool FramelessView::nativeEvent(const QByteArray &eventType, void *message, long *result)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
MSG* msg = static_cast<MSG*>(message);
|
||||||
|
if (msg->message == WM_WINDOWPOSCHANGING)
|
||||||
|
{
|
||||||
|
WINDOWPOS* wp = reinterpret_cast<WINDOWPOS*>(msg->lParam);
|
||||||
|
if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0)
|
||||||
|
{
|
||||||
|
wp->flags |= SWP_NOCOPYBITS;
|
||||||
|
*result = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return Super::nativeEvent(eventType, message, result);
|
return Super::nativeEvent(eventType, message, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,17 @@ Item {
|
||||||
property color borderNormalColor: FluTheme.isDark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1)
|
property color borderNormalColor: FluTheme.isDark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1)
|
||||||
property color borderCheckedColor: FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
property color borderCheckedColor: FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||||
property color borderHoverColor: FluTheme.isDark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
|
property color borderHoverColor: FluTheme.isDark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
|
||||||
|
property color borderDisableColor: FluTheme.isDark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||||
|
|
||||||
property color normalColor: FluTheme.isDark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
property color normalColor: FluTheme.isDark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||||
property color checkedColor: FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
property color checkedColor: FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||||
property color hoverColor: FluTheme.isDark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
property color hoverColor: FluTheme.isDark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||||
|
|
||||||
property color checkedHoverColor: FluTheme.isDark ? Qt.darker(checkedColor,1.1) : Qt.lighter(checkedColor,1.1)
|
property color checkedHoverColor: FluTheme.isDark ? Qt.darker(checkedColor,1.1) : Qt.lighter(checkedColor,1.1)
|
||||||
|
|
||||||
|
property color checkedDisableColor: FluTheme.isDark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||||
|
|
||||||
|
property color disableColor: FluTheme.isDark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
|
||||||
|
|
||||||
RowLayout{
|
RowLayout{
|
||||||
spacing: 4
|
spacing: 4
|
||||||
Rectangle{
|
Rectangle{
|
||||||
|
@ -33,6 +36,9 @@ Item {
|
||||||
height: 22
|
height: 22
|
||||||
radius: 4
|
radius: 4
|
||||||
border.color: {
|
border.color: {
|
||||||
|
if(disabled){
|
||||||
|
return borderDisableColor
|
||||||
|
}
|
||||||
if(checked){
|
if(checked){
|
||||||
return borderCheckedColor
|
return borderCheckedColor
|
||||||
}
|
}
|
||||||
|
@ -44,6 +50,9 @@ Item {
|
||||||
border.width: 1
|
border.width: 1
|
||||||
color: {
|
color: {
|
||||||
if(checked){
|
if(checked){
|
||||||
|
if(disabled){
|
||||||
|
return checkedDisableColor
|
||||||
|
}
|
||||||
if(hovered){
|
if(hovered){
|
||||||
return checkedHoverColor
|
return checkedHoverColor
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue