fix(editor): always top-align content, even for short files
Row was using CrossAxisAlignment.center by default, so a short YAML file appeared visually centered in the editor viewport — uncomfortable in any IDE-style surface where content is expected to start at the top edge regardless of how much of the viewport it fills. Set CrossAxisAlignment.stretch on the outer Row so the SingleChildScrollView fills the full vertical extent. The SCV's default scroll origin is the top, so once the viewport is taller than the content the file renders at the top with empty space below. Version 0.1.2 -> 0.1.3. Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
7655e0dc32
commit
a7485cadb5
2 changed files with 9 additions and 1 deletions
|
|
@ -609,6 +609,14 @@ class _EditorPane extends StatelessWidget {
|
||||||
color: theme.colorScheme.onSurface,
|
color: theme.colorScheme.onSurface,
|
||||||
);
|
);
|
||||||
return Row(
|
return Row(
|
||||||
|
// Stretch so the editor's scroll viewport fills the row's
|
||||||
|
// full vertical extent. Without this the Row defaults to
|
||||||
|
// CrossAxisAlignment.center, which centers a short file
|
||||||
|
// vertically — uncomfortable in an IDE where readers
|
||||||
|
// expect content to always start at the top. Default
|
||||||
|
// SingleChildScrollView origin is top, so stretching the
|
||||||
|
// viewport is enough to anchor content at the top edge.
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: fai_studio_flow_editor
|
name: fai_studio_flow_editor
|
||||||
description: Swappable inline YAML editor for F∆I Studio flows.
|
description: Swappable inline YAML editor for F∆I Studio flows.
|
||||||
version: 0.1.2
|
version: 0.1.3
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
repository: https://git.flemming.ai/fai/studio-flow-editor
|
repository: https://git.flemming.ai/fai/studio-flow-editor
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue