Compare commits

...

4 Commits

8 changed files with 62 additions and 18 deletions

View File

@ -442,9 +442,14 @@ Popup {
Repeater{
model: control.pageModel
Loader {
required property var modelData
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem
source: typeof(modelData.sourceUrl) !== 'undefined' && modelData.sourceUrl !== ""? modelData.sourceUrl : ""
sourceComponent: typeof(control.pageModel[modelData.globalIndex].sourceComponent) !== 'undefined' && typeof(modelData.sourceUrl) === 'undefined' ? control.pageModel[modelData.globalIndex].sourceComponent : undefined
Component.onCompleted: {
content_view.currentIndex = modelData.globalIndex
content_view.currentIndex = 0
}
onLoaded: {
if (typeof(modelData.sourceArgs) === 'undefined')
return

View File

@ -12,6 +12,7 @@ BusyIndicator {
implicitContentHeight + topPadding + bottomPadding)
padding: 2
property color color: RibbonTheme.isDarkMode ? "white" : "black"
property real barWidth: 200
property real barHeight: 4
property real indicatorWidth: 4
@ -44,7 +45,7 @@ BusyIndicator {
delegate: Rectangle {
width: indicatorWidth
height: indicatorHeight
color: RibbonTheme.isDarkMode ? "white" : "black"
color: control.color
x: -(index + 1) * indicatorWidth
y: (barHeight.height / 2 - height / 2)
radius: Math.min(width,height)/2

View File

@ -18,6 +18,7 @@ BusyIndicator {
property real default_saturation: 0
property int animationDuration: RibbonTheme.modernStyle ? 4000 : 1000
property bool clockwise: true
property bool reverseColor: false
onAnimationDurationChanged: {
running = !running
@ -52,7 +53,11 @@ BusyIndicator {
width: radiusWidth
height: ringWidth
property real item_saturation: (index + item.dynamic_index) % lineNumber * private_property.saturation + default_saturation
color: Qt.hsla(0, 0, RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? 1 : 0 : item_saturation, 1)
color: Qt.hsla(0, 0,
RibbonTheme.modernStyle ?
(control.reverseColor ? (RibbonTheme.isDarkMode ? 0 : 1) : (RibbonTheme.isDarkMode ? 1 : 0)) :
(control.reverseColor ? 1 - item_saturation : item_saturation),
1)
rotation: index * private_property.angle
x: (parent.width / 2) - (radiusLength - ringWidth) * Math.sin(rotation/180 * Math.PI)
y: (parent.height / 2 - height / 2) + (radiusLength - ringWidth) * Math.cos(rotation/180 * Math.PI)

View File

@ -4,7 +4,7 @@ import QtQuick.Layouts 1.11
import QtQuick.Controls 2.15
import QtQuick.Window 2.15
RibbonRectangle {
Rectangle {
id: control
property var dealWithLog: showLog
@ -15,7 +15,14 @@ RibbonRectangle {
color: {
if (Window.window.blurBehindWindow) {
return "transparent"
if(RibbonTheme.modernStyle)
return "transparent"
else{
if(RibbonTheme.isDarkMode)
return "#282828"
else
return "#2C59B7"
}
}
if (RibbonTheme.isDarkMode) {
return '#2C2B29'
@ -24,7 +31,7 @@ RibbonRectangle {
}
implicitHeight: Math.max(250, btn_layout.height + title_layout.height + log_text.height + btn_layout.anchors.topMargin * 2)
implicitWidth: Math.max(450, title_layout.width + btn_layout.anchors.topMargin * 2)
radius: 20
radius: Qt.platform.os === 'windows' ? RibbonUI.isWin11 ? 7 : 0 : 10
Behavior on color {
ColorAnimation {
@ -45,12 +52,14 @@ RibbonRectangle {
leftMargin: Qt.platform.os === 'osx' ? anchors.topMargin : undefined
}
RibbonButton{
textColor: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
showBg: false
showHoveredBg: false
iconSource: RibbonIcons.Subtract
onClicked: Window.window.visibility = Window.Minimized
}
RibbonButton{
textColor: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
showBg: false
showHoveredBg: false
iconSource: RibbonIcons.Dismiss
@ -83,7 +92,7 @@ RibbonRectangle {
Layout.alignment: Qt.AlignVCenter
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 16
color: RibbonTheme.isDarkMode ? "white" : "black"
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {
@ -104,7 +113,8 @@ RibbonRectangle {
Layout.alignment: Qt.AlignHCenter
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 50
color: RibbonTheme.isDarkMode ? "white" : "black"
font.bold: true
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {
@ -120,7 +130,7 @@ RibbonRectangle {
Layout.alignment: Qt.AlignHCenter
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 15
color: RibbonTheme.isDarkMode ? "white" : "black"
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {
@ -133,6 +143,7 @@ RibbonRectangle {
RibbonBusyBar{
Layout.topMargin: btn_layout.anchors.topMargin - title_layout.spacing
running: true
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
barWidth: control.width - btn_layout.anchors.topMargin * 4
}
}
@ -148,7 +159,7 @@ RibbonRectangle {
text: qsTr("Loading...")
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 10
color: RibbonTheme.isDarkMode ? "white" : "black"
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {

View File

@ -442,9 +442,14 @@ Popup {
Repeater{
model: control.pageModel
Loader {
required property var modelData
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem
source: typeof(modelData.sourceUrl) !== 'undefined' && modelData.sourceUrl !== ""? modelData.sourceUrl : ""
sourceComponent: typeof(control.pageModel[modelData.globalIndex].sourceComponent) !== 'undefined' && typeof(modelData.sourceUrl) === 'undefined' ? control.pageModel[modelData.globalIndex].sourceComponent : undefined
Component.onCompleted: {
content_view.currentIndex = modelData.globalIndex
content_view.currentIndex = 0
}
onLoaded: {
if (typeof(modelData.sourceArgs) === 'undefined')
return

View File

@ -12,6 +12,7 @@ BusyIndicator {
implicitContentHeight + topPadding + bottomPadding)
padding: 2
property color color: RibbonTheme.isDarkMode ? "white" : "black"
property real barWidth: 200
property real barHeight: 4
property real indicatorWidth: 4
@ -44,7 +45,7 @@ BusyIndicator {
delegate: Rectangle {
width: indicatorWidth
height: indicatorHeight
color: RibbonTheme.isDarkMode ? "white" : "black"
color: control.color
x: -(index + 1) * indicatorWidth
y: (barHeight.height / 2 - height / 2)
radius: Math.min(width,height)/2

View File

@ -18,6 +18,7 @@ BusyIndicator {
property real default_saturation: 0
property int animationDuration: RibbonTheme.modernStyle ? 4000 : 1000
property bool clockwise: true
property bool reverseColor: false
onAnimationDurationChanged: {
running = !running
@ -52,7 +53,11 @@ BusyIndicator {
width: radiusWidth
height: ringWidth
property real item_saturation: (index + item.dynamic_index) % lineNumber * private_property.saturation + default_saturation
color: Qt.hsla(0, 0, RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? 1 : 0 : item_saturation, 1)
color: Qt.hsla(0, 0,
RibbonTheme.modernStyle ?
(control.reverseColor ? (RibbonTheme.isDarkMode ? 0 : 1) : (RibbonTheme.isDarkMode ? 1 : 0)) :
(control.reverseColor ? 1 - item_saturation : item_saturation),
1)
rotation: index * private_property.angle
x: (parent.width / 2) - (radiusLength - ringWidth) * Math.sin(rotation/180 * Math.PI)
y: (parent.height / 2 - height / 2) + (radiusLength - ringWidth) * Math.cos(rotation/180 * Math.PI)

View File

@ -4,7 +4,7 @@ import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Window
RibbonRectangle {
Rectangle {
id: control
property var dealWithLog: showLog
@ -15,7 +15,14 @@ RibbonRectangle {
color: {
if (Window.window.blurBehindWindow) {
return "transparent"
if(RibbonTheme.modernStyle)
return "transparent"
else{
if(RibbonTheme.isDarkMode)
return "#282828"
else
return "#2C59B7"
}
}
if (RibbonTheme.isDarkMode) {
return '#2C2B29'
@ -24,7 +31,7 @@ RibbonRectangle {
}
implicitHeight: Math.max(250, btn_layout.height + title_layout.height + log_text.height + btn_layout.anchors.topMargin * 2)
implicitWidth: Math.max(450, title_layout.width + btn_layout.anchors.topMargin * 2)
radius: 20
radius: Qt.platform.os === 'windows' ? RibbonUI.isWin11 ? 7 : 0 : 10
Behavior on color {
ColorAnimation {
@ -45,12 +52,14 @@ RibbonRectangle {
leftMargin: Qt.platform.os === 'osx' ? anchors.topMargin : undefined
}
RibbonButton{
textColor: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
showBg: false
showHoveredBg: false
iconSource: RibbonIcons.Subtract
onClicked: Window.window.visibility = Window.Minimized
}
RibbonButton{
textColor: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
showBg: false
showHoveredBg: false
iconSource: RibbonIcons.Dismiss
@ -83,7 +92,7 @@ RibbonRectangle {
Layout.alignment: Qt.AlignVCenter
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 16
color: RibbonTheme.isDarkMode ? "white" : "black"
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {
@ -104,7 +113,8 @@ RibbonRectangle {
Layout.alignment: Qt.AlignHCenter
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 50
color: RibbonTheme.isDarkMode ? "white" : "black"
font.bold: true
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {
@ -120,7 +130,7 @@ RibbonRectangle {
Layout.alignment: Qt.AlignHCenter
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 15
color: RibbonTheme.isDarkMode ? "white" : "black"
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {
@ -133,6 +143,7 @@ RibbonRectangle {
RibbonBusyBar{
Layout.topMargin: btn_layout.anchors.topMargin - title_layout.spacing
running: true
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
barWidth: control.width - btn_layout.anchors.topMargin * 4
}
}
@ -148,7 +159,7 @@ RibbonRectangle {
text: qsTr("Loading...")
font.family: Qt.platform.os === "osx" ? "PingFang SC" : "Microsoft YaHei UI"
font.pixelSize: 10
color: RibbonTheme.isDarkMode ? "white" : "black"
color: RibbonTheme.modernStyle ? RibbonTheme.isDarkMode ? "white" : "black" : "white"
renderType: RibbonTheme.nativeText ? Text.NativeRendering : Text.QtRendering
visible: text
Behavior on color {