Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
  • v3.1.0
115 results

Target

Select target project
  • xmonader/gambas
  • gambas/gambas
  • gbWilly/gambas
  • dtardon/gambas
  • Davidmue/gambas
  • mmu_man/gambas
  • jguardon/gambas
  • tstueker/gambas
  • timsoft/gambas
  • yann64/gambas
  • Matthew-Collins/gambas
  • microhobby/gambas
  • ercoupeflyer/gambas
  • pebauer68/gambas
  • ptmarstech/gambas
  • christhal/gambas
  • tboege/gambas
  • christopherwoo/gambas
  • yusronarif/gambas
  • gen.braga/gambas
  • MelvinG24/gambas
  • Krischel/gambas
  • liang-wei/gambas
  • brucebruen/gambas
  • LibreDWG/gambas
  • SkyN9ne/gambas
  • zxMarce/gambas
  • lordheavy/gambas
  • ddabrahams76/gambas
  • GianluigiOr/gambas
  • rfc1394/gambas
  • wekan/gambas
  • bsteers4/gambas
  • fweimer-rh/gambas
  • CDCDCDCDCDCD/gambas
  • geekdu42/gambas
  • belmotek/gambas
  • jfrank1500/gambas
  • mfischerq/gambas
  • shiny0110/gambas
  • kk667788/gambas
  • bandali/gambas
  • 64sys/gambas
  • justlostintime/gambas
  • aleasto/gambas
  • bgermann/gambas
  • linusky/gambas
47 results
Select Git revision
  • AppImage
  • WorkSpace
  • cmake
  • evdev
  • exclamation-mark-completion
  • gb.chart2
  • gb.git
  • gb.joystick
  • gb.net.imap
  • gb.spreadsheet
  • gb.test
  • gb.test.tap
  • master
  • newdialogs
  • stable
  • 3.11.0
  • 3.11.1
  • 3.11.2
  • 3.11.3
  • 3.11.4
  • 3.12.0
  • 3.12.1
  • 3.12.2
  • 3.13.0
  • 3.14.0
  • 3.14.1
  • 3.14.2
  • 3.14.3
  • 3.15.0
  • 3.15.1
  • 3.15.2
  • 3.16.0
  • 3.16.1
  • 3.16.2
  • 3.16.3
  • 3.17.0
  • 3.17.1
  • 3.17.2
  • 3.17.3
  • 3.18.0
  • 3.18.1
  • 3.18.2
  • 3.18.3
  • 3.18.4
  • 3.19.0
  • 3.19.1
  • 3.19.2
  • 3.19.3
  • 3.19.4
  • 3.19.5
  • 3.19.6
  • 3.20.0
  • 3.20.1
  • 3.20.2
  • help
  • v1.9.44
  • v1.9.45
  • v1.9.46
  • v1.9.47
  • v1.9.48
  • v1.9.49
  • v1.9.50
  • v1.9.51
  • v1.9.90
  • v1.9.91
  • v1.9.92
  • v2.0.0
  • v2.1
  • v2.1.1
  • v2.10
  • v2.10.1
  • v2.10.2
  • v2.11
  • v2.11.1
  • v2.12
  • v2.13
  • v2.13.1
  • v2.14
  • v2.15
  • v2.15.1
  • v2.15.2
  • v2.16.0
  • v2.17.0
  • v2.18.0
  • v2.19.0
  • v2.2
  • v2.2.1
  • v2.20.0
  • v2.20.1
  • v2.20.2
  • v2.21.0
  • v2.22.0
  • v2.23.0
  • v2.23.1
  • v2.24.0
  • v2.3
  • v2.4
  • v2.4.1
  • v2.5
  • v2.6
  • v2.7
  • v2.8
  • v2.8.1
  • v2.8.2
  • v2.9
  • v2.9.0
  • v2.99.1
  • v2.99.2
  • v2.99.3
  • v2.99.4
  • v2.99.5
  • v2.99.6
  • v2.99.7
  • v3.0.0
  • v3.1.0
115 results
Show changes
Commits on Source (6)
Showing
with 162 additions and 110 deletions
...@@ -58,7 +58,7 @@ Public Sub gvwProc_MouseUp() ...@@ -58,7 +58,7 @@ Public Sub gvwProc_MouseUp()
End End
Private Sub SetCurrent(iCurrent As Integer) Private Sub SetCurrent(iCurrent As Integer, Optional bEnsureVisible As Boolean = True)
Dim iOld As Integer = $iCurrent Dim iOld As Integer = $iCurrent
...@@ -69,20 +69,20 @@ Private Sub SetCurrent(iCurrent As Integer) ...@@ -69,20 +69,20 @@ Private Sub SetCurrent(iCurrent As Integer)
If iOld >= 0 Then gvwProc.Rows[iOld].Refresh If iOld >= 0 Then gvwProc.Rows[iOld].Refresh
If iCurrent >= 0 Then If iCurrent >= 0 Then
gvwProc.Rows[iCurrent].Refresh gvwProc.Rows[iCurrent].Refresh
gvwProc[iCurrent, 0].EnsureVisible If bEnsureVisible Then gvwProc[iCurrent, 0].EnsureVisible
Endif Endif
End End
Public Sub gvwProc_MouseMove() Public Sub gvwProc_MouseMove()
SetCurrent(gvwProc.RowAt(Mouse.Y)) SetCurrent(gvwProc.RowAt(Mouse.Y), True)
End End
Public Sub gvwProc_MouseWheel() Public Sub gvwProc_Scroll()
gvwProc_MouseMove SetCurrent(gvwProc.RowAt(Mouse.Y), False)
End End
......
comp/src/gb.form.stock/gambas-mono/32/copy.png

176 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/copy.png

196 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/copy.png
comp/src/gb.form.stock/gambas-mono/32/copy.png
comp/src/gb.form.stock/gambas-mono/32/copy.png
comp/src/gb.form.stock/gambas-mono/32/copy.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas-mono/32/cut.png

490 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/cut.png

441 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/cut.png
comp/src/gb.form.stock/gambas-mono/32/cut.png
comp/src/gb.form.stock/gambas-mono/32/cut.png
comp/src/gb.form.stock/gambas-mono/32/cut.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas-mono/32/fullscreen.png

179 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/fullscreen.png

205 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/fullscreen.png
comp/src/gb.form.stock/gambas-mono/32/fullscreen.png
comp/src/gb.form.stock/gambas-mono/32/fullscreen.png
comp/src/gb.form.stock/gambas-mono/32/fullscreen.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas-mono/32/paste.png

166 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/paste.png

183 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas-mono/32/paste.png
comp/src/gb.form.stock/gambas-mono/32/paste.png
comp/src/gb.form.stock/gambas-mono/32/paste.png
comp/src/gb.form.stock/gambas-mono/32/paste.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas/32/copy.png

179 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/copy.png

200 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/copy.png
comp/src/gb.form.stock/gambas/32/copy.png
comp/src/gb.form.stock/gambas/32/copy.png
comp/src/gb.form.stock/gambas/32/copy.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas/32/cut.png

514 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/cut.png

477 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/cut.png
comp/src/gb.form.stock/gambas/32/cut.png
comp/src/gb.form.stock/gambas/32/cut.png
comp/src/gb.form.stock/gambas/32/cut.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas/32/filter.png

200 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/filter.png

210 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/filter.png
comp/src/gb.form.stock/gambas/32/filter.png
comp/src/gb.form.stock/gambas/32/filter.png
comp/src/gb.form.stock/gambas/32/filter.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas/32/fullscreen.png

179 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/fullscreen.png

205 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/fullscreen.png
comp/src/gb.form.stock/gambas/32/fullscreen.png
comp/src/gb.form.stock/gambas/32/fullscreen.png
comp/src/gb.form.stock/gambas/32/fullscreen.png
  • 2-up
  • Swipe
  • Onion skin
comp/src/gb.form.stock/gambas/32/paste.png

178 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/paste.png

188 B | W: 0px | H: 0px

comp/src/gb.form.stock/gambas/32/paste.png
comp/src/gb.form.stock/gambas/32/paste.png
comp/src/gb.form.stock/gambas/32/paste.png
comp/src/gb.form.stock/gambas/32/paste.png
  • 2-up
  • Swipe
  • Onion skin
# Gambas Project File 3.0 # Gambas Project File 3.0
Title=More controls for graphical components Title=More controls for graphical components
Startup=FTestColorChooser Startup=FTestFileView
Version=3.11.90 Version=3.11.90
VersionFile=1 VersionFile=1
Component=gb.image Component=gb.image
Component=gb.gui Component=gb.gui
Component=gb.settings Component=gb.settings
Authors="Benoît Minisini" Authors="Benoît Minisini"
Environment="GB_GUI=gb.gtk3" Environment="GB_GUI=gb.qt4"
TabSize=2 TabSize=2
Translate=1 Translate=1
Language=en Language=en
......
...@@ -42,9 +42,12 @@ Private $bShowHidden As Boolean ...@@ -42,9 +42,12 @@ Private $bShowHidden As Boolean
Private $bShowDir As Boolean Private $bShowDir As Boolean
Private $bShowPreview As Boolean Private $bShowPreview As Boolean
Private $hIconView As IconView Private $hIconView As IconView
Private $hColumnView As ColumnView Private $hColumnView As ColumnView
Private $sSortDir As String
Private $iSort As Integer Private $iSort As Integer
Private $bAsc As Boolean = True Private $bAsc As Boolean = True
Private $aFilter As String[] Private $aFilter As String[]
Private $hPict As Picture Private $hPict As Picture
Private $hRefresh As Timer Private $hRefresh As Timer
...@@ -62,6 +65,9 @@ Private $hWatcher As Watcher ...@@ -62,6 +65,9 @@ Private $hWatcher As Watcher
Private $bVisible As Boolean Private $bVisible As Boolean
Private $bInvalidate As Boolean Private $bInvalidate As Boolean
Static Private $iIconExecSize As Integer
Static Private $hIconExec As Picture
Static Public Sub _init() Static Public Sub _init()
$cExt["html"] = "html" $cExt["html"] = "html"
...@@ -225,7 +231,13 @@ Private Sub GetIcon(sPath As String, iSize As Integer) As Picture ...@@ -225,7 +231,13 @@ Private Sub GetIcon(sPath As String, iSize As Integer) As Picture
With DirCache[File.Dir(sPath)].GetInfo(File.Name(sPath)) With DirCache[File.Dir(sPath)].GetInfo(File.Name(sPath))
If InStr(.Perm[System.User.Name], "x") Then Return Picture["icon:/" & CStr(iSize) &/ "exec"] If InStr(.Perm[System.User.Name], "x") Then
If Not $hIconExec Or If $iIconExecSize <> iSize Then
$iIconExecSize = iSize
$hIconExec = Picture["icon:/" & CStr(iSize) &/ "exec"]
Endif
Return $hIconExec
Endif
End With End With
...@@ -317,7 +329,10 @@ Private Sub RefreshView() ...@@ -317,7 +329,10 @@ Private Sub RefreshView()
If $hColumnView.Visible Then If $hColumnView.Visible Then
SX = $hColumnView.ScrollX SX = $hColumnView.ScrollX
SY = $hColumnView.ScrollY SY = $hColumnView.ScrollY
If Not $bWatch Or If $bRefreshAll Then $hColumnView.Clear If Not $bWatch Or If $bRefreshAll Then
$hColumnView.Clear
$hColumnView._Begin()
Endif
$hColumnView.Sorted = False $hColumnView.Sorted = False
hPictFile = Picture["icon:/small/file"] hPictFile = Picture["icon:/small/file"]
hPictFolder = Picture["icon:/small/directory"] hPictFolder = Picture["icon:/small/directory"]
...@@ -434,6 +449,7 @@ Finally ...@@ -434,6 +449,7 @@ Finally
$bRefreshIcon = False $bRefreshIcon = False
$bRefreshAll = False $bRefreshAll = False
If $hColumnView.Visible Then If $hColumnView.Visible Then
$hColumnView._End
$hColumnView.Sorted = True $hColumnView.Sorted = True
Else Else
$hIconView._End $hIconView._End
...@@ -705,14 +721,9 @@ Public Sub View_Menu() ...@@ -705,14 +721,9 @@ Public Sub View_Menu()
End End
Public Sub View_Compare((Key) As String, OtherKey As String) Public Sub View_BeforeSort()
Dim hStat As Stat
Dim hStat2 As Stat
Dim sDir As String
Dim iComp As Integer
sDir = GetCurrentDir() $sSortDir = GetCurrentDir()
If $hColumnView.Visible Then If $hColumnView.Visible Then
$iSort = $hColumnView.Columns.Sort $iSort = $hColumnView.Columns.Sort
...@@ -721,13 +732,22 @@ Public Sub View_Compare((Key) As String, OtherKey As String) ...@@ -721,13 +732,22 @@ Public Sub View_Compare((Key) As String, OtherKey As String)
$hIconView.Ascending = $bAsc $hIconView.Ascending = $bAsc
Endif Endif
End
Public Sub View_Compare((Key) As String, OtherKey As String)
Dim hStat As Stat
Dim hStat2 As Stat
Dim iComp As Integer
iComp = Comp(Asc(Key), Asc(OtherKey)) iComp = Comp(Asc(Key), Asc(OtherKey))
If iComp = 0 Then If iComp = 0 Then
If $iSort Then If $iSort Then
hStat = DirCache[sDir].GetInfo(Mid$(Key, 2)) hStat = DirCache[$sSortDir].GetInfo(Mid$(Key, 2))
hStat2 = DirCache[sDir].GetInfo(Mid$(OtherKey, 2)) hStat2 = DirCache[$sSortDir].GetInfo(Mid$(OtherKey, 2))
Endif Endif
Select $iSort Select $iSort
......
...@@ -33,6 +33,7 @@ Private $hShowButtonRight As DrawingArea ...@@ -33,6 +33,7 @@ Private $hShowButtonRight As DrawingArea
Private $hTimerAnim As Timer Private $hTimerAnim As Timer
Private $iTarget As Integer Private $iTarget As Integer
Private $bLockRefresh As Boolean
' Static Public Sub _init() ' Static Public Sub _init()
' '
...@@ -303,7 +304,7 @@ Private Sub CreateShowButton(hParent As Container) As DrawingArea ...@@ -303,7 +304,7 @@ Private Sub CreateShowButton(hParent As Container) As DrawingArea
hCtrl.Ignore = True hCtrl.Ignore = True
hCtrl.Resize(Desktop.Scale, Desktop.Scale) hCtrl.Resize(Desktop.Scale, Desktop.Scale)
hCtrl.Mouse = Mouse.Pointing hCtrl.Mouse = Mouse.Pointing
hCtrl.Tooltip = Me.Parent.NAme hCtrl.Tooltip = Me.Parent.Tooltip
Return hCtrl Return hCtrl
...@@ -436,13 +437,18 @@ End ...@@ -436,13 +437,18 @@ End
Public Sub RefreshAll() Public Sub RefreshAll()
Dim hParent As Container Dim hParent As SidePanel
Dim hTabStrip As TabStrip Dim hTabStrip As TabStrip
Dim iIndex As Integer Dim iIndex As Integer
Dim D As Integer Dim D As Integer
Dim hCont As Container
If Not $bOpened Then Return If Not $bOpened Then Return
'Debug Me.Parent.Name;; Me.X;; Me.Y;; Me.W;; panMove.W;; Me.Parent.ClientH
If $bLockRefresh Then Return
$bLockRefresh = True
hParent = GetParent()
btnSide.Visible = Not $bTransparent Or $bVisible btnSide.Visible = Not $bTransparent Or $bVisible
btnSide2.Visible = btnSide.Visible btnSide2.Visible = btnSide.Visible
...@@ -464,20 +470,21 @@ Public Sub RefreshAll() ...@@ -464,20 +470,21 @@ Public Sub RefreshAll()
If Not $hShowPanel And If $bTransparent Then If Not $hShowPanel And If $bTransparent Then
hParent = Me.Parent.Parent hCont = Me.Parent.Parent
If hParent Is TabStrip Then If hCont Is TabStrip Then
hTabStrip = hParent hTabStrip = hCont
iIndex = hTabStrip.Index iIndex = hTabStrip.Index
hTabStrip.Index = hTabStrip.FindIndex(Me.Parent) hTabStrip.Index = hTabStrip.FindIndex(Me.Parent)
Endif Endif
$hShowButtonLeft = CreateShowButton(hParent) $hShowButtonLeft = CreateShowButton(hCont)
$hShowButtonRight = CreateShowButton(hParent) $hShowButtonRight = CreateShowButton(hCont)
$hShowPanel = New Panel(hParent) As "panMove" $hShowPanel = New Panel(hCont) As "panMove"
$hShowPanel.Ignore = True $hShowPanel.Ignore = True
$hShowPanel.Mouse = Mouse.Pointing $hShowPanel.Mouse = Mouse.Pointing
$hShowPanel.Tooltip = GetParent().Tooltip
If hTabStrip Then hTabStrip.Index = iIndex If hTabStrip Then hTabStrip.Index = iIndex
...@@ -490,8 +497,7 @@ Public Sub RefreshAll() ...@@ -490,8 +497,7 @@ Public Sub RefreshAll()
MoveShowButton MoveShowButton
Endif Endif
'UpdateBackground
RefreshArrow RefreshArrow
RefreshPanel RefreshPanel
RefreshButtons RefreshButtons
...@@ -499,6 +505,8 @@ Public Sub RefreshAll() ...@@ -499,6 +505,8 @@ Public Sub RefreshAll()
sepSide.Raise sepSide.Raise
panMove.Raise panMove.Raise
$bLockRefresh = False
End End
Private Sub AfterTogglePanel() Private Sub AfterTogglePanel()
...@@ -837,6 +845,11 @@ Public Sub SetTooltip(Value As String) ...@@ -837,6 +845,11 @@ Public Sub SetTooltip(Value As String)
btnSide.ToolTip = Value btnSide.ToolTip = Value
btnSide2.ToolTip = Value btnSide2.ToolTip = Value
panMove.ToolTip = Value panMove.ToolTip = Value
If $hShowButtonLeft Then
$hShowButtonLeft.Tooltip = Value
$hShowButtonRight.Tooltip = Value
$hShowPanel.Tooltip = Value
Endif
End End
......
...@@ -14,7 +14,7 @@ Event Hide ...@@ -14,7 +14,7 @@ Event Hide
Property Read Editor As Control Property Read Editor As Control
Property NoKeyboard As Boolean Property NoKeyboard As Boolean
Property ShowCursor As Boolean 'Property ShowCursor As Boolean
Private $hTextBox As TextBox Private $hTextBox As TextBox
Private $hComboBox As ComboBox Private $hComboBox As ComboBox
...@@ -28,7 +28,7 @@ Private $hWatcher As Watcher ...@@ -28,7 +28,7 @@ Private $hWatcher As Watcher
Private $bNoKeyboard As Boolean Private $bNoKeyboard As Boolean
Private $hTimer As Timer Private $hTimer As Timer
Private $bDoNotHideEditor As Boolean Private $bDoNotHideEditor As Boolean
Private $bShowCursor As Boolean 'Private $bShowCursor As Boolean
Public Sub _new() Public Sub _new()
...@@ -111,7 +111,7 @@ Private Sub HideEditor(Optional bNoSave As Boolean) As Boolean ...@@ -111,7 +111,7 @@ Private Sub HideEditor(Optional bNoSave As Boolean) As Boolean
Endif Endif
Endif Endif
UpdateShowCursor 'UpdateShowCursor
Return bCancel Return bCancel
...@@ -172,7 +172,7 @@ Private Sub MoveEditor() ...@@ -172,7 +172,7 @@ Private Sub MoveEditor()
$hPanel.Background = $hEditor.Background $hPanel.Background = $hEditor.Background
Endif Endif
UpdateShowCursor 'UpdateShowCursor
$hPanel.Move(X, Y, W, H) $hPanel.Move(X, Y, W, H)
$hEditor.Move(P, P, W - P * 2, H - P * 2) $hEditor.Move(P, P, W - P * 2, H - P * 2)
...@@ -538,21 +538,21 @@ Public Sub Clear() ...@@ -538,21 +538,21 @@ Public Sub Clear()
End End
Private Function ShowCursor_Read() As Boolean ' Private Function ShowCursor_Read() As Boolean
'
Return $bShowCursor ' Return $bShowCursor
'
End ' End
'
Private Sub UpdateShowCursor() ' Private Sub UpdateShowCursor()
'
Super.ShowCursor = $bShowCursor 'And IsNull($hEditor) ' Super.ShowCursor = $bShowCursor 'And IsNull($hEditor)
'
End ' End
'
Private Sub ShowCursor_Write(Value As Boolean) ' Private Sub ShowCursor_Write(Value As Boolean)
'
$bShowCursor = Value ' $bShowCursor = Value
UpdateShowCursor ' UpdateShowCursor
'
End ' End
...@@ -28,11 +28,11 @@ End ...@@ -28,11 +28,11 @@ End
Public Sub FileChooser1_Change() Public Sub FileChooser1_Change()
If FileChooser1.SelectedPath Then ' If FileChooser1.SelectedPath Then
FileProperties1.Path = FileChooser1.SelectedPath ' FileProperties1.Path = FileChooser1.SelectedPath
Else ' Else
FileProperties1.Path = FileChooser1.Dir ' FileProperties1.Path = FileChooser1.Dir
Endif ' Endif
End End
...@@ -46,6 +46,7 @@ End ...@@ -46,6 +46,7 @@ End
Public Sub Form_Open() Public Sub Form_Open()
FileChooser1.SelectedPath = "/home/benoit/gambas/git/master/app/src/gambas3/img/broken.svg" FileChooser1.Dir = "/usr/bin"
'FileChooser1.SelectedPath = "/home/benoit/gambas/git/master/app/src/gambas3/img/broken.svg"
End End
...@@ -65,12 +65,13 @@ ...@@ -65,12 +65,13 @@
Expand = True Expand = True
Spacing = True Spacing = True
{ FileChooser1 FileChooser { FileChooser1 FileChooser
MoveScaled(4,4,55,56) MoveScaled(10,4,77,56)
Expand = True Expand = True
ReadOnly = True ReadOnly = True
} }
{ FileProperties1 FileProperties { FileProperties1 FileProperties
MoveScaled(62,4,52,36) MoveScaled(97,2,28,36)
Visible = False
} }
} }
} }
# Gambas Project File 3.0 # Gambas Project File 3.0
Title=Common controls and classes for GUI components Title=Common controls and classes for GUI components
Startup=FGridView Startup=FIconView
Version=3.11.90 Version=3.11.90
VersionFile=1 VersionFile=1
Component=gb.image Component=gb.image
Component=gb.gui Component=gb.gui
Arguments=[["-style=oxygen"],["-style=qtcurve"]] Arguments=[["-style=oxygen"],["-style=qtcurve"]]
CurrentArgument=0 CurrentArgument=0
Environment="GB_GUI=gb.qt5\nLIBOVERLAY_SCROLLBAR=0" Environment="GB_GUI=gb.gtk3\nLIBOVERLAY_SCROLLBAR=0"
TabSize=2 TabSize=2
Language=fr Language=fr
Type=Component Type=Component
......
...@@ -534,9 +534,12 @@ Public Sub ScrollArea_Arrange() ...@@ -534,9 +534,12 @@ Public Sub ScrollArea_Arrange()
Dim W, H As Integer Dim W, H As Integer
Dim nRow As Integer Dim nRow As Integer
Dim DS As Integer
If $iLock Then Return If $iLock Then Return
DS = Desktop.Scale
W = $hView.ClientWidth W = $hView.ClientWidth
H = $hView.ClientHeight H = $hView.ClientHeight
...@@ -550,16 +553,16 @@ Public Sub ScrollArea_Arrange() ...@@ -550,16 +553,16 @@ Public Sub ScrollArea_Arrange()
If $bHorizontal Then If $bHorizontal Then
$iGridHeight = Max(8, $iIconSize) + 16 $iGridHeight = Max(DS, $iIconSize) + DS * 2
$iGridHeight = Max($iGridHeight, Me.Font.Height * $iIconLines + 8) $iGridHeight = Max($iGridHeight, Me.Font.Height * $iIconLines + DS)
If $iGridSize Then If $iGridSize Then
$iGridWidth = $iGridSize * Desktop.Scale $iGridWidth = $iGridSize * DS
Else Else
$iGridWidth = $iIconSize + 16 $iGridWidth = $iIconSize + DS * 2
Endif Endif
$iGridWidth = Max($iGridWidth, $iIconSize + 8) $iGridWidth = Max($iGridWidth, $iIconSize + DS)
$nColumn = Max(1, (H - $iPad * 2) \ $iGridHeight) $nColumn = Max(1, (H - $iPad * 2) \ $iGridHeight)
nRow = ($aItems.Count + $nColumn - 1) \ $nColumn nRow = ($aItems.Count + $nColumn - 1) \ $nColumn
...@@ -574,14 +577,14 @@ Public Sub ScrollArea_Arrange() ...@@ -574,14 +577,14 @@ Public Sub ScrollArea_Arrange()
Else Else
$iGridHeight = Max(8, $iIconSize) + $iIconLines * Me.Font.Height + 28 $iGridHeight = Max(DS * 4, $iIconSize) + $iIconLines * Me.Font.Height + DS * 3
If $iGridSize Then If $iGridSize Then
$iGridWidth = $iGridSize * Desktop.Scale $iGridWidth = $iGridSize * DS
Else Else
$iGridWidth = $iIconSize + 16 $iGridWidth = $iIconSize + DS * 2
Endif Endif
$iGridWidth = Max($iGridWidth, Me.Font.Height * 8) $iGridWidth = Max($iGridWidth, Me.Font.Height * DS)
$nColumn = Max(1, (W - $iPad * 2) \ $iGridWidth) $nColumn = Max(1, (W - $iPad * 2) \ $iGridWidth)
$iGridWidth = Max(1, (W - $iPad * 2) \ $nColumn) $iGridWidth = Max(1, (W - $iPad * 2) \ $nColumn)
......
...@@ -259,6 +259,18 @@ Private Sub DrawText(sText As String, sRichText As String, X As Float, Y As Floa ...@@ -259,6 +259,18 @@ Private Sub DrawText(sText As String, sRichText As String, X As Float, Y As Floa
End End
Private Sub GetIconSize(ByRef PW As Integer, ByRef PH As Integer)
If $hPicture Then
PW = $hPicture.W
PH = $hPicture.H
Else
PW = Max(Desktop.Scale * 4, GetIconView().IconSize)
PH = PW
Endif
End
Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizontal As Boolean, bFocus As Boolean, bHover As Boolean, bCurrent As Boolean) Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizontal As Boolean, bFocus As Boolean, bHover As Boolean, bCurrent As Boolean)
...@@ -266,7 +278,10 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -266,7 +278,10 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
Dim iColor As Integer Dim iColor As Integer
Dim bFrame As Boolean Dim bFrame As Boolean
Dim sText As String Dim sText As String
Dim hRect1, hRect2 As Rect Dim hRect1, hRect2, hRectBg As Rect
Dim DS As Integer
DS = Desktop.Scale
hRect.Adjust(2) hRect.Adjust(2)
...@@ -274,10 +289,7 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -274,10 +289,7 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
bFrame = True bFrame = True
Endif Endif
If $hPicture Then GetIconSize(ByRef PW, ByRef PH)
PW = $hPicture.W
PH = $hPicture.H
Endif
'iColor = hIconView.Background 'iColor = hIconView.Background
'If iColor = Color.Default Then iColor = Color.TextBackground 'If iColor = Color.Default Then iColor = Color.TextBackground
...@@ -312,8 +324,11 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -312,8 +324,11 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
' Paint.Rectangle(hRect.X + 0.5, hRect.Y + 0.5, hRect.W, hRect.H) ' Paint.Rectangle(hRect.X + 0.5, hRect.Y + 0.5, hRect.W, hRect.H)
' Paint.Stroke ' Paint.Stroke
hClip.Adjust(-1) 'hClip.Adjust(-1)
hRect.Adjust(Desktop.Scale, Desktop.Scale \ 2) hRectBg = hRect.Copy()
hRectBg.Adjust(1)
hRect.Adjust(DS, DS \ 2)
If bHorizontal Then If bHorizontal Then
...@@ -327,7 +342,7 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -327,7 +342,7 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
If Not sText Then sText = Html($sText) If Not sText Then sText = Html($sText)
H = hIconView.Font.RichTextHeight(sText, W) H = hIconView.Font.RichTextHeight(sText, W)
HT = hRect.H + Desktop.Scale \ 2 HT = hRect.H + DS \ 2
If H > HT Then If H > HT Then
sText = Paint.TrimRichText(sText, W, HT) sText = Paint.TrimRichText(sText, W, HT)
...@@ -338,12 +353,15 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -338,12 +353,15 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
Endif Endif
Paint.ClipRect = hClip
hRect1 = hRectBg.Copy()
'hRect1.Adjust(1)
GoSub PAINT_BACKGROUND
hRect1 = hClip.Copy() hRect1 = hClip.Copy()
hRect1.Adjust(1) hRect1.Adjust(1)
GoSub PAINT_BACKGROUND
Paint.ClipRect = hClip
If System.RightToLeft Then If System.RightToLeft Then
If $hPicture Then If $hPicture Then
...@@ -372,7 +390,7 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -372,7 +390,7 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
Else Else
Y = hRect.Y Y = hRect.Y
If $hPicture Then Y += $hPicture.H + 4 Y += PH + DS \ 2
If $sText Or If $sRichText Then If $sText Or If $sRichText Then
...@@ -391,8 +409,8 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -391,8 +409,8 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
Endif Endif
If $hPicture Then hRect1 = Rect(hRect.X + (hRect.W - PW) / 2 - 4, hRect.Y - 4, PW + 8, PH + 8) hRect1 = Rect(hRect.X + (hRect.W - PW) / 2 - DS \ 2, hRect.Y - DS \ 2, PW + DS, PH + DS)
If $sText Or If $sRichText Then hRect2 = Rect(hRect.X - 4, Y - 6, hRect.W + 8, hIconView.Font.RichTextHeight(sText, hRect.W) + 10) If $sText Or If $sRichText Then hRect2 = Rect(hRect.X - DS \ 2, Y - DS \ 2, hRect.W + DS, hIconView.Font.RichTextHeight(sText, hRect.W) + DS)
GoSub PAINT_BACKGROUND GoSub PAINT_BACKGROUND
'Paint.Save 'Paint.Save
...@@ -423,8 +441,8 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta ...@@ -423,8 +441,8 @@ Public Sub _Draw(hRect As Rect, hClip As Rect, hIconView As IconView, bHorizonta
PAINT_RECTS: PAINT_RECTS:
If hRect1 Then Paint.Rectangle(hRect1.X, hRect1.Y, hRect1.W, hRect1.H, 6) If hRect1 Then Paint.Rectangle(hRect1.X, hRect1.Y, hRect1.W, hRect1.H, Desktop.Scale / 2)
If hRect2 Then Paint.Rectangle(hRect2.X, hRect2.Y, hRect2.W, hRect2.H, 6) If hRect2 Then Paint.Rectangle(hRect2.X, hRect2.Y, hRect2.W, hRect2.H, Desktop.Scale / 2)
Return Return
PAINT_BACKGROUND: PAINT_BACKGROUND:
...@@ -434,21 +452,30 @@ PAINT_BACKGROUND: ...@@ -434,21 +452,30 @@ PAINT_BACKGROUND:
Paint.Save Paint.Save
Paint.ClipRect = hClip Paint.ClipRect = hClip
If bHover And If Not $bSelected Then If bHover Then
GoSub PAINT_RECTS GoSub PAINT_RECTS
Paint.Background = GetBackground(hIconView, True, bFocus) If bCurrent Or If $bSelected Then
Paint.LineWidth = 1 Paint.Background = Color.Merge(iColor, Color.TextForeground, 0.2)
Paint.Stroke Else
Paint.Background = GetBackground(hIconView, True, bFocus)
Endif
Paint.Fill 'LineWidth = 1
'Paint.Stroke
Else If bCurrent Then
Endif
If bCurrent Then
GoSub PAINT_RECTS GoSub PAINT_RECTS
Paint.Background = Color.Merge(iColor, Color.TextForeground, 0.1) Paint.Background = Color.Merge(iColor, Color.TextForeground, 0.1)
Paint.Fill Paint.Fill
Endif
If bCurrent Or If bHover Then
If hRect1 Then hRect1.Adjust(1) If hRect1 Then hRect1.Adjust(1)
If hRect2 Then hRect2.Adjust(1) If hRect2 Then hRect2.Adjust(1)
Endif Endif
GoSub PAINT_RECTS GoSub PAINT_RECTS
...@@ -523,13 +550,7 @@ Public Sub _Intersect(hRect As Rect, hOther As Rect, bHorizontal As Boolean) As ...@@ -523,13 +550,7 @@ Public Sub _Intersect(hRect As Rect, hOther As Rect, bHorizontal As Boolean) As
Else Else
If $hPicture Then GetIconSize(ByRef PW, ByRef PH)
PW = $hPicture.W
PH = $hPicture.H
Else If Not $sText Then
PW = 8
PH = 8
Endif
YT = hRect.Y YT = hRect.Y
...@@ -564,13 +585,7 @@ Public Sub _Inside(hRect As Rect, hIconView As IconView, bHorizontal As Boolean, ...@@ -564,13 +585,7 @@ Public Sub _Inside(hRect As Rect, hIconView As IconView, bHorizontal As Boolean,
Else Else
If $hPicture Then GetIconSize(ByRef PW, ByRef PH)
PW = $hPicture.W
PH = $hPicture.H
Else If Not $sText Then
PW = 8
PH = 8
Endif
YT = hRect.Y YT = hRect.Y
......
...@@ -19,10 +19,9 @@ ...@@ -19,10 +19,9 @@
} }
} }
{ IconView1 IconView { IconView1 IconView
MoveScaled(3,13,42,31) MoveScaled(3,13,38,31)
Expand = True Expand = True
Mode = Select.Multiple Mode = Select.Multiple
Orientation = Arrange.Horizontal
Sorted = True Sorted = True
Editable = True Editable = True
GridSize = 24 GridSize = 24
......