Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 44 additions & 13 deletions PureBasicIDE/UserInterface.pb
Original file line number Diff line number Diff line change
Expand Up @@ -1974,6 +1974,7 @@ EndProcedure


Procedure MainWindowEvents(EventID)
Static LogSplitterState, ToolsSplitterState
Quit = 0

If EventID = #PB_Event_ActivateWindow
Expand Down Expand Up @@ -2068,24 +2069,54 @@ Procedure MainWindowEvents(EventID)
EventGadgetID = EventGadget()
Select EventGadgetID

Case #GADGET_ToolsSplitter ; Resize current ToolsPanel Item
If ToolsPanelVisible And CurrentTool
CurrentTool\ResizeHandler(GetPanelWidth(#GADGET_ToolsPanel), GetPanelHeight(#GADGET_ToolsPanel))
Case #GADGET_ToolsSplitter ; Resize current ToolsPanel Item only if there is a real change in the splitter position (uncomment debug to check)
ToolsSplitterCurrentState = GetGadgetState(#GADGET_ToolsSplitter)
If ToolsSplitterCurrentState <> ToolsSplitterState
;Debug "ToolsSplitter State: " +#TAB$+ ToolsSplitterCurrentState +#TAB$+ " New: " + ToolsSplitterState
ToolsSplitterState = ToolsSplitterCurrentState

If ToolsPanelVisible And CurrentTool
CurrentTool\ResizeHandler(GetPanelWidth(#GADGET_ToolsPanel), GetPanelHeight(#GADGET_ToolsPanel))
EndIf

If ErrorLogVisible = 0
UpdateSourceContainer()
EndIf
;Else
;Debug "ToolsSplitter State: " +#TAB$+ ToolsSplitterState +#TAB$+ " (No Change)"
EndIf

If ErrorLogVisible = 0
UpdateSourceContainer()

Case #GADGET_LogSplitter ; Resize current LogPanel Item only if there is a real change in the splitter position (uncomment debug to check)
LogSplitterCurrentState = GetGadgetState(#GADGET_LogSplitter)
If LogSplitterCurrentState <> LogSplitterState
;Debug "LogSplitter State: " +#TAB$+ LogSplitterCurrentState +#TAB$+ " New: " + LogSplitterState
LogSplitterState = LogSplitterCurrentState

If ErrorLogVisible
UpdateSourceContainer()
EndIf
;Else
;Debug "LogSplitter State: " +#TAB$+ LogSplitterState +#TAB$+ " (No Change)"
EndIf

Case #GADGET_LogSplitter
If ErrorLogVisible

Case #GADGET_SourceContainer ; Resize Item only if there is a real change in the splitters positions (uncomment debug to check)
LogSplitterCurrentState = GetGadgetState(#GADGET_LogSplitter)
ToolsSplitterCurrentState = GetGadgetState(#GADGET_ToolsSplitter)
If LogSplitterCurrentState <> LogSplitterState
;Debug "LogSplitter State: " +#TAB$+ LogSplitterCurrentState +#TAB$+ " New: " + LogSplitterState
LogSplitterState = LogSplitterCurrentState

UpdateSourceContainer()
ElseIf ToolsSplitterCurrentState <> ToolsSplitterState
;Debug "ToolsSplitter State: " +#TAB$+ ToolsSplitterCurrentState +#TAB$+ " New: " + ToolsSplitterState
ToolsSplitterState = ToolsSplitterCurrentState

UpdateSourceContainer()
;Else
;Debug "ToolsSplitter State: " +#TAB$+ ToolsSplitterState +#TAB$+ " (No Change)"
;Debug "LogSplitter State: " +#TAB$+ LogSplitterState +#TAB$+ " (No Change)"
EndIf

Case #GADGET_SourceContainer
; only has a resize event
UpdateSourceContainer()

Case #GADGET_FilesPanel
Select EventType()
Case #PB_EventType_RightClick
Expand Down