Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Apr 3, 2024
1 parent 18193a1 commit 84b2045
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions example/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ Q_IMPORT_QML_PLUGIN(FluentUIPlugin)

int main(int argc, char *argv[])
{
const char *uri = "example";
int major = 1;
int minor = 0;
#ifdef WIN32
// ::SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);
::SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);
qputenv("QT_QPA_PLATFORM","windows:darkmode=2");
#endif
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
Expand All @@ -54,8 +57,8 @@ int main(int argc, char *argv[])
QGuiApplication::setApplicationVersion(APPLICATION_VERSION);
QGuiApplication::setQuitOnLastWindowClosed(false);
SettingsHelper::getInstance()->init(argv);
Log::setup(argv,"example");
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
Log::setup(argv,uri);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
#endif
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
Expand All @@ -66,9 +69,6 @@ int main(int argc, char *argv[])
#endif
#endif
QGuiApplication app(argc, argv);
const char *uri = "example";
int major = 1;
int minor = 0;
//@uri example
qmlRegisterType<CircularReveal>(uri, major, minor, "CircularReveal");
qmlRegisterType<FileWatcher>(uri, major, minor, "FileWatcher");
Expand Down
4 changes: 2 additions & 2 deletions src/Qt5/imports/FluentUI/Controls/FluTextBoxBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ FluControlBackground{
border.width: 1
gradient: Gradient {
GradientStop { position: 0.0; color: d.startColor }
GradientStop { position: d.position; color: d.startColor }
GradientStop { position: 1 - 3/control.height; color: d.startColor }
GradientStop { position: 1 - 2/control.height; color: d.startColor }
GradientStop { position: 1.0; color: d.endColor }
}
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
QtObject{
id:d
property real position: 1 - 3/control.height
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
property color endColor: {
if(!control.enabled){
Expand Down
4 changes: 2 additions & 2 deletions src/Qt6/imports/FluentUI/Controls/FluTextBoxBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ FluControlBackground{
border.width: 1
gradient: Gradient {
GradientStop { position: 0.0; color: d.startColor }
GradientStop { position: d.position; color: d.startColor }
GradientStop { position: 1 - 3/control.height; color: d.startColor }
GradientStop { position: 1 - 2/control.height; color: d.startColor }
GradientStop { position: 1.0; color: d.endColor }
}
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
QtObject{
id:d
property real position: 1 - 3/control.height
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
property color endColor: {
if(!control.enabled){
Expand Down

0 comments on commit 84b2045

Please sign in to comment.