Skip to content

Commit

Permalink
Add stroke width slider to pattern texture
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 4, 2025
1 parent 788ab5d commit 10495be
Show file tree
Hide file tree
Showing 6 changed files with 177 additions and 160 deletions.
4 changes: 2 additions & 2 deletions api/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ packages:
dependency: transitive
description:
name: http_parser
sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360"
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
version: "4.1.2"
io:
dependency: transitive
description:
Expand Down
128 changes: 78 additions & 50 deletions app/lib/dialogs/texture.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,49 @@ class _TextureViewState extends State<TextureView> {
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget
.onChanged(widget.value.copyWith(boxWidth: value)),
header: Text(AppLocalizations.of(context).width,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxWidth,
defaultValue: 0,
min: 0,
max: 500),
onChanged: (value) =>
widget.onChanged(widget.value.copyWith(boxWidth: value)),
header: Text(AppLocalizations.of(context).width,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxWidth,
defaultValue: 0,
min: 0,
max: 500,
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget.onChanged(
widget.value.copyWith(boxXCount: value.round())),
header: Text(AppLocalizations.of(context).count,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxXCount.toDouble(),
fractionDigits: 0,
defaultValue: 0,
min: 0,
max: 20,
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget.onChanged(
widget.value.copyWith(boxXCount: value.round())),
header: Text(AppLocalizations.of(context).count,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxXCount.toDouble(),
fractionDigits: 0,
defaultValue: 0,
min: 0,
max: 20),
onChanged: (value) =>
widget.onChanged(widget.value.copyWith(boxXSpace: value)),
header: Text(AppLocalizations.of(context).space,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxXSpace,
defaultValue: 0,
min: 0,
max: 500,
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget
.onChanged(widget.value.copyWith(boxXSpace: value)),
header: Text(AppLocalizations.of(context).space,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxXSpace,
defaultValue: 0,
min: 0,
max: 500),
onChanged: (value) => widget
.onChanged(widget.value.copyWith(boxXStroke: value)),
header: Text(AppLocalizations.of(context).strokeWidth,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxXStroke,
defaultValue: 0.5,
min: 0.1,
max: 50,
),
]),
ListView(children: [
ColorField(
Expand All @@ -103,35 +117,49 @@ class _TextureViewState extends State<TextureView> {
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget
.onChanged(widget.value.copyWith(boxHeight: value)),
header: Text(AppLocalizations.of(context).width,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxHeight,
defaultValue: 0,
min: 0,
max: 500),
onChanged: (value) =>
widget.onChanged(widget.value.copyWith(boxHeight: value)),
header: Text(AppLocalizations.of(context).width,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxHeight,
defaultValue: 0,
min: 0,
max: 500,
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget.onChanged(
widget.value.copyWith(boxYCount: value.round())),
header: Text(AppLocalizations.of(context).count,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxYCount.toDouble(),
defaultValue: 0,
fractionDigits: 0,
min: 0,
max: 20,
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget.onChanged(
widget.value.copyWith(boxYCount: value.round())),
header: Text(AppLocalizations.of(context).count,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxYCount.toDouble(),
defaultValue: 0,
fractionDigits: 0,
min: 0,
max: 20),
onChanged: (value) =>
widget.onChanged(widget.value.copyWith(boxYSpace: value)),
header: Text(AppLocalizations.of(context).space,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxYSpace,
defaultValue: 0,
min: 0,
max: 500,
),
const SizedBox(height: 16),
ExactSlider(
onChanged: (value) => widget
.onChanged(widget.value.copyWith(boxYSpace: value)),
header: Text(AppLocalizations.of(context).space,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxYSpace,
defaultValue: 0,
min: 0,
max: 500),
onChanged: (value) => widget
.onChanged(widget.value.copyWith(boxYStroke: value)),
header: Text(AppLocalizations.of(context).strokeWidth,
style: Theme.of(context).textTheme.titleLarge),
value: widget.value.boxYStroke,
defaultValue: 0.5,
min: 0.1,
max: 50,
),
]),
]),
),
Expand Down
20 changes: 10 additions & 10 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -521,26 +521,26 @@ packages:
dependency: "direct main"
description:
name: flutter_secure_storage
sha256: "165164745e6afb5c0e3e3fcc72a012fb9e58496fb26ffb92cf22e16a821e85d0"
sha256: "1913841ac4c7bf57cd2e05b717e1fbff7841b542962feff827b16525a781b3e4"
url: "https://pub.dev"
source: hosted
version: "9.2.2"
version: "9.2.3"
flutter_secure_storage_linux:
dependency: transitive
description:
name: flutter_secure_storage_linux
sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b"
sha256: bf7404619d7ab5c0a1151d7c4e802edad8f33535abfbeff2f9e1fe1274e2d705
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.2"
flutter_secure_storage_macos:
dependency: transitive
description:
name: flutter_secure_storage_macos
sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81"
sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
version: "3.1.3"
flutter_secure_storage_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -657,10 +657,10 @@ packages:
dependency: transitive
description:
name: http_parser
sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360"
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
version: "4.1.2"
idb_shim:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1201,10 +1201,10 @@ packages:
dependency: transitive
description:
name: sembast
sha256: f45edc5e34ed53d6e3d70df664b182e9abcf9c784f48184e5be4c079d2b865d6
sha256: cf1aa59677551d54d7ed85a1c5c3396fc06d01aa9f8fabd443a9b270f8f14760
url: "https://pub.dev"
source: hosted
version: "3.8.0+1"
version: "3.8.1"
share_plus:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
},
"packageManager": "[email protected]",
"devDependencies": {
"sass": "^1.83.0"
"sass": "^1.83.1"
}
}
Loading

0 comments on commit 10495be

Please sign in to comment.