diff --git a/data/ascii-draw.gresource.xml b/data/ascii-draw.gresource.xml
index 7840215..4b846d9 100644
--- a/data/ascii-draw.gresource.xml
+++ b/data/ascii-draw.gresource.xml
@@ -22,6 +22,7 @@
icons/16x16/actions/line-style-symbolic.svg
icons/16x16/actions/edit-undo-symbolic.svg
icons/16x16/actions/fill-tool-symbolic.svg
+ icons/16x16/actions/right-large-symbolic.svg
ui/eraser_sidebar.ui
ui/freehand_sidebar.ui
diff --git a/data/icons/16x16/actions/right-large-symbolic.svg b/data/icons/16x16/actions/right-large-symbolic.svg
new file mode 100644
index 0000000..3d76598
--- /dev/null
+++ b/data/icons/16x16/actions/right-large-symbolic.svg
@@ -0,0 +1,2 @@
+
+
diff --git a/data/style-dark.css b/data/style-dark.css
index 7c0e279..20f23c6 100644
--- a/data/style-dark.css
+++ b/data/style-dark.css
@@ -10,6 +10,6 @@
linear-gradient(to bottom, #333333 1px, transparent 1px);
box-shadow:
inset 0px 0px 0px 1px #555555,
- 0px 0px 10px 10px @headerbar_shade_color;
+ 0px 0px 6px 6px @headerbar_shade_color;
opacity:0.4;
}
diff --git a/data/style.css b/data/style.css
index 7cf58c7..e6cf3a0 100644
--- a/data/style.css
+++ b/data/style.css
@@ -16,7 +16,7 @@
linear-gradient(to bottom, #aaaaaa 1px, transparent 1px);
box-shadow:
inset 0px 0px 0px 1px #777777,
- 0px 0px 10px 10px @headerbar_shade_color;
+ 0px 0px 6px 6px @headerbar_shade_color;
opacity:0.4;
}
.ascii {
diff --git a/data/ui/unicode_tooltip.ui b/data/ui/unicode_tooltip.ui
index fcb5aeb..c8f5f02 100644
--- a/data/ui/unicode_tooltip.ui
+++ b/data/ui/unicode_tooltip.ui
@@ -13,7 +13,6 @@
12
diff --git a/data/ui/window.ui b/data/ui/window.ui
index 875abd0..aeab8dd 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -8,128 +8,56 @@
480
360
+ ASCII Draw
+
+
+
+
+
+
-
+
+
+ 360.0
+ 300.0
+ True
+ end
+ 0.45
+ px
-
-
-
-
- 360.0
- 300.0
- True
-
-
+
-
- vertical
-
-
-
-
+
-
-
-
-
- end
- 0.45
- px
-
-
- raised
-
-
-
-
+
-
-
-
-
-
-
+
+
+
6
6
6
@@ -370,8 +241,176 @@ ascii
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ vertical
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/window.py b/src/window.py
index e24e3c3..c08087e 100644
--- a/src/window.py
+++ b/src/window.py
@@ -39,15 +39,17 @@
class AsciiDrawWindow(Adw.ApplicationWindow):
__gtype_name__ = 'AsciiDrawWindow'
+ overlay_split_view = Gtk.Template.Child()
+
toast_overlay = Gtk.Template.Child()
- chars_carousel = Gtk.Template.Child()
- char_group_label = Gtk.Template.Child()
- char_carousel_go_back = Gtk.Template.Child()
- char_carousel_go_next = Gtk.Template.Child()
+ # Headerbar
undo_button = Gtk.Template.Child()
redo_button = Gtk.Template.Child()
+ save_import_button = Gtk.Template.Child()
+ title_widget = Gtk.Template.Child()
+ # Tools
free_button = Gtk.Template.Child()
rectangle_button = Gtk.Template.Child()
filled_rectangle_button = Gtk.Template.Child()
@@ -63,15 +65,16 @@ class AsciiDrawWindow(Adw.ApplicationWindow):
primary_char_button = Gtk.Template.Child()
secondary_char_button = Gtk.Template.Child()
- save_import_button = Gtk.Template.Child()
- lines_styles_box = Gtk.Template.Child()
-
+ # Sidebar
sidebar_stack = Gtk.Template.Child()
-
sidebar_stack_switcher = Gtk.Template.Child()
+ chars_carousel = Gtk.Template.Child()
+ char_group_label = Gtk.Template.Child()
+ char_carousel_go_back = Gtk.Template.Child()
+ char_carousel_go_next = Gtk.Template.Child()
+ lines_styles_box = Gtk.Template.Child()
- title_widget = Gtk.Template.Child()
-
+ # Canvas side popover
width_spin = Gtk.Template.Child()
height_spin = Gtk.Template.Child()
@@ -623,6 +626,10 @@ def undo_first_change(self, *args):
def redo_last_change(self, *args):
self.canvas.redo()
+ @Gtk.Template.Callback("close_sidebar")
+ def close_sidebar(self, *args):
+ self.overlay_split_view.set_show_sidebar(False)
+
def select_rectangle_tool(self):
self.rectangle_button.set_active(True)