Skip to content

Commit

Permalink
fixed ui and bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nokse22 committed Jan 18, 2024
1 parent f14085d commit 81ebf79
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions ascii-draw-window.cmb
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@
(1,300,"GtkWidget","css-classes","card",None,None,None,None,None,None,None,None,None),
(1,304,"GtkButton","label","Enter",1,None,None,None,None,None,None,None,None),
(1,304,"GtkWidget","css-classes","suggested-action",None,None,None,None,None,None,None,None,None),
(1,307,"GtkBox","spacing","6",None,None,None,None,None,None,None,None,None),
(1,307,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(1,307,"GtkWidget","margin-bottom","6",None,None,None,None,None,None,None,None,None),
(1,307,"GtkWidget","margin-end","6",None,None,None,None,None,None,None,None,None),
Expand Down
1 change: 1 addition & 0 deletions data/ui/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@
<property name="margin-start">6</property>
<property name="margin-top">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
</object>
</child>
</object>
Expand Down
4 changes: 2 additions & 2 deletions src/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(self, _styles, _flip):

self.scale_factor = 1

self.is_saved = False
self.is_saved = True

@GObject.Property(type=bool, default=True)
def primary_selected(self):
Expand Down Expand Up @@ -391,7 +391,7 @@ def set_content(self, content):
# toast = Adw.Toast(title=_("Opened file exceeds the maximum canvas size"))
# self.toast_overlay.add_toast(toast)
self.change_canvas_size(max(max_chars, 10), max(num_lines - 1, 5))
self.clear_canvas()
self.clear_preview()
self.__draw_text(0, 0, content, False, False, self.drawing)

def top_horizontal(self):
Expand Down
2 changes: 1 addition & 1 deletion src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def on_open_file_response(self, dialog, response):
print(f"Error reading {path}.")

def on_save_changes_message_response(self, dialog, task, callback=None):
response = _dialog.choose_finish(task)
response = dialog.choose_finish(task)
print(f'Selected "{response}" response.')
match response:
case "discard":
Expand Down

0 comments on commit 81ebf79

Please sign in to comment.