Compare commits

...

5 Commits

Author SHA1 Message Date
朱子楚\zhuzi cb34c9e48d update 2023-08-23 20:54:19 +08:00
朱子楚\zhuzi 7fec01c2a4 update 2023-08-23 20:44:13 +08:00
朱子楚\zhuzi 2b484124eb fix #258 2023-08-23 20:38:01 +08:00
朱子楚\zhuzi 1c81ce299b fix #258 2023-08-23 20:36:09 +08:00
朱子楚\zhuzi f913263de6 fix #259 2023-08-23 20:11:42 +08:00
4 changed files with 22 additions and 18 deletions

View File

@ -292,20 +292,20 @@ git_get_exact_tag(GIT_EXACT_TAG)
if(GIT_TAG STREQUAL "")
git_latest_tag(GIT_TAG)
endif()
if(GIT_TAG STREQUAL "HEAD-HASH-NOTFOUND")
if(GIT_TAG STREQUAL "GIT-TAG-NOTFOUND")
set(GIT_TAG "1.0.0")
endif ()
git_describe(GIT_DESCRIBE)
if(GIT_DESCRIBE STREQUAL "HEAD-HASH-NOTFOUND")
set(GIT_DESCRIBE "1.0.0")
endif ()
git_commit_counts(GIT_COMMIT_COUNT)
if(GIT_COMMIT_COUNT STREQUAL "GIT-TAG-NOTFOUND")
set(GIT_COMMIT_COUNT "1")
endif ()
_git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}" GIT_DIR)
if(NOT IS_DIRECTORY ${GIT_DIR})
message(STATUS "Current .git not exist")
set(GIT_COMMIT_COUNT "1")
set(GIT_DESCRIBE "1.0.0")
set(GIT_TAG "1.0.0")
else()
message(STATUS "Current .git exist")
endif()
string(REPLACE "." "," GIT_TAG_WITH_COMMA ${GIT_TAG})
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" GIT_SEMVER "${GIT_TAG}")
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" SEMVER_SPLITED "${GIT_SEMVER}")

View File

@ -9,7 +9,6 @@ Rectangle {
property color hoverColor: FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(251/255,251/255,251/255,1)
property color normalColor: FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(254/255,254/255,254/255,1)
property string text: "请选择日期"
property var window : Window.window
id:control
color: {
if(mouse_area.containsMouse){
@ -30,6 +29,10 @@ Rectangle {
popup.showPopup()
}
}
Item{
id:d
property var window : Window.window
}
FluText{
id:text_date
anchors{
@ -97,12 +100,12 @@ Rectangle {
}
function showPopup() {
var pos = control.mapToItem(null, 0, 0)
if(window.height>pos.y+control.height+container.height){
if(d.window.height>pos.y+control.height+container.height){
popup.y = control.height
} else if(pos.y>container.height){
popup.y = -container.height
} else {
popup.y = window.height-(pos.y+container.height)
popup.y = d.window.height-(pos.y+container.height)
}
popup.x = -(popup.width-control.width)/2
popup.open()

View File

@ -32,6 +32,10 @@ Button{
}
}
Item{
id: d
property var window : Window.window
}
contentItem: Item{}
onClicked: {
popup.showPopup()
@ -73,12 +77,12 @@ Button{
}
function showPopup() {
var pos = control.mapToItem(null, 0, 0)
if(window.height>pos.y+control.height+container.height){
if(d.window.height>pos.y+control.height+container.height){
popup.y = control.height
} else if(pos.y>container.height){
popup.y = -container.height
} else {
popup.y = window.height-(pos.y+container.height)
popup.y = d.window.height-(pos.y+container.height)
}
popup.x = -(popup.width-control.width)/2
popup.open()

View File

@ -13,7 +13,6 @@ Item{
property var saveFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
property color borderColor: FluTheme.primaryColor.dark
signal captrueCompleted(var captrue)
QtObject{
id:d
property int dotMouseSize: control.dotSize+10
@ -518,8 +517,6 @@ Item{
}
}
}
function open(){
loader.sourceComponent = com_screen
}