alex0112 / abacus

UVSim implementation by Group L
2 stars 0 forks source link

Feature/gui control panel layout: UI Layout Enhancements #92

Closed jjacobsonn closed 3 months ago

jjacobsonn commented 3 months ago

Description

This pull request introduces several key enhancements to the UVSim GUI, focusing on layout improvements, adding borders to control sections, and ensuring better user experience during file selection and simulation control. Below are the specific changes made:

Screenshot 2024-07-07 at 9 16 04 PM
  1. Addition of Boxes (Borders) and Headers:

    • Borders and Headers: Added borders around the different sections in the UVSim Control Panel using tk.LabelFrame. Each section now has a descriptive header centered at the top, improving the visual structure and clarity.
    • Program Control Panel: Contains buttons for starting simulation, step execution, halting, help, and selecting test files.
    • Memory Display: Displays the memory contents.
    • Control Panel: Shows the current instruction.
    • Current Instruction Panel: Displays the current instruction in execution.
    • User Input Panel: Allows users to provide input during simulation.
  2. Improved Layout and Spacing on UVSim Control Panel:

    • Memory Display and Program Control Panel Alignment: Placed the Memory Display and Program Control Panel side by side in the top row.
    • Hierarchical Panel Placement: Positioned the Current Instruction Panel below the Memory Display and Program Control Panel. Below the Current Instruction Panel, placed the Output Panel and the User Input Panel in sequence, ensuring a logical flow and clear hierarchy.
  3. Ensuring Select Test File Frame Appears Correctly:

    • Immediate Appearance of Select Test File Frame: Modified the start_program method to ensure the Select Test File frame appears directly without the need for resizing. Added self.root.update_idletasks() to force the window to update its size immediately.
    • Resizing and Padding Adjustments: Enhanced the padding for the Select Test File frame using padx=20 and pady=20 to prevent the frame from appearing squished and to provide adequate spacing.
  4. Addition of Output Panel Box on HALT:

    • Output Panel Update on HALT: Added functionality to display the Output Panel when the HALT button is clicked. The Output Panel provides feedback and displays any relevant output from the simulation.