Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions data/document_preview/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
install_data(
'preview-style.xml',
install_dir: get_option('datadir') / meson.project_name() / 'document_preview',
)
23 changes: 23 additions & 0 deletions data/document_preview/preview-style.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="preview-style" name="Preview Style" version="1.0">
<author>sevonj</author>
<_description>Default Theme for Scratchmark</_description>

<!-- transparent bg -->
<style name="text" background="#00000000" />

<style name="markdown:h1" bold="true" />
<style name="markdown:h2" bold="true" />
<style name="markdown:h3" bold="true" />
<style name="markdown:h4" bold="true" />
<style name="markdown:h5" bold="true" />
<style name="markdown:h6" bold="true" />
<style name="markdown:bold" bold="true" />
<style name="markdown:italic" italic="true" />
<style name="markdown:bold-italic" bold="true" italic="true" />
<style name="markdown:code" />
<style name="markdown:strikethrough" strikethrough="true" />
<!-- TODO style name="markdown:subscript" /-->
<!-- TODO style name="markdown:superscript" /-->

</style-scheme>
1 change: 1 addition & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ test('Validate schema file',
subdir('icons')
subdir('resources')
subdir('editor_schemes')
subdir('document_preview')
subdir('language_specs')
9 changes: 9 additions & 0 deletions data/org.scratchmark.Scratchmark.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
<key name="library-show-sidebar" type="b">
<default>true</default>
</key>
<key name="library-two-column-sidebar" type="b">
<default>true</default>
</key>
<key name="library-sort-method" type="s">
<default>"AlphanumericAsc"</default>
</key>
<key name="library-details-sort-method" type="s">
<default>"AlphanumericAsc"</default>
</key>
<key name="editor-show-sidebar" type="b">
<default>false</default>
</key>
Expand Down
5 changes: 4 additions & 1 deletion data/resources/gresources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
<file preprocess="xml-stripblanks" compressed="true">ui/library/delete_confirm_dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/document_context_menu.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/document_row.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/document_preview_row.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/document_create_popover.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/drafts_context_menu.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/err_placeholder_row_context_menu.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/err_placeholder_row.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/folder_create_popover.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/folder_context_menu.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/folder_row.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/folder_view.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/item_rename_popover.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/library_view.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/project_view.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/library/root_context_menu.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/about_dialog.ui</file>
<file preprocess="xml-stripblanks" compressed="true">ui/editor_placeholder.ui</file>
Expand All @@ -40,6 +41,8 @@
<file preprocess="xml-stripblanks">icons/scalable/actions/folder-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/info-outline-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/library-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/library-sort-asc-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/library-sort-desc-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/library-sort-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/list-compact-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/match-words-symbolic.svg</file>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions data/resources/ui/library/document_preview_row.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="DocumentPreviewRow" parent="GtkListBoxRow">
<property name="width-request">192</property>
<property name="height-request">96</property>
<child>
<object class="GtkBox">
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<child>
<object class="GtkLabel" id="document_name_label">
<property name="label" translatable="no">document-name-here</property>
<property name="xalign">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_END</property>
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD" />
</attributes>
</object>
</child>
<child>
<object class="GtkSourceView" id="view">
<property name="editable">False</property>
<property name="cursor-visible">False</property>
<property name="sensitive">False</property>
</object>
</child>
</object>
</child>
</template>
</interface>
1 change: 0 additions & 1 deletion data/resources/ui/library/document_row.ui
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="DocumentRow" parent="GtkListBoxRow">

<child>
<object class="GtkBox">
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
Expand Down
17 changes: 11 additions & 6 deletions data/resources/ui/library/folder_row.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
<property name="spacing">4</property>
<child>
<object class="GtkImage" id="expand_icon">
<style>
<class name="dim-label" />
</style>
<property name="icon-name">down-small-symbolic</property>
<property name="icon-size">GTK_ICON_SIZE_NORMAL</property>
<object class="AdwBin">
<property name="width-request">16</property>
<child>
<object class="GtkImage" id="expand_icon">
<style>
<class name="dim-label" />
</style>
<property name="icon-name">down-small-symbolic</property>
<property name="icon-size">GTK_ICON_SIZE_NORMAL</property>
</object>
</child>
</object>
</child>
<child>
Expand Down
80 changes: 80 additions & 0 deletions data/resources/ui/library/folder_view.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="FolderView" parent="AdwNavigationPage">
<property name="title" translatable="no">folder-name-here</property>
<property name="child">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<!--property name="show-title">False</property-->
<child type="end">
<object class="GtkMenuButton" id="sort_button">
<property name="icon-name">library-sort-asc-symbolic</property>
<property name="tooltip-text" translatable="yes">Sort</property>
<property name="popover">
<object class="GtkPopoverMenu">
<property name="menu-model">sort_menu</property>
</object>
</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
<property name="vexpand">True</property>
<child>
<object class="GtkLabel" id="empty_placeholder">
<property name="label" translatable="yes">Folder is empty</property>
<style>
<class name="dimmed" />
</style>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="vexpand">True</property>
<property name="hexpand">true</property>
<property name="width-request">256</property>
<child>
<object class="GtkListBox" id="listbox">
<style>
<class name="navigation-sidebar" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</property>
</template>
<menu id="sort_menu">
<section>
<attribute name="label" translatable="yes">Sort</attribute>
<!-- see SortMethod enum-->
<item>
<attribute name="label" translatable="yes">A-Z</attribute>
<attribute name="action">folder-view.sort-method</attribute>
<attribute name="target">AlphanumericAsc</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Z-A</attribute>
<attribute name="action">folder-view.sort-method</attribute>
<attribute name="target">AlphanumericDesc</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Last Modified</attribute>
<attribute name="action">folder-view.sort-method</attribute>
<attribute name="target">ModifiedDesc</attribute>
</item>
<item>
<attribute name="label" translatable="yes">First Modified</attribute>
<attribute name="action">folder-view.sort-method</attribute>
<attribute name="target">ModifiedAsc</attribute>
</item>
</section>
</menu>
</interface>
19 changes: 0 additions & 19 deletions data/resources/ui/library/project_view.ui

This file was deleted.

Loading
Loading