summaryrefslogtreecommitdiff
path: root/ldmicro/maincontrols.cpp
diff options
context:
space:
mode:
authorRr422018-06-18 13:41:24 +0530
committerRr422018-06-18 13:41:24 +0530
commit28777b68e7479e6515231fc849c61b3748da8712 (patch)
treec7c22de2c9c954bf158d40600175a0da5606184e /ldmicro/maincontrols.cpp
parent9570fa4d9fc0083df2e50c0ca6330847555eee2b (diff)
downloadLDMicroGtk-28777b68e7479e6515231fc849c61b3748da8712.tar.gz
LDMicroGtk-28777b68e7479e6515231fc849c61b3748da8712.tar.bz2
LDMicroGtk-28777b68e7479e6515231fc849c61b3748da8712.zip
Fixed bug in FillRect
Diffstat (limited to 'ldmicro/maincontrols.cpp')
-rw-r--r--ldmicro/maincontrols.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/ldmicro/maincontrols.cpp b/ldmicro/maincontrols.cpp
index a08696f..9ed011a 100644
--- a/ldmicro/maincontrols.cpp
+++ b/ldmicro/maincontrols.cpp
@@ -885,10 +885,33 @@ void GenerateIoListDontLoseSelection(void)
//-----------------------------------------------------------------------------
void MainWindowResized(void)
{
+ RECT main;
+ GetClientRect(DrawWindow, &main);
+
+ RECT status;
+ GetWindowRect(StatusBar, &status);
+ int statusHeight = status.bottom - status.top;
+
+ // MoveWindow(StatusBar, 0, main.bottom - statusHeight, main.right,
+ // statusHeight, TRUE);
+
// Make sure that the I/O list can't disappear entirely.
if(IoListHeight < 30) {
IoListHeight = 30;
}
+ IoListTop = main.bottom ;//- IoListHeight - statusHeight;
+
+ // Make sure that we can't drag the top of the I/O list above the
+ // bottom of the menu bar, because it then becomes inaccessible.
+ if(IoListTop < 5) {
+ IoListHeight = main.bottom - statusHeight - 5;
+ IoListTop = main.bottom - IoListHeight - statusHeight;
+ }
+ // MoveWindow(IoList, 0, IoListTop, main.right, IoListHeight, TRUE);
+
+ RefreshScrollbars();
+
+ InvalidateRect(DrawWindow, NULL, FALSE);
}
//-----------------------------------------------------------------------------