From d5320defab377ac124a97a384e00cb01f250c126 Mon Sep 17 00:00:00 2001 From: Rohit Vishwakrma Date: Wed, 8 May 2024 21:38:34 +0530 Subject: [PATCH] bug fix --- components/sidemenu/side_menu.kv | 8 ++++---- components/widgets/notify.py | 5 +++-- ide-workspace/app.py | 9 +++++++-- main.py | 6 +++--- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/components/sidemenu/side_menu.kv b/components/sidemenu/side_menu.kv index e56f16a..5decbc4 100644 --- a/components/sidemenu/side_menu.kv +++ b/components/sidemenu/side_menu.kv @@ -33,7 +33,7 @@ group: "side_tabs" size_hint: 1, None height: "50dp" - source: "./assets/navigations/document-files-white.jpg" if self.state == "normal" else "./assets/navigations/document-files-pink.jpg" + source: "assets/navigations/document-files-white.jpg" if self.state == "normal" else "assets/navigations/document-files-pink.jpg" on_press: root.left_tab_state(self) app.on_left_tab_state(self) @@ -41,7 +41,7 @@ LeftTabs: id: search name: "search" - source: "./assets/navigations/magnifying-glass-white.jpg" if self.state == "normal" else "./assets/navigations/magnifying-glass-pink.jpg" + source: "assets/navigations/magnifying-glass-white.jpg" if self.state == "normal" else "assets/navigations/magnifying-glass-pink.jpg" group: "side_tabs" size_hint: 1, None height: "50dp" @@ -55,13 +55,13 @@ height: f"{Window.height-260}dp" if Window.height - 260 > 8 else 0 LeftTabs: state: "down" - source: "./assets/navigations/terminal-white.jpg" if self.state == "normal" else "assets/navigations/terminal-pink.jpg" + source: "assets/navigations/terminal-white.jpg" if self.state == "normal" else "assets/navigations/terminal-pink.jpg" size_hint: 1, None height: "50dp" text: "terminal" on_press: app.open_console_and_close(self) LeftTabs: - source: "./assets/navigations/info-white.jpg" if self.state == "normal" else "./assets/navigations/info-pink.jpg" + source: "assets/navigations/info-white.jpg" if self.state == "normal" else "assets/navigations/info-pink.jpg" size_hint: 1, None height: "50dp" text: "about" diff --git a/components/widgets/notify.py b/components/widgets/notify.py index 7426a26..c665fda 100644 --- a/components/widgets/notify.py +++ b/components/widgets/notify.py @@ -9,8 +9,9 @@ def __init__(self, **kwargs): self.add_widget(Label(text="Saved", color="green")) self.size_hint = (None, None) self.width = "100dp" - self.height = "60dp" - self.pos_hint = {'center_x': .5, 'center_y': .95} + self.height = "40dp" + self.background_color = (60/255, 48/255, 72/255, 1) + self.pos_hint = {'center_x': .5, 'center_y': .98} self.overlay_color = (0, 0, 0, 0) self.open() diff --git a/ide-workspace/app.py b/ide-workspace/app.py index 1f3289a..1324126 100644 --- a/ide-workspace/app.py +++ b/ide-workspace/app.py @@ -1,4 +1,3 @@ -#global m m = 10 def h(): @@ -6,4 +5,10 @@ def h(): print(s) print(m) -h() \ No newline at end of file +h() +class S: + g = 2 + def __init__(self): + print(m, "rohit") + print(g, "rohit") +S() \ No newline at end of file diff --git a/main.py b/main.py index 5a5747a..778edf9 100644 --- a/main.py +++ b/main.py @@ -252,7 +252,7 @@ def run_code(self): old_stdout = sys.stdout new_stdout = io.StringIO() sys.stdout = new_stdout - exec(code, globals()) + exec(code, locals(), globals()) output = new_stdout.getvalue() sys.stdout = old_stdout # print(output) @@ -287,8 +287,8 @@ def save_active_file_from_header(self): with open(self.current_tabs_active_file_path, "w") as f: f.write(self.current_tabs_active_code) - from components.widgets.notify import Notify - obj = Notify() + from components.widgets.notify import Notify + obj = Notify() def _current_tabs_active_code(self, code): self.current_tabs_active_code = code