Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Oct 10, 2023
1 parent 21de74c commit 3fc0e8a
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 8 deletions.
3 changes: 3 additions & 0 deletions app/lib/selections/utilities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class UtilitiesSelection extends Selection<UtilitiesState> {
String getLocalizedName(BuildContext context) =>
AppLocalizations.of(context).document;

@override
List<String> get help => ['utilities'];

@override
List<Widget> buildProperties(BuildContext context) {
final cubit = context.read<CurrentIndexCubit>();
Expand Down
9 changes: 5 additions & 4 deletions app/lib/views/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ class _AppBarTitle extends StatelessWidget {
final cubit = context.read<CurrentIndexCubit>();
final settings = context.read<SettingsCubit>().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));
Expand Down
17 changes: 16 additions & 1 deletion docs/docs/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
9 changes: 9 additions & 0 deletions docs/docs/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tools/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions docs/docs/tools/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/tools/texture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
21 changes: 19 additions & 2 deletions docs/docs/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/74.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3fc0e8a

Please sign in to comment.