From 3fc0e8a1a4ae07cd89d47743457d3681b5252898 Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Tue, 10 Oct 2023 18:29:47 +0200 Subject: [PATCH] Improve documentation --- app/lib/selections/utilities.dart | 3 +++ app/lib/views/app_bar.dart | 9 ++++---- docs/docs/background.md | 17 ++++++++++++++- docs/docs/storage.md | 9 ++++++++ docs/docs/tools/select.md | 2 +- docs/docs/tools/shape.md | 2 ++ docs/docs/tools/texture.md | 4 ++++ docs/docs/utilities.md | 21 +++++++++++++++++-- .../metadata/android/en-US/changelogs/74.txt | 1 + 9 files changed, 60 insertions(+), 8 deletions(-) diff --git a/app/lib/selections/utilities.dart b/app/lib/selections/utilities.dart index 1e5f7dfea60c..e26a4072d505 100644 --- a/app/lib/selections/utilities.dart +++ b/app/lib/selections/utilities.dart @@ -10,6 +10,9 @@ class UtilitiesSelection extends Selection { String getLocalizedName(BuildContext context) => AppLocalizations.of(context).document; + @override + List get help => ['utilities']; + @override List buildProperties(BuildContext context) { final cubit = context.read(); diff --git a/app/lib/views/app_bar.dart b/app/lib/views/app_bar.dart index 4a009873b7ca..34a69ed0f715 100644 --- a/app/lib/views/app_bar.dart +++ b/app/lib/views/app_bar.dart @@ -121,14 +121,15 @@ class _AppBarTitle extends StatelessWidget { final cubit = context.read(); final settings = context.read().state; final location = cubit.state.location; + final fileSystem = DocumentFileSystem.fromPlatform( + remote: settings.getRemote(location.remote)); - await DocumentFileSystem.fromPlatform( - remote: settings.getRemote(location.remote)) - .deleteAsset(location.path); + await fileSystem.deleteAsset(location.path); cubit.setSaveState( location: location.copyWith( - path: '${location.parent}/$value.bfly', + path: + '${location.parent}/${fileSystem.convertNameToFile(value)}.bfly', )); if (state is DocumentLoadSuccess) await state.save(); bloc.add(DocumentDescriptionChanged(name: value)); diff --git a/docs/docs/background.md b/docs/docs/background.md index a8ba3340dad0..b97a68cc9d9e 100644 --- a/docs/docs/background.md +++ b/docs/docs/background.md @@ -4,12 +4,27 @@ sidebar_position: 2 title: Background --- +There are two different types of backgrounds. + +### Pattern + You can customize the background of the paper. Click on the background icon in the view dialog to add it. There are 8 different background templates available. -## Configuration +### Configuration Width and height are the general settings of the box. Additionally, you can customize the color of the background. + +The count and spacing property allows you to create music paper. +For music paper, set count to 5 and spacing to more than the width. + +## Image + +The image background type allows you to use an image as background. + +### Configuration + +The scale in x and y direction can be changed if this image to small or big. diff --git a/docs/docs/storage.md b/docs/docs/storage.md index 75c897bac557..e539e041599d 100644 --- a/docs/docs/storage.md +++ b/docs/docs/storage.md @@ -3,6 +3,15 @@ title: "Storage" sidebar_position: 2 --- +## Data directory + +The data directory is the directory where documents, templates and packs are stored. +On the desktop you can found it in `~/Documents/Linwood/Butterfly`. +On mobile it's in `getExternalFilesDir(null)/Linwood/Butterfly`. +You can also change it in the settings under `Data`. + +In this directory you will find a folder `Documents`, `Templates` and `Packs`. + ## Web The application data is stored in your browser. It is stored in a local storage. diff --git a/docs/docs/tools/select.md b/docs/docs/tools/select.md index 0139f07d5eb0..f8fff5c48c86 100644 --- a/docs/docs/tools/select.md +++ b/docs/docs/tools/select.md @@ -4,7 +4,7 @@ sidebar_label: "Select" --- -With this tool you can select elements and access the background context menu to access the [insert menu](../insert). +With this tool you can select elements. ## Configuration diff --git a/docs/docs/tools/shape.md b/docs/docs/tools/shape.md index a934c8fe45f1..5fd52f6a60e4 100644 --- a/docs/docs/tools/shape.md +++ b/docs/docs/tools/shape.md @@ -8,6 +8,8 @@ sidebar_position: 3 Use this tool to draw shapes on the paper. You can draw rectangles, circles, and other shapes. +Use `ctrl` to have the same height and width and `shift` to draw from the center. + ## Configuration | Property | Default | Description | diff --git a/docs/docs/tools/texture.md b/docs/docs/tools/texture.md index d7259af2d487..7e420a1b96c6 100644 --- a/docs/docs/tools/texture.md +++ b/docs/docs/tools/texture.md @@ -15,3 +15,7 @@ The texture tool allows you to add the background to a small area of the canvas. | Width | 0 | The fixed width of the area. If set to 0, the width will be calculated automatically. | | Height | 0 | The fixed height of the area. If set to 0, the height will be calculated automatically. | | Aspect ratio | 0 | The fixed aspect ratio of the area. If set to 0, the aspect ratio will be calculated automatically. A aspect ratio is defined as width / height. | + +Valid types for texture are: + +* [Pattern](../background#pattern) diff --git a/docs/docs/utilities.md b/docs/docs/utilities.md index 83d5ce3a3d96..601d33a16e40 100644 --- a/docs/docs/utilities.md +++ b/docs/docs/utilities.md @@ -3,10 +3,27 @@ title: "Utilities" sidebar_position: 3 --- -## Grid +This view allows you to change the general document or the view. + +## Project + +Here are all globally properties that you can set like name and description. +Additionally you can capture a thumbnail from the current viewport to see it in the home page. + +## Page + +Here are all page specific properties. Currently you can find the background setting here. + +## View + +### Grid The grid allows you to exactly position elements. You can use it to move elements or create shapes. -## Ruler +### Ruler The ruler allows you to measure the distance between two points. Additionally you can use it to create a line with the pen tool. + +## Camera + +To jump to a specific position or zoom to a specific level you can use this tab. diff --git a/fastlane/metadata/android/en-US/changelogs/74.txt b/fastlane/metadata/android/en-US/changelogs/74.txt index 866e3e3e3ac5..a510c262309e 100644 --- a/fastlane/metadata/android/en-US/changelogs/74.txt +++ b/fastlane/metadata/android/en-US/changelogs/74.txt @@ -5,5 +5,6 @@ * Change the zoom slider to operate in realtime in style view * Change reload button icon in remote button * Rename document directory to data directory +* Improve documentation View all changes in the blog: https://linwood.dev/butterfly/2.0.0-beta.10 \ No newline at end of file