diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index 8a347fdd5..268b1d553 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -9,7 +9,7 @@ Component=gb.form Component=gb.settings Component=gb.form.stock Authors="BenoƮt Minisini" -Environment="GB_GUI=gb.qt5\n GB_STOCK_DEBUG=1\n LANG=zh_CN.UTF-8\n LC_ALL=zh_CN.UTF-8" +Environment="GB_GUI=gb.qt5\n GB_STOCK_DEBUG=1\nLANG=zh_CN.UTF-8\nLC_ALL=zh_CN.UTF-8" TabSize=2 Translate=1 Language=en diff --git a/comp/src/gb.form/.src/Date/DateBox.class b/comp/src/gb.form/.src/Date/DateBox.class index 61e7c6012..f500b709e 100644 --- a/comp/src/gb.form/.src/Date/DateBox.class +++ b/comp/src/gb.form/.src/Date/DateBox.class @@ -146,11 +146,11 @@ Public Sub ButtonBox_Click() Dim dDate As Date If $bShowTime And $bShowDate Then - $hPopup.Resize(Desktop.Scale * 60 + 2, ((Desktop.Scale * 32) \ 12) * 12 + 2) + $hPopup.Resize(Desktop.Scale * 72 + 2, ((Desktop.Scale * 32) \ 12) * 12 + 2) Else If $bShowDate $hPopup.Resize(Desktop.Scale * 40 + 2, Desktop.Scale * 32) Else - $hPopup.Resize(Desktop.Scale * 24 + 2, ((Desktop.Scale * 32) \ 12) * 12 + 2) + $hPopup.Resize(Desktop.Scale * 32 + 2, ((Desktop.Scale * 32) \ 12) * 12 + 2) Endif iPad = If($hButtonBox.Border, 3, 0) diff --git a/comp/src/gb.form/.src/Date/FCalendar.class b/comp/src/gb.form/.src/Date/FCalendar.class index 0f89ef486..e6f66a84d 100644 --- a/comp/src/gb.form/.src/Date/FCalendar.class +++ b/comp/src/gb.form/.src/Date/FCalendar.class @@ -63,11 +63,25 @@ Private Sub GetTimeFormat() As String End +Private Sub UpdateTimeWidth() + + If panDate.Visible Then + If panTime.Visible Then + panTime.Expand = False + panTime.W = Desktop.Scale * 32 + Else + Endif + Else + If panTime.Visible Then + panTime.Expand = True + Endif + Endif + +End Public Sub _new() - panTime.W = Desktop.Scale * 24 - + UpdateTimeWidth FillMonth(False) $dDate = Now @@ -725,6 +739,7 @@ Public Sub SetShowTime(bShowTime As Boolean) If Not GetShowDate() And Not bShowTime Then Error.Raise("Bad argument") panTime.Visible = bShowTime sepTime.Visible = GetShowTime() And GetShowDate() + UpdateTimeWidth End @@ -739,6 +754,7 @@ Public Sub SetShowDate(bShowDate As Boolean) If Not GetShowTime() And Not bShowDate Then Error.Raise("Bad argument") panDate.Visible = bShowDate sepTime.Visible = GetShowTime() And GetShowDate() + UpdateTimeWidth End @@ -838,10 +854,24 @@ Public Sub txtMinute_MouseWheel() If Mouse.Forward Then Inc iMinute - If iMinute > 59 Then iMinute = 0 + If iMinute > 59 Then + If Hour($dTime) = 23 Then + Stop Event + Return + Endif + iMinute = 0 + txtHour_MouseWheel + Endif Else Dec iMinute - If iMinute < 0 Then iMinute = 59 + If iMinute < 0 Then + If Hour($dTime) = 0 Then + Stop Event + Return + Endif + iMinute = 59 + txtHour_MouseWheel + Endif Endif SetTime(Time(Hour($dTime), iMinute, 0)) diff --git a/comp/src/gb.form/.src/Date/FCalendar.form b/comp/src/gb.form/.src/Date/FCalendar.form index f616bbf3e..d5738085c 100644 --- a/comp/src/gb.form/.src/Date/FCalendar.form +++ b/comp/src/gb.form/.src/Date/FCalendar.form @@ -85,13 +85,13 @@ { Panel3 Panel MoveScaled(8,0,8,4) Background = Color.TextBackground - { txtHour TextBox - MoveScaled(0,0,4,4) + { txtMinute TextBox + MoveScaled(4,0,4,4) Alignment = Align.Right Border = False } - { txtMinute TextBox - MoveScaled(4,0,4,4) + { txtHour TextBox + MoveScaled(0,0,4,4) Alignment = Align.Right Border = False } diff --git a/comp/src/gb.form/.src/File/Chooser/FDirChooser.form b/comp/src/gb.form/.src/File/Chooser/FDirChooser.form index 14160e381..49a6370fc 100644 --- a/comp/src/gb.form/.src/File/Chooser/FDirChooser.form +++ b/comp/src/gb.form/.src/File/Chooser/FDirChooser.form @@ -39,7 +39,6 @@ { dwgGradient DrawingArea MoveScaled(6,0,2,4) Ignore = True - NoBackground = True } } { Separator3 Separator