Skip to content

Commit e04e68b

Browse files
committed
Fix battery and window size
1 parent 78a9554 commit e04e68b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

arduino_logique.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424
# Creating main window
2525
win = tk.Tk()
2626
win.title("Laboratoire virtuel de circuit logique - GIF-1002")
27-
win.geometry("1700x800") # Initial window size
27+
win.geometry("1500x800") # Initial window size
2828
win.resizable(False, False) # Disabling window resizing
2929
win.configure(bg="#333333") # Setting consistent background color
3030

breadboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def draw_blank_board_model(self, x_origin: int = 50, y_origin: int = 10, battery
225225
]
226226
self.sketcher.circuit(x_origin, y_origin, scale=self.sketcher.scale_factor, model=blank_board_model)
227227

228-
battery_x = x_origin + 1200 # Adjust as needed for proper positioning
228+
battery_x = x_origin + 1050 # Adjust as needed for proper positioning
229229
battery_y = y_origin + 300 # Adjust as needed for proper positioning
230230

231231
# Reset all matrix elements' states to FREE

component_sketch.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,8 +2764,8 @@ def draw_battery(
27642764
original_width = battery_photo.width()
27652765
original_height = battery_photo.height()
27662766

2767-
new_width = int(original_width * scale * 0.7)
2768-
new_height = int(original_height * scale * 0.7)
2767+
new_width = int(original_width * scale * 0.4)
2768+
new_height = int(original_height * scale * 0.4)
27692769

27702770
scale_x = new_width / original_width
27712771
scale_y = new_height / original_height
@@ -2817,8 +2817,8 @@ def draw_battery(
28172817
if neg_wire_end:
28182818
neg_wire_end_x, neg_wire_end_y = neg_wire_end
28192819
else:
2820-
neg_wire_end_x = neg_wire_start_x - 100 * scale # Wires go to the left
2821-
neg_wire_end_y = neg_wire_start_y
2820+
neg_wire_end_x = neg_wire_start_x - 50 * scale # Wires go to the left
2821+
neg_wire_end_y = neg_wire_start_y - 50 * scale # Wires go up
28222822

28232823
self.draw_battery_wire(
28242824
wire_id=neg_wire_id,
@@ -2834,8 +2834,8 @@ def draw_battery(
28342834
if pos_wire_end:
28352835
pos_wire_end_x, pos_wire_end_y = pos_wire_end
28362836
else:
2837-
pos_wire_end_x = pos_wire_start_x - 100 * scale
2838-
pos_wire_end_y = pos_wire_start_y
2837+
pos_wire_end_x = pos_wire_start_x - 50 * scale
2838+
pos_wire_end_y = pos_wire_start_y + 50 * scale # Wires go down
28392839

28402840
self.draw_battery_wire(
28412841
wire_id=pos_wire_id,

0 commit comments

Comments
 (0)