diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index eb775ffa9..637965500 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -8,7 +8,7 @@ Component=gb.image Component=gb.gui Component=gb.settings Authors="BenoƮt Minisini" -Environment="GB_GUI=gb.gtk" +Environment="GB_GUI=gb.qt5" TabSize=2 Translate=1 Language=en diff --git a/comp/src/gb.form/.src/TabPanel/_TabPanelButton.class b/comp/src/gb.form/.src/TabPanel/_TabPanelButton.class index d5d350b6e..e0bf9a718 100644 --- a/comp/src/gb.form/.src/TabPanel/_TabPanelButton.class +++ b/comp/src/gb.form/.src/TabPanel/_TabPanelButton.class @@ -30,6 +30,7 @@ Private $DX As Integer Private $SX As Integer Private $hTimerDrag As Timer Private $bClosable As Boolean +Private $bInside As Boolean Public Sub _new() @@ -132,7 +133,7 @@ Public Sub DrawingArea_Draw() If Not hFont Then hFont = hTabPanel.Font Paint.Font = hFont - If Not $bSelected And If $hDrawingArea.Hovered Then + If Not $bSelected And If $bInside Then If $bRichText Then Paint.DrawRichTextShadow($sText, X, 0, W, Me.Height, Align.Center) Else @@ -344,6 +345,7 @@ End Public Sub DrawingArea_Enter() 'Debug ">";; Me.Text + $bInside = True $hDrawingArea.Tracking = True $bShowClose = IsClosable() $hDrawingArea.Refresh @@ -360,6 +362,7 @@ End Public Sub DrawingArea_Leave() 'Debug "<";; Me.Text + $bInside = False $bShowClose = False $bInClose = False SetMouse @@ -374,14 +377,16 @@ Public Sub DrawingArea_MouseMove() Dim X As Integer Dim bShowClose As Boolean Dim bShift As Boolean + Dim Y As Integer If $bDrag Then TimerDrag_Timer X = Mouse.ScreenX - Me.ScreenX + Y = Mouse.ScreenY - Me.ScreenY Try bShift = Mouse.Shift And Mouse.Control - If Not Error And If bShift Then Debug X + 'If Not Error And If bShift Then Debug X - If X >= 0 And If X < Me.W Then + If X >= 0 And If X < Me.W And If Y >= 0 And If Y < Me.H Then bShowClose = IsClosable() If bShowClose Then @@ -391,6 +396,9 @@ Public Sub DrawingArea_MouseMove() bInClose = (X >= (Me.W - BUTTON_SIZE)) And (X < Me.W) Endif Endif + $bInside = True + Else + $bInside = False Endif If bInClose <> $bInClose Or If bShowClose <> $bShowClose Then