You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,29 @@
2
2
3
3
## [Unreleased]
4
4
5
+
## [v2.0.0] - 25.10.2023
6
+
7
+
### Added
8
+
9
+
- Added default Krita, Photoshop, ArtRage and Leonardo layouts.
10
+
- Now, the toolbar will automatically show up when you enter tablet mode, and hide when you enter desktop mode. This can be disabled in the settings.
11
+
- Added `dock` and `undock` actions that allow to perform toolbar docking with a button instead of a context menu.
12
+
- Added `docked_right`, `docked_left` and `docked_top` options to `visibility` property. Now, buttons can be shown only in some docking modes.
13
+
14
+
### Changed
15
+
16
+
-`layout` action now only needs layout name to be specified instead of its full path (for example, `action layout foxe` instead of `action layout files/layouts/foxe.yaml`). Paths will still work as long as the layout specified is in the `files/layouts` directory.
17
+
- Layout properties `external_theme` and `theme` no longer work. Now, you must select a theme in the context menu independently from a layout. See "Migrating to 2.0" section for the full guide.
18
+
- Theme properties `button_size`, `margin`, `min_opacity`, `max_opacity` have been moved directly to layout yaml. Themes can no longer influence these properties. See "Migrating to 2.0" section for the full guide.
Copy file name to clipboardExpand all lines: README.md
+68-6Lines changed: 68 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,28 +37,28 @@ Grab the latest release from [this page](https://github.com/Martenfur/TabletFrie
37
37
38
38
Let's be honest - the default toolbars will probably not be enough for you. But that's ok. It's you who knows best what you need, this is why Tablet Friend is a great toolbar constructor first and a great toolbar second.
39
39
40
-
First, right-click the tray icon and press the 'open toolbar directory' button.
40
+
First, right-click the tray icon and press the 'open files directory' button.
41
41
42
42

43
43
44
44
This will open a directory with a bunch of `.yaml` files. These are your toolbars - you can open them with any text editor you like. I know, I know, editing some config files directly may seem scary - luckily, Tablet Friend makes it as easy and intuitive as possible.
45
45
46
46
Let's make a new toolbar - create a file named `my_toolbar.yaml` in the `toolbars` directory, open it and paste this inside:
47
47
48
-
```yaml
48
+
```yaml
49
49
buttons:
50
50
cut_button:
51
51
action: ctrl+x
52
52
text: cut
53
53
```
54
54
55
-
Yes, it's that simple. Let's break down what we just wrote: `buttons` is a collection of buttons. This is where all your buttons will go. `cut_button` is the name of your button. **Note that all button names should be unique.** Its `action` is ctrl+x press. And it will display `text` that says "cut" on it. Now, right-click Tablet Friend toolbar and choose "my toolbar" from the list. You don't need to relaunch the program - it updates everything automatically. If you did everything correctly, you will see this:
55
+
Yes, it's that simple. Let's break down what we just wrote: `buttons` is a collection of buttons. This is where all your buttons will go. `cut_button` is the name of your button. **Note that all button names should be unique.** Its `action` is a ctrl+x press. And it will display `text` that says "cut" on it. Now, right-click Tablet Friend toolbar and choose "my toolbar" from the list. You don't need to relaunch the program - it updates everything automatically. If you did everything correctly, you will see this:
56
56
57
57

58
58
59
-
In just four lines, we got ourselves a working button! But obviously, this is not enough for a functional toolbar. Let's add some more:
59
+
In just four lines, we got ourselves a working button! But obviously, this is not enough for a functional toolbar. Let's add some more and some cosmetics:
60
60
61
-
```yaml
61
+
```yaml
62
62
buttons:
63
63
cut_button:
64
64
action: ctrl+x
@@ -92,7 +92,7 @@ Because there is enough space now, all buttons can fit on the same line. You can
92
92
93
93
However, what if you want to space out your buttons, or create a specific shape out of your buttons? For that, Tablet Friend has spacers. Change your config to look like this:
94
94
95
-
```yaml
95
+
```yaml
96
96
layout_width: 2
97
97
buttons:
98
98
cut_button:
@@ -119,9 +119,71 @@ Press Ctrl+S and your toolbar will now have a line of space in-between the butto
119
119
120
120
It is **VERY IMPORTANT** that you use tab characters `` instead of spaces for your indents. Indents do matter, since they tell the config what should go where. You *can* use spaces if you really want to, but keep in mind that all the default layouts use tabs, and tabs and spaces **should never mix** in one config.
121
121
122
+
### App-specific layouts
123
+
124
+
Having a layout is great but what if you want to have one layout for your drawing app, another for note taking and a completely separate one for web browsing? You're in luck because since version 2.0, Tablet Friend has app-specific layout support!
125
+
126
+
Simply add this line to the top of your layout config:
127
+
```yaml
128
+
app: mspaint
129
+
```
130
+
And now, every time we open Microsoft Paint, the layout will automatically switch to this one. But how do we know what exact name an app has?
131
+
For this, you must focus on the app you want, right-click the Tablet Friend tray icon, select `settings` and look at the `focused app` label. It always tells the app you're focusing on.
132
+

133
+
134
+
You can also use wildcards:
135
+
```yaml
136
+
app: app_name # Will match only app_name exactly.
137
+
app: app_name* # Will match any app name that starts with app_name. For example, app_name_v_1.0
138
+
app: "*app_name*" # Will match any app name that contains app_name. Note that if you're putting a * symbol in the beginning, you need to use quotes.
139
+
```
140
+
141
+
If you switch to an app that doesn't have an app-spesific layout, it will switch to the last manually selected layout.
142
+
143
+
You can also disable automatic switching altogether by going into `settings` and pressing the `disable per-app layouts` button.
144
+
145
+
**NOTE**: In order for transition between layouts to be smooth and quick, `layout_width`, `button_size` and `margin` should be exactly the same between layouts.
146
+
122
147
This, of course, are not all the features Tablet Friend offers. You can check out a more [advanced example](TabletFriend/TabletFriend/files/layouts/sample_layout.yaml) with all features listed.
123
148
149
+
## Migrating to 2.0
150
+
151
+
Starting with the version 2.0.0, layout-specific themes are no longer supported. Instead, you can choose a theme in the context menu that will be applied to all toolbars.
152
+
153
+

154
+
155
+
This means, the layout structure has changed a little bit.
156
+
157
+
- Layout properties `external_theme` and `theme` no longer work.
158
+
- Theme properties `button_size`, `margin`, `min_opacity`, `max_opacity` have been moved directly to layout yaml. Themes can no longer influence these properties.
159
+
160
+
An example of 1.0 to 2.0 migration for a layout:
161
+
162
+
```yaml
163
+
# old layout
164
+
layout_width: 4
165
+
external_theme: files/themes/default.yaml
166
+
theme:
167
+
button_size: 14
168
+
169
+
buttons:
170
+
hide:
171
+
action: a
172
+
text: "a"
173
+
174
+
# new layout
175
+
layout_width: 4
176
+
button_size: 14
177
+
margin: 8
178
+
179
+
buttons:
180
+
hide:
181
+
action: a
182
+
text: "a"
183
+
184
+
```
124
185
186
+
Note that unmodified 1.0 layouts and themes will still function but may get rendered differently.
0 commit comments