diff --git a/data/com.github.lainsce.quilter.appdata.xml.in b/data/com.github.lainsce.quilter.appdata.xml.in index 83084124..76b09b7d 100644 --- a/data/com.github.lainsce.quilter.appdata.xml.in +++ b/data/com.github.lainsce.quilter.appdata.xml.in @@ -55,6 +55,14 @@ none + + +

Release: Sidebar File Cleaner-o-matic

+
    +
  • Added: "Remove All Files" button on the sidebar, this way, no files will be harmed with the old close file buttons.
  • +
+
+

Release: Export without Errors

diff --git a/data/images/shot-dark.png b/data/images/shot-dark.png index bec93963..8a717b99 100644 Binary files a/data/images/shot-dark.png and b/data/images/shot-dark.png differ diff --git a/data/images/shot-focused.png b/data/images/shot-focused.png index 6be68b8b..704cd061 100644 Binary files a/data/images/shot-focused.png and b/data/images/shot-focused.png differ diff --git a/data/images/shot-preview.png b/data/images/shot-preview.png index 072f8924..a39b152b 100644 Binary files a/data/images/shot-preview.png and b/data/images/shot-preview.png differ diff --git a/data/images/shot-sepia.png b/data/images/shot-sepia.png index 04be3d69..65bbad8f 100644 Binary files a/data/images/shot-sepia.png and b/data/images/shot-sepia.png differ diff --git a/data/images/shot.png b/data/images/shot.png index 6616bf35..7fca9a69 100644 Binary files a/data/images/shot.png and b/data/images/shot.png differ diff --git a/data/styles/app-main-stylesheet.css b/data/styles/app-main-stylesheet.css index 2090833e..86f84d9e 100644 --- a/data/styles/app-main-stylesheet.css +++ b/data/styles/app-main-stylesheet.css @@ -174,10 +174,13 @@ actionbar, .quilter-sidebar-button { border-top: 1px solid alpha (#000, 0.25); - border-right: 1px solid alpha (#000, 0.25); background: @colorPrimary; border-radius: 0; - padding: 2px; + padding: 4px; +} + +.quilter-sidebar-button:hover { + background: alpha (mix (@bg_color, @accentColor, 0.5), 0.58); } .quilter-sidebar-button:active, diff --git a/meson.build b/meson.build index 575c1384..f7d36702 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ # Name our project project('com.github.lainsce.quilter', ['vala', 'c'], - version: '1.9.1' + version: '1.9.2' ) # Import main lib files diff --git a/src/Styles/quilter.vala b/src/Styles/quilter.vala index 554b9547..ddcef8d8 100644 --- a/src/Styles/quilter.vala +++ b/src/Styles/quilter.vala @@ -195,10 +195,6 @@ public class Quilter.Styles.quilter { font-size: 18px; } - ul, ol { - margin-left: -40px; - } - hr { overflow: visible; padding: 0; diff --git a/src/Styles/quilterdark.vala b/src/Styles/quilterdark.vala index 0636698d..a8b6d6d0 100644 --- a/src/Styles/quilterdark.vala +++ b/src/Styles/quilterdark.vala @@ -196,10 +196,6 @@ public class Quilter.Styles.quilterdark { font-size: 18px; } - ul, ol { - margin-left: -40px; - } - hr { overflow: visible; padding: 0; diff --git a/src/Styles/quiltermoon.vala b/src/Styles/quiltermoon.vala index 842ebffe..7569cc4e 100644 --- a/src/Styles/quiltermoon.vala +++ b/src/Styles/quiltermoon.vala @@ -196,10 +196,6 @@ public class Quilter.Styles.quiltermoon { font-size: 18px; } - ul, ol { - margin-left: -40px; - } - hr { overflow: visible; padding: 0; diff --git a/src/Styles/quiltersepia.vala b/src/Styles/quiltersepia.vala index 20d99861..2a450ab0 100644 --- a/src/Styles/quiltersepia.vala +++ b/src/Styles/quiltersepia.vala @@ -195,10 +195,6 @@ public class Quilter.Styles.quiltersepia { font-size: 18px; } - ul, ol { - margin-left: -40px; - } - hr { overflow: visible; padding: 0; diff --git a/src/Widgets/SideBar.vala b/src/Widgets/SideBar.vala index 18522b9a..fd02cdeb 100644 --- a/src/Widgets/SideBar.vala +++ b/src/Widgets/SideBar.vala @@ -137,12 +137,33 @@ namespace Quilter.Widgets { } }); + var file_clean_button = new Gtk.Button (); + var fcb_context = file_clean_button.get_style_context (); + fcb_context.add_class ("quilter-sidebar-button"); + file_clean_button.always_show_image = true; + file_clean_button.vexpand = false; + file_clean_button.hexpand = false; + file_clean_button.valign = Gtk.Align.CENTER; + file_clean_button.tooltip_text = "Removes files from the Sidebar, leaving it empty again.\nNo files will be saved however!"; + file_clean_button.set_label (_("Remove All Files")); + var file_clean_button_style_context = file_clean_button.get_style_context (); + file_clean_button_style_context.add_class (Gtk.STYLE_CLASS_FLAT); + file_clean_button.set_image (new Gtk.Image.from_icon_name ("edit-clear-all-symbolic", Gtk.IconSize.LARGE_TOOLBAR)); + + file_clean_button.clicked.connect (() => { + delete_row (); + win.edit_view_content.buffer.text = ""; + Services.FileManager.file = null; + win.toolbar.set_subtitle (_("No Documents Open")); + }); + column.show_all (); files_grid = new Gtk.Grid (); files_grid.hexpand = false; files_grid.set_size_request (280, -1); files_grid.attach (column, 0, 0, 1, 1); + files_grid.attach (file_clean_button, 0, 1, 1, 1); files_grid.show_all (); return files_grid; } @@ -253,6 +274,12 @@ namespace Quilter.Widgets { return filebox; } + public void delete_row () { + foreach (Gtk.Widget item in column.get_children ()) { + item.destroy (); + } + } + public int list_sort (Gtk.ListBoxRow first_row, Gtk.ListBoxRow second_row) { var row_1 = first_row; var row_2 = second_row; diff --git a/src/Widgets/SideBarBox.vala b/src/Widgets/SideBarBox.vala index 02e5d0f2..be7b920c 100644 --- a/src/Widgets/SideBarBox.vala +++ b/src/Widgets/SideBarBox.vala @@ -77,20 +77,6 @@ namespace Quilter.Widgets { var file_icon = new Gtk.Image.from_icon_name ("text-markdown", Gtk.IconSize.LARGE_TOOLBAR); - var file_remove_button = new Gtk.Button(); - var file_remove_button_c = file_remove_button.get_style_context (); - file_remove_button_c.add_class ("flat"); - file_remove_button_c.add_class ("quilter-task-button"); - file_remove_button_c.add_class ("color-button"); - file_remove_button.has_focus = false; - file_remove_button.has_tooltip = true; - file_remove_button.valign = Gtk.Align.CENTER; - file_remove_button.hexpand = true; - file_remove_button.set_size_request (24,24); - file_remove_button.halign = Gtk.Align.END; - file_remove_button.set_image (new Gtk.Image.from_icon_name ("window-close-symbolic",Gtk.IconSize.BUTTON)); - file_remove_button.tooltip_text = (_("Remove File")); - file_grid = new Gtk.Grid (); file_grid.hexpand = false; file_grid.row_spacing = 3; @@ -99,59 +85,11 @@ namespace Quilter.Widgets { file_grid.attach (file_icon, 0, 0, 1, 2); file_grid.attach (file_name_label, 1, 0, 1, 1); file_grid.attach (file_label, 1, 1, 1, 1); - file_grid.attach (file_remove_button, 2, 0, 1, 2); - - file_remove_button.clicked.connect (() => { - var dialog = new Services.DialogUtils.Dialog2 (); - dialog.transient_for = win; - dialog.response.connect ((response_id) => { - switch (response_id) { - case Gtk.ResponseType.OK: - debug ("User saves the file."); - save_as (); - delete_row (); - dialog.close (); - win.edit_view_content.buffer.text = ""; - win.edit_view_content.buffer.set_modified (false); - Services.FileManager.file = null; - win.toolbar.set_subtitle (_("No Documents Open")); - Widgets.SideBar.get_instance ().store.clear (); - break; - case Gtk.ResponseType.NO: - delete_row (); - dialog.close (); - win.edit_view_content.buffer.text = ""; - win.edit_view_content.buffer.set_modified (false); - Services.FileManager.file = null; - win.toolbar.set_subtitle (_("No Documents Open")); - Widgets.SideBar.get_instance ().store.clear (); - break; - case Gtk.ResponseType.CANCEL: - case Gtk.ResponseType.CLOSE: - case Gtk.ResponseType.DELETE_EVENT: - dialog.close (); - break; - default: - assert_not_reached (); - } - }); - if (win.edit_view_content.buffer.get_modified () == true) { - dialog.run (); - } else if (win.edit_view_content.buffer.get_modified () == false) { - delete_row (); - win.edit_view_content.buffer.text = ""; - Services.FileManager.file = null; - win.toolbar.set_subtitle (_("No Documents Open")); - } - }); this.add (file_grid); this.hexpand = true; this.show_all (); this.path = path; } - public void delete_row () { - this.destroy (); - } } } diff --git a/src/Widgets/WebView.vala b/src/Widgets/WebView.vala index 5ba72e78..3870ff00 100644 --- a/src/Widgets/WebView.vala +++ b/src/Widgets/WebView.vala @@ -213,6 +213,8 @@ namespace Quilter.Widgets { string processed_mk; process_frontmatter (buf.text, out processed_mk); var mkd = new Markdown.Document.gfm_format (processed_mk.data, + 0x00001000 + + 0x00002000 + 0x00004000 + 0x00200000 + 0x00400000 + @@ -221,7 +223,9 @@ namespace Quilter.Widgets { 0x04000000 + 0x10000000 + 0x40000000); - mkd.compile (0x00004000 + + mkd.compile (0x00001000 + + 0x00002000 + + 0x00004000 + 0x00200000 + 0x00400000 + 0x02000000 +