Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YaruSection: unbounded height #583

Closed
jpnurmi opened this issue Feb 5, 2023 · 4 comments · Fixed by #584
Closed

YaruSection: unbounded height #583

jpnurmi opened this issue Feb 5, 2023 · 4 comments · Fixed by #584

Comments

@jpnurmi
Copy link
Member

jpnurmi commented Feb 5, 2023

If you don't pass any height, YaruSection eats up all it gets. Here's a centered section:

image

import 'package:flutter/material.dart';
import 'package:yaru/yaru.dart';
import 'package:yaru_widgets/yaru_widgets.dart';

Future<void> main() async {
  await YaruWindowTitleBar.ensureInitialized();

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return YaruTheme(
      builder: (context, yaru, child) {
        return MaterialApp(
          theme: yaru.theme,
          darkTheme: yaru.darkTheme,
          debugShowCheckedModeBanner: false,
          home: const Scaffold(
            appBar: YaruWindowTitleBar(),
            body: Center( // <==
              child: YaruSection(
                headline: Text('Section title'),
                child: Text('Section child'),
              ),
            ),
          ),
        );
      },
    );
  }
}
@Feichtmeier
Copy link
Member

that's not nice by yaru section! Incredibly greedy 😆

@Feichtmeier
Copy link
Member

it just needs a MainAxisSize parameter

Why is it inside "page" dir? And the pages are inside a different dir? 😄

@jpnurmi
Copy link
Member Author

jpnurmi commented Feb 5, 2023

I also don't know why YaruBanner is in utils/, YaruTile in pages/, and YaruWindow in controls/... 🤷‍♂️ Maybe we can just flatten the tree?

@Feichtmeier
Copy link
Member

Good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants