Compare commits
No commits in common. "e30db258cadfff1ade085888d3355069536084b9" and "db74f71e820c08483133459b5f9df73b6a178e40" have entirely different histories.
e30db258ca
...
db74f71e82
|
@ -5,9 +5,8 @@
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#define APPLICATION_FULL_VERSION "${GIT_SEMVER}.${GIT_COMMIT_COUNT}"
|
#define APPLICATION_VERSION "${GIT_SEMVER}.${GIT_COMMIT_COUNT}"
|
||||||
#define VERSION_COUNTER ${GIT_COMMIT_COUNT}
|
#define VERSION_COUNTER ${GIT_COMMIT_COUNT}
|
||||||
#define COMMIT_HASH "${GIT_DESCRIBE}"
|
#define COMMIT_HASH "${GIT_DESCRIBE}"
|
||||||
#define APPLICATION_VERSION "${GIT_SEMVER}"
|
|
||||||
|
|
||||||
#endif // VERSION_H
|
#endif // VERSION_H
|
||||||
|
|
|
@ -28,7 +28,6 @@ CustomWindow {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
FluTools.setQuitOnLastWindowClosed(false)
|
FluTools.setQuitOnLastWindowClosed(false)
|
||||||
tour.open()
|
tour.open()
|
||||||
checkUpdate()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemTrayIcon {
|
SystemTrayIcon {
|
||||||
|
@ -278,46 +277,4 @@ CustomWindow {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
FluHttp{
|
|
||||||
id:http
|
|
||||||
}
|
|
||||||
|
|
||||||
FluContentDialog{
|
|
||||||
property string newVerson
|
|
||||||
property string body
|
|
||||||
id:dialog_update
|
|
||||||
title:"升级提示"
|
|
||||||
message:"FluentUI目前最新版本 "+ newVerson +" -- 当前应用版本 "+appInfo.version+" \n现在是否去下载新版本?\n\n更新内容:\n"+body
|
|
||||||
buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
|
||||||
negativeText: "取消"
|
|
||||||
positiveText:"确定"
|
|
||||||
onPositiveClicked:{
|
|
||||||
Qt.openUrlExternally("https://github.com/zhuzichu520/FluentUI/releases/latest")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkUpdate(){
|
|
||||||
var callable = {}
|
|
||||||
callable.onStart = function(){
|
|
||||||
console.debug("satrt check update...")
|
|
||||||
}
|
|
||||||
callable.onFinish = function(){
|
|
||||||
console.debug("check update finish")
|
|
||||||
}
|
|
||||||
callable.onSuccess = function(result){
|
|
||||||
var data = JSON.parse(result)
|
|
||||||
console.debug("current version "+appInfo.version)
|
|
||||||
console.debug("new version "+data.tag_name)
|
|
||||||
if(data.tag_name !== appInfo.version){
|
|
||||||
dialog_update.newVerson = data.tag_name
|
|
||||||
dialog_update.body = data.body
|
|
||||||
dialog_update.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
callable.onError = function(status,errorString){
|
|
||||||
console.debug(status+";"+errorString)
|
|
||||||
}
|
|
||||||
http.get("https://api.github.com/repos/zhuzichu520/FluentUI/releases/latest",callable)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ CustomWindow {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
FluTools.setQuitOnLastWindowClosed(false)
|
FluTools.setQuitOnLastWindowClosed(false)
|
||||||
tour.open()
|
tour.open()
|
||||||
checkUpdate()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemTrayIcon {
|
SystemTrayIcon {
|
||||||
|
@ -279,46 +278,4 @@ CustomWindow {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
FluHttp{
|
|
||||||
id:http
|
|
||||||
}
|
|
||||||
|
|
||||||
FluContentDialog{
|
|
||||||
property string newVerson
|
|
||||||
property string body
|
|
||||||
id:dialog_update
|
|
||||||
title:"升级提示"
|
|
||||||
message:"FluentUI目前最新版本 "+ newVerson +" -- 当前应用版本 "+appInfo.version+" \n现在是否去下载新版本?\n\n更新内容:\n"+body
|
|
||||||
buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
|
||||||
negativeText: "取消"
|
|
||||||
positiveText:"确定"
|
|
||||||
onPositiveClicked:{
|
|
||||||
Qt.openUrlExternally("https://github.com/zhuzichu520/FluentUI/releases/latest")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkUpdate(){
|
|
||||||
var callable = {}
|
|
||||||
callable.onStart = function(){
|
|
||||||
console.debug("satrt check update...")
|
|
||||||
}
|
|
||||||
callable.onFinish = function(){
|
|
||||||
console.debug("check update finish")
|
|
||||||
}
|
|
||||||
callable.onSuccess = function(result){
|
|
||||||
var data = JSON.parse(result)
|
|
||||||
console.debug("current version "+appInfo.version)
|
|
||||||
console.debug("new version "+data.tag_name)
|
|
||||||
if(data.tag_name !== appInfo.version){
|
|
||||||
dialog_update.newVerson = data.tag_name
|
|
||||||
dialog_update.body = data.body
|
|
||||||
dialog_update.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
callable.onError = function(status,errorString){
|
|
||||||
console.debug(status+";"+errorString)
|
|
||||||
}
|
|
||||||
http.get("https://api.github.com/repos/zhuzichu520/FluentUI/releases/latest",callable)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ FluPopup {
|
||||||
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||||||
focus: true
|
focus: true
|
||||||
implicitWidth: 400
|
implicitWidth: 400
|
||||||
implicitHeight: text_title.height + sroll_message.height + layout_actions.height
|
implicitHeight: text_title.height + text_message.height + layout_actions.height
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id:layout_content
|
id:layout_content
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -38,41 +38,28 @@ FluPopup {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluText{
|
||||||
Flickable{
|
id:text_message
|
||||||
id:sroll_message
|
font: FluTextStyle.Body
|
||||||
contentWidth: width
|
wrapMode: Text.WrapAnywhere
|
||||||
|
text:message
|
||||||
|
topPadding: 14
|
||||||
|
leftPadding: 20
|
||||||
|
rightPadding: 20
|
||||||
|
bottomPadding: 14
|
||||||
anchors{
|
anchors{
|
||||||
top:text_title.bottom
|
top:text_title.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
contentHeight: text_message.height
|
|
||||||
clip: true
|
|
||||||
height: Math.min(text_message.height,300)
|
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
|
||||||
|
|
||||||
FluText{
|
|
||||||
id:text_message
|
|
||||||
font: FluTextStyle.Body
|
|
||||||
wrapMode: Text.WrapAnywhere
|
|
||||||
text:message
|
|
||||||
width: parent.width
|
|
||||||
topPadding: 14
|
|
||||||
leftPadding: 20
|
|
||||||
rightPadding: 20
|
|
||||||
bottomPadding: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id:layout_actions
|
id:layout_actions
|
||||||
height: 68
|
height: 68
|
||||||
radius: 5
|
radius: 5
|
||||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||||
anchors{
|
anchors{
|
||||||
top:sroll_message.bottom
|
top:text_message.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
|
@ -140,4 +127,3 @@ FluPopup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ T.Slider {
|
||||||
}
|
}
|
||||||
FluTooltip{
|
FluTooltip{
|
||||||
parent: control.handle
|
parent: control.handle
|
||||||
visible: control.tooltipEnabled && (control.pressed || control.hovered)
|
visible: control.tooltipEnabled && control.pressed
|
||||||
text:String(control.value)
|
text:String(control.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ FluPopup {
|
||||||
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
property int buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||||||
focus: true
|
focus: true
|
||||||
implicitWidth: 400
|
implicitWidth: 400
|
||||||
implicitHeight: text_title.height + sroll_message.height + layout_actions.height
|
implicitHeight: text_title.height + text_message.height + layout_actions.height
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id:layout_content
|
id:layout_content
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -38,41 +38,28 @@ FluPopup {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluText{
|
||||||
Flickable{
|
id:text_message
|
||||||
id:sroll_message
|
font: FluTextStyle.Body
|
||||||
contentWidth: width
|
wrapMode: Text.WrapAnywhere
|
||||||
|
text:message
|
||||||
|
topPadding: 14
|
||||||
|
leftPadding: 20
|
||||||
|
rightPadding: 20
|
||||||
|
bottomPadding: 14
|
||||||
anchors{
|
anchors{
|
||||||
top:text_title.bottom
|
top:text_title.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
contentHeight: text_message.height
|
|
||||||
clip: true
|
|
||||||
height: Math.min(text_message.height,300)
|
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
|
||||||
|
|
||||||
FluText{
|
|
||||||
id:text_message
|
|
||||||
font: FluTextStyle.Body
|
|
||||||
wrapMode: Text.WrapAnywhere
|
|
||||||
text:message
|
|
||||||
width: parent.width
|
|
||||||
topPadding: 14
|
|
||||||
leftPadding: 20
|
|
||||||
rightPadding: 20
|
|
||||||
bottomPadding: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id:layout_actions
|
id:layout_actions
|
||||||
height: 68
|
height: 68
|
||||||
radius: 5
|
radius: 5
|
||||||
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
color: FluTheme.dark ? Qt.rgba(32/255,32/255,32/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||||
anchors{
|
anchors{
|
||||||
top:sroll_message.bottom
|
top:text_message.bottom
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ T.Slider {
|
||||||
}
|
}
|
||||||
FluTooltip{
|
FluTooltip{
|
||||||
parent: control.handle
|
parent: control.handle
|
||||||
visible: control.tooltipEnabled && (control.pressed || control.hovered)
|
visible: control.tooltipEnabled && control.pressed
|
||||||
text:String(control.value)
|
text:String(control.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue