diff --git a/.settings b/.settings index 42522b6..9996886 100644 --- a/.settings +++ b/.settings @@ -86,6 +86,12 @@ Geometry=[61,307,224,280] [DebugWindow/GridIndex.Rows[GridIndex.row]] Geometry=[45,-3,224,280] +[DebugWindow/Image.Load("ShapeNull.png").Resize(fmain.w, fmain.h).picture] +Geometry=[52,0,224,280] + +[DebugWindow/Image.Load("ShapeNull.png").Resize(fmain.w, fmain.h).picture.Image] +Geometry=[66,14,224,280] + [DebugWindow/Label] Geometry=[45,-3,224,280] @@ -107,6 +113,9 @@ Geometry=[1280,-3,224,280] [DebugWindow/Object] Geometry=[45,-3,224,280] +[DebugWindow/Picture["appicon.png"]] +Geometry=[52,0,224,280] + [DebugWindow/Picture["icon:|" & rSize & "|directory"]] Geometry=[1280,0,224,280] @@ -443,6 +452,9 @@ Geometry=[47,-3,229,280] [DebugWindow/selectable] Geometry=[1280,0,224,280] +[DebugWindow/shadowimage] +Geometry=[52,0,224,280] + [DebugWindow/sizes] Geometry=[47,-3,224,280] @@ -480,12 +492,12 @@ Path="/tmp/higgins.gambas" File[1]="higgins.desktop:18.7" Active=7 File[2]=".src/MySettings.module:0.8" -Count=15 +Count=16 File[3]=".src/plugins/plugin_apps_gui.form" File[4]=".src/plugins/plugin_indexer_gui.form" File[5]=".src/plugins/plugin_015_recent.class:0.19" File[6]=".src/FMain.form" -File[7]=".src/FMain.class:0.1489" +File[7]=".src/FMain.class:0.1629" File[8]=".src/hSettings.class:14.258" File[9]=".src/Global.module:34.92" File[10]=".src/MyDesktop.class:3.60" @@ -494,6 +506,7 @@ File[12]=".src/hSettings.form" File[13]=".src/StartClass.class:18.3" File[14]=".src/plugins/plugin_020_apps.class:0.63" File[15]=".src/DesktopApps.class:10.86" +File[16]=".src/gstyle.module:28.180" [Watches] Count=0 diff --git a/.src/DesktopApps.class b/.src/DesktopApps.class index 807a591..7b79b10 100644 --- a/.src/DesktopApps.class +++ b/.src/DesktopApps.class @@ -90,7 +90,7 @@ Static Public Sub WarmCache() For Each sPath In anotherdirs - Debug "Warming norecursiv:e " & sPath + Debug "Warming norecursive " & sPath WarmList &= sPath & " " Next diff --git a/.src/FMain.class b/.src/FMain.class index 601b538..94da05a 100644 --- a/.src/FMain.class +++ b/.src/FMain.class @@ -1268,9 +1268,9 @@ Public Sub Form_KeyRelease() End Public Sub Form_Hide() + Dim timer_hidden As New Timer As "timer_hidden" resultgrid.visible = False 'act a s a control on show time to force minimum height Wait - MySettings.save_geometry() ResultGrid.UnSelectAll() resultgrid.row = -1 Try timer_expand_check.stop @@ -1283,13 +1283,22 @@ Public Sub Form_Hide() textbox1.Clear textbox1.text = "" Endif + timer_hidden.delay = 10 + timer_hidden.start +End +Public Sub timer_hidden_timer() + timer_hidden.stop + fmain.border = True End + +Public OLD_timer_shown As Timer +Public timer_hidden As Timer Public timer_shown As Timer Public iterations As Integer -Public Sub timer_shown_timer() +Public Sub OLD_timer_shown_timer() 'brute force needed for kwin + qt5 '...the window sometimes appears at wrong position '..so hammer it with a timer to restore the right one. @@ -1318,7 +1327,7 @@ Public Sub timer_shown_timer() Endif End -Public Sub Form_Show() +Public Sub OLD_Form_Show() Dim decorated As Boolean = hsettings.CheckBox1.value <> CheckBox.true fmain.border = decorated @@ -1339,6 +1348,58 @@ Public Sub Form_Show() End +Public Sub Form_Show() + Dim iMask As New Image + Dim decorated As Boolean = hsettings.CheckBox1.value <> CheckBox.true + + If Not decorated Then + 'invisible 'use a blank mask to hide the form until we are sure it is displayed in the right position. + iMask.Resize(fmain.w + 10, fmain.H + 10) + iMask.Fill(Color.Transparent) + Paint.Begin(iMask) + Paint.FillRect(iMask.w - 1, iMask.h - 1, 1, 1, Color.white) + Paint.end + fmain.mask = True + fmain.picture = iMask.Picture + global.object_unlock(TextBox1) '<--?? needed? + Endif + + timer_shown = New Timer As "timer_shown" + timer_shown.trigger + +End + + +Public Sub timer_shown_timer() + 'Needed for kwin + qt5 + '...the window sometimes appears at wrong position + '..so hammer it with a timer to restore the right one. + + Dim decorated As Boolean = hsettings.CheckBox1.value <> CheckBox.true + Dim i As Integer + Dim right_geom As Collection + fmain.tag = "" + resize_form() + gstyle.make_background() + TextBox1.SetFocus() + fmain.Border = decorated + + right_geom = MySettings.load_geometry() + + If Not decorated Then + Wait + If (fmain.screeny <> right_geom["y"]) Or (fmain.screeny <> fmain.y) Then + For i = 0 To 30 + Debug fmain.screeny, right_geom["y"] + MySettings.load_geometry() + Wait 0.01 + If (fmain.screeny = right_geom["y"]) And (fmain.screeny = fmain.y) Then Break + Next + Endif + Endif + fmain.mask = False + fmain.picture = Null +End @@ -1458,7 +1519,7 @@ End Public Sub Form_Leave() - + MySettings.save_geometry() MySettings.save() End @@ -1522,6 +1583,7 @@ Public Sub panel2_MouseDown() End Public bRresize As Boolean = False +Public bRMove As Boolean = False Public Sub panel2_mousemove() Dim bResize As Boolean @@ -1546,13 +1608,18 @@ Public Sub panel2_mousemove() mouse_startx = Mouse.x mouse_starty = Mouse.y Else + bRMove = True Me.Move(fmain.x + (mouse.x - mouse_StartX), fmain.y + (mouse.y - mouse_Starty)) Endif End Public Sub panel2_Mouseup() - bRresize = False + If bRresize = True Or (bRMove = True) Then + MySettings.save_geometry() + bRresize = False + bRMove = False + Endif End diff --git a/.src/MySettings.module b/.src/MySettings.module index f806f28..70e3bd0 100644 --- a/.src/MySettings.module +++ b/.src/MySettings.module @@ -57,18 +57,24 @@ Public Sub save_geometry() Settings["win_rx"] = xy_r[0] Settings["win_ry"] = xy_r[1] + If xy_r[1] = 28 Then Stop Settings["win_w"] = xy_r[2] End -Public Sub load_geometry() +Public Sub load_geometry(Optional pretend As Boolean = False) As Collection Dim s As Screen Dim rx, ry, w As Integer + Dim geom As New Collection s = Screenbypos(Mouse.ScreenX, Mouse.ScreenY) rx = Settings["win_rx", 0] ry = Settings["win_ry", 0] w = Settings["win_w", (s.w Div 2)] ' h = Settings["win_h", 64] - fmain.Move(rx + s.x, ry + s.y, w) + If Not pretend Then fmain.Move(rx + s.x, ry + s.y, w) + geom["x"] = rx + s.x + geom["y"] = ry + s.y + geom["w"] = w + Return geom End diff --git a/.src/StartClass.class b/.src/StartClass.class index 295f52e..5f105bf 100644 --- a/.src/StartClass.class +++ b/.src/StartClass.class @@ -2,4 +2,10 @@ Static Public Sub Main() FMain.first_init() + ' While 1 = 1 + ' fmain.Show() + ' Wait + ' fmain.hide() + ' Wait + ' Wend End